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 19 of file EventAction.cc.

00020 :m_runAction(run), m_printModulo(10000)
00021 {}

EventAction::~EventAction (  ) 

Definition at line 25 of file EventAction.cc.

00026 {}


Member Function Documentation

void EventAction::BeginOfEventAction ( const G4Event *  evt  ) 

Definition at line 30 of file EventAction.cc.

00031 {
00032  G4int evtNb = evt->GetEventID();
00033 
00034  //printing survey
00035  if (evtNb%m_printModulo == 0)
00036     G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
00037     
00038  //energy deposited per event
00039  m_edepPerEvent = 0.;   
00040 }

void EventAction::EndOfEventAction ( const G4Event *   ) 

Definition at line 44 of file EventAction.cc.

00045 {
00046   //energy deposited per event
00047   //
00048   if (m_edepPerEvent > 0.) {
00049    m_runAction->SumEvents(m_edepPerEvent);
00050 #ifdef G4ANALYSIS_USE
00051    G4double weight = 1.;
00052    m_runAction->GetHisto(0)->fill(m_edepPerEvent/MeV, weight);
00053 #endif   
00054   }  
00055 }

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:21:30 2008 for jour4c by  doxygen 1.5.7.1