Geant4  10.02.p03
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)
 

Private Attributes

WLSRunActionfRunAction
 
WLSEventActionMessengerfEventMessenger
 
G4int fVerboseLevel
 
G4int fMPPCCollID
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 44 of file WLSEventAction.hh.

Constructor & Destructor Documentation

◆ WLSEventAction()

WLSEventAction::WLSEventAction ( WLSRunAction runaction)

Definition at line 54 of file WLSEventAction.cc.

55  : fRunAction(runaction), fVerboseLevel(0)
56 {
57  fMPPCCollID = 0;
58 
60 }
WLSRunAction * fRunAction
WLSEventActionMessenger * fEventMessenger

◆ ~WLSEventAction()

WLSEventAction::~WLSEventAction ( )
virtual

Definition at line 64 of file WLSEventAction.cc.

65 {
66  delete fEventMessenger;
67 }
WLSEventActionMessenger * fEventMessenger

Member Function Documentation

◆ BeginOfEventAction()

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
G4GLOB_DLL std::ostream G4cout
G4int GetEventID() const
Definition: G4Event.hh:151
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ EndOfEventAction()

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 =
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 }
G4GLOB_DLL std::ostream G4cout
G4int GetRndmFreq()
Definition: WLSRunAction.hh:59
G4int GetEventID() const
Definition: G4Event.hh:151
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
G4HCofThisEvent * GetHCofThisEvent() const
Definition: G4Event.hh:185
#define G4endl
Definition: G4ios.hh:61
WLSRunAction * fRunAction
G4int G4GetThreadId()
Definition: G4Threading.cc:134
Here is the call graph for this function:

◆ GetEventNo()

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:

◆ SetEventVerbose()

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:

Member Data Documentation

◆ fEventMessenger

WLSEventActionMessenger* WLSEventAction::fEventMessenger
private

Definition at line 62 of file WLSEventAction.hh.

◆ fMPPCCollID

G4int WLSEventAction::fMPPCCollID
private

Definition at line 66 of file WLSEventAction.hh.

◆ fRunAction

WLSRunAction* WLSEventAction::fRunAction
private

Definition at line 61 of file WLSEventAction.hh.

◆ fVerboseLevel

G4int WLSEventAction::fVerboseLevel
private

Definition at line 64 of file WLSEventAction.hh.


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