EventAction Class Reference

#include <EventAction.hh>

Inheritance diagram for EventAction:

Inheritance graph
[legend]
Collaboration diagram for EventAction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EventAction (RunAction *)
 ~EventAction ()
void BeginOfEventAction (const G4Event *)
void EndOfEventAction (const G4Event *)
void AddEdep (G4double edep)

Private Attributes

RunActionm_runAction
G4double m_edepPerEvent
G4int m_printModulo


Detailed Description

Definition at line 16 of file EventAction.hh.


Constructor & Destructor Documentation

EventAction::EventAction ( RunAction run  ) 

Definition at line 15 of file EventAction.cc.

00016 :m_runAction(run), m_printModulo(5000)
00017 {}

EventAction::~EventAction (  ) 

Definition at line 21 of file EventAction.cc.

00022 {}


Member Function Documentation

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;};


Member Data Documentation

Definition at line 26 of file EventAction.hh.

Referenced by EndOfEventAction().

G4double EventAction::m_edepPerEvent [private]

Definition at line 30 of file EventAction.hh.

Referenced by BeginOfEventAction(), and EndOfEventAction().

G4int EventAction::m_printModulo [private]

Definition at line 31 of file EventAction.hh.

Referenced by BeginOfEventAction().


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

Generated on Fri Nov 21 10:20:57 2008 for jour4b1 by  doxygen 1.5.7.1