#include <EventAction.hh>
Public Member Functions | |
EventAction (RunAction *) | |
~EventAction () | |
void | BeginOfEventAction (const G4Event *) |
void | EndOfEventAction (const G4Event *) |
void | AddEdep (G4double edep) |
Private Attributes | |
RunAction * | m_runAction |
G4double | m_edepPerEvent |
G4int | m_printModulo |
Definition at line 16 of file EventAction.hh.
EventAction::EventAction | ( | RunAction * | run | ) |
EventAction::~EventAction | ( | ) |
void EventAction::BeginOfEventAction | ( | const G4Event * | evt | ) |
Definition at line 26 of file EventAction.cc.
00027 { 00028 G4int evtNb = evt->GetEventID(); 00029 00030 //printing survey 00031 if (evtNb%m_printModulo == 0) 00032 G4cout << "\n---> Begin of Event: " << evtNb << G4endl; 00033 00034 //energy deposited per event 00035 m_edepPerEvent = 0.; 00036 }
void EventAction::EndOfEventAction | ( | const G4Event * | ) |
G4cout << "\n ---> Edep per event = " << G4BestUnit(m_edepPerEvent,"Energy") << G4endl;
Definition at line 40 of file EventAction.cc.
00041 { 00042 //energy deposited per event 00043 // 00044 if (m_edepPerEvent > 0.) { 00045 m_runAction->SumEvents(m_edepPerEvent); 00046 ///G4cout 00047 /// << "\n ---> Edep per event = " << G4BestUnit(m_edepPerEvent,"Energy") 00048 /// << G4endl; 00049 } 00050 }
void EventAction::AddEdep | ( | G4double | edep | ) | [inline] |
Definition at line 26 of file EventAction.hh.
Referenced by SteppingAction::UserSteppingAction().
00026 {m_edepPerEvent += edep;};
RunAction* EventAction::m_runAction [private] |
G4double EventAction::m_edepPerEvent [private] |
Definition at line 30 of file EventAction.hh.
Referenced by BeginOfEventAction(), and EndOfEventAction().
G4int EventAction::m_printModulo [private] |