Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
XrayTelRunAction Class Reference

#include <XrayTelRunAction.hh>

Inheritance diagram for XrayTelRunAction:
G4UserRunAction

Public Member Functions

 XrayTelRunAction ()
 
 ~XrayTelRunAction ()
 
void BeginOfRunAction (const G4Run *)
 
void EndOfRunAction (const G4Run *)
 
void Update (G4double energy)
 
- Public Member Functions inherited from G4UserRunAction
 G4UserRunAction ()
 
virtual ~G4UserRunAction ()
 
virtual G4RunGenerateRun ()
 
void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Additional Inherited Members

- Protected Attributes inherited from G4UserRunAction
G4bool isMaster
 

Detailed Description

Definition at line 65 of file XrayTelRunAction.hh.

Constructor & Destructor Documentation

XrayTelRunAction::XrayTelRunAction ( )

Definition at line 73 of file XrayTelRunAction.cc.

74  :nEnteringTracks(0), totEnteringEnergy(0.)
75 { }
XrayTelRunAction::~XrayTelRunAction ( )

Definition at line 78 of file XrayTelRunAction.cc.

79 { }

Member Function Documentation

void XrayTelRunAction::BeginOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 82 of file XrayTelRunAction.cc.

References G4UImanager::ApplyCommand(), XrayTelAnalysis::book(), G4cout, G4endl, G4VVisManager::GetConcreteInstance(), XrayTelAnalysis::getInstance(), G4Run::GetRunID(), and G4UImanager::GetUIpointer().

83 {
84  G4int runN = aRun->GetRunID();
85  if ( runN % 1000 == 0 )
86  G4cout << "### Run : " << runN << G4endl;
87 
90  UI->ApplyCommand("/vis/scene/notifyHandlers");
91  }
92 
93  nEnteringTracks = 0;
94  totEnteringEnergy = 0.;
95 
96  // Book histograms and ntuples
98  analysis->book();
99 }
static G4VVisManager * GetConcreteInstance()
int G4int
Definition: G4Types.hh:78
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
G4GLOB_DLL std::ostream G4cout
G4int GetRunID() const
Definition: G4Run.hh:76
#define G4endl
Definition: G4ios.hh:61
static XrayTelAnalysis * getInstance()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:419
void XrayTelRunAction::EndOfRunAction ( const G4Run )
virtual

Reimplemented from G4UserRunAction.

Definition at line 102 of file XrayTelRunAction.cc.

References G4UImanager::ApplyCommand(), XrayTelAnalysis::finish(), G4cout, G4endl, G4VVisManager::GetConcreteInstance(), XrayTelAnalysis::getInstance(), G4UImanager::GetUIpointer(), and python.hepunit::MeV.

103 {
105  analysis->finish();
106 
108  G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
109 
110  G4cout << "End of Run summary" << G4endl << G4endl;
111 
112  G4cout << "Total Entering Detector : " << nEnteringTracks << G4endl;
113  G4cout << "Total Entering Detector Energy : "
114  << totEnteringEnergy/MeV
115  << " MeV"
116  << G4endl;
117 }
static G4VVisManager * GetConcreteInstance()
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
static XrayTelAnalysis * getInstance()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:419
void XrayTelRunAction::Update ( G4double  energy)

Definition at line 120 of file XrayTelRunAction.cc.

References energy().

Referenced by XrayTelSteppingAction::UserSteppingAction().

121 {
122  nEnteringTracks++;
123  totEnteringEnergy += energy;
124 }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106

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