Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSEventAction Class Reference

#include <WLSEventAction.hh>

Inheritance diagram for WLSEventAction:
Collaboration diagram for WLSEventAction:

Public Member Functions

 WLSEventAction (WLSRunAction *)
 
virtual ~WLSEventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
G4int GetEventNo ()
 
void SetEventVerbose (G4int)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 44 of file WLSEventAction.hh.

Constructor & Destructor Documentation

WLSEventAction::WLSEventAction ( WLSRunAction runaction)

Definition at line 54 of file WLSEventAction.cc.

55  : fRunAction(runaction), fVerboseLevel(0)
56 {
57  fMPPCCollID = 0;
58 
59  fEventMessenger = new WLSEventActionMessenger(this);
60 }
WLSEventAction::~WLSEventAction ( )
virtual

Definition at line 64 of file WLSEventAction.cc.

65 {
66  delete fEventMessenger;
67 }

Member Function Documentation

void WLSEventAction::BeginOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 71 of file WLSEventAction.cc.

72 {
73  G4int evtNb = evt->GetEventID();
74 
75  if(fVerboseLevel>0)
76  G4cout << "<<< Event " << evtNb << " started." << G4endl;
77 }
int G4int
Definition: G4Types.hh:78
G4int GetEventID() const
Definition: G4Event.hh:151
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void WLSEventAction::EndOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 83 of file WLSEventAction.cc.

84 {
85  if (fVerboseLevel>0)
86  G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
87 
88  if (fRunAction->GetRndmFreq() == 2)
89  {
90  std::ostringstream os;
91  os<<"endOfEvent_"<<G4Threading::G4GetThreadId()<<".rndm";
92  G4Random::saveEngineStatus(os.str().c_str());
93  }
94 
95  // Get Hits from the detector if any
97  G4String colName = "PhotonDetHitCollection";
98  fMPPCCollID = SDman->GetCollectionID(colName);
99 
100  G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
101  WLSPhotonDetHitsCollection* mppcHC = 0;
102 
103  // Get the hit collections
104  if (HCE)
105  {
106  if (fMPPCCollID>=0) mppcHC =
107  (WLSPhotonDetHitsCollection*)(HCE->GetHC(fMPPCCollID));
108  }
109 
110  // Get hit information about photons that reached the detector in this event
111  if (mppcHC)
112  {
113 // G4int n_hit = mppcHC->entries();
114  }
115 }
G4VHitsCollection * GetHC(G4int i)
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
G4int GetEventID() const
Definition: G4Event.hh:151
G4GLOB_DLL std::ostream G4cout
G4int GetRndmFreq()
Definition: WLSRunAction.hh:59
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
G4HCofThisEvent * GetHCofThisEvent() const
Definition: G4Event.hh:185
G4int G4GetThreadId()
Definition: G4Threading.cc:144

Here is the call graph for this function:

G4int WLSEventAction::GetEventNo ( )

Definition at line 119 of file WLSEventAction.cc.

120 {
122 }
G4EventManager * fpEventManager
G4int GetEventID() const
Definition: G4Event.hh:151
const G4Event * GetConstCurrentEvent()

Here is the call graph for this function:

void WLSEventAction::SetEventVerbose ( G4int  level)

Definition at line 126 of file WLSEventAction.cc.

127 {
128  fVerboseLevel = level;
129 }

Here is the caller graph for this function:


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