Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaRayTelRunAction Class Reference

#include <GammaRayTelRunAction.hh>

Inheritance diagram for GammaRayTelRunAction:
Collaboration diagram for GammaRayTelRunAction:

Public Member Functions

 GammaRayTelRunAction ()
 
 ~GammaRayTelRunAction ()
 
void BeginOfRunAction (const G4Run *)
 
void EndOfRunAction (const G4Run *)
 
std::ofstream * GetOutputFile ()
 
- Public Member Functions inherited from G4UserRunAction
 G4UserRunAction ()
 
virtual ~G4UserRunAction ()
 
virtual G4RunGenerateRun ()
 
virtual void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Additional Inherited Members

- Protected Attributes inherited from G4UserRunAction
G4bool isMaster
 

Detailed Description

Definition at line 51 of file GammaRayTelRunAction.hh.

Constructor & Destructor Documentation

GammaRayTelRunAction::GammaRayTelRunAction ( )

Definition at line 55 of file GammaRayTelRunAction.cc.

55  :
56  outFile(0),fileName("NULL"),fRunID(-1)
57 {;}
GammaRayTelRunAction::~GammaRayTelRunAction ( )

Definition at line 62 of file GammaRayTelRunAction.cc.

63 {;}

Member Function Documentation

void GammaRayTelRunAction::BeginOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 67 of file GammaRayTelRunAction.cc.

68 {
69  fRunID = aRun->GetRunID();
70 
71  //Master mode or sequential
72  if (IsMaster())
73  G4cout << "### Run " << aRun->GetRunID() << " starts (master)." << G4endl;
74  else
75  G4cout << "### Run " << aRun->GetRunID() << " starts (worker)." << G4endl;
76 
77  // Prepare the visualization
79  {
81  UI->ApplyCommand("/vis/scene/notifyHandlers");
82  }
83 
84  // If analysis is used reset the histograms
86  // analysis->BeginOfRun(aRun->GetRunID());
87  analysis->BeginOfRun();
88 }
static G4VVisManager * GetConcreteInstance()
static GammaRayTelAnalysis * getInstance()
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
G4GLOB_DLL std::ostream G4cout
G4bool IsMaster() const
G4int GetRunID() const
Definition: G4Run.hh:76
#define G4endl
Definition: G4ios.hh:61
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function:

void GammaRayTelRunAction::EndOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 92 of file GammaRayTelRunAction.cc.

93 {
94  G4cout << "End of Run " << aRun->GetRunID() << G4endl;
95 
96  // Close the file with the hits information
97 #ifdef G4STORE_DATA
98  if (outFile)
99  {
100  G4cout << "File " << fileName << G4endl;
101  outFile->close();
102  delete outFile;
103  outFile = 0;
104  }
105 #endif
106 
107  // If analysis is used, print out the histograms
109  analysis->EndOfRun();
110 }
static GammaRayTelAnalysis * getInstance()
G4GLOB_DLL std::ostream G4cout
G4int GetRunID() const
Definition: G4Run.hh:76
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

std::ofstream * GammaRayTelRunAction::GetOutputFile ( )

Definition at line 115 of file GammaRayTelRunAction.cc.

116 {
117  if (!outFile)
118  OpenFile();
119  return outFile;
120 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: