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

#include <eRositaEventAction.hh>

Inheritance diagram for eRositaEventAction:
G4UserEventAction

Public Member Functions

 eRositaEventAction ()
 
 ~eRositaEventAction ()
 
void BeginOfEventAction (const G4Event *)
 
void EndOfEventAction (const G4Event *)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 39 of file eRositaEventAction.hh.

Constructor & Destructor Documentation

eRositaEventAction::eRositaEventAction ( )

Definition at line 39 of file eRositaEventAction.cc.

40 {}
eRositaEventAction::~eRositaEventAction ( )

Definition at line 43 of file eRositaEventAction.cc.

44 {}

Member Function Documentation

void eRositaEventAction::BeginOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 47 of file eRositaEventAction.cc.

References G4cout, and G4Event::GetEventID().

48 {
49  G4int nEvent = evt->GetEventID() + 1;
50 
51  G4int frequency = 100;
52  if (nEvent > 1000 ) frequency = 1000;
53  if (nEvent > 10000) frequency = 10000;
54  if (nEvent > 100000) frequency = 100000;
55 
56  G4int remainder = nEvent % frequency;
57  if (remainder == 0) G4cout << "---- eRosita event counter: " << nEvent
58  << std::endl;
59 }
int G4int
Definition: G4Types.hh:78
G4int GetEventID() const
Definition: G4Event.hh:140
G4GLOB_DLL std::ostream G4cout
void eRositaEventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

Definition at line 62 of file eRositaEventAction.cc.

63 {
64 /*
65  G4int event_id = evt->GetEventID();
66 
67  // get number of stored trajectories
68  //
69  G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
70  G4int n_trajectories = 0;
71  if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
72 
73  // periodic printing
74  //
75  if (event_id < 100 || event_id%100 == 0) {
76  //G4cout << ">>> Event " << evt->GetEventID() << G4endl;
77  //G4cout << " " << n_trajectories
78  // << " trajectories stored in this event." << G4endl;
79  }
80 */
81 }

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