Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4EventAction.h
Go to the documentation of this file.
1#ifndef TG4_EVENT_ACTION_H
2#define TG4_EVENT_ACTION_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
19#include "TG4Verbose.h"
20
21#include <TStopwatch.h>
22
23#include <G4UserEventAction.hh>
24#include <globals.hh>
25
27class TG4TrackManager;
28class TG4StateManager;
29
30class TVirtualMCApplication;
31class TVirtualMCStack;
32
33class G4Event;
34
39
41{
42 public:
44 virtual ~TG4EventAction();
45
46 // methods
47 void LateInitialize();
48 virtual void BeginOfEventAction(const G4Event* event);
49 virtual void EndOfEventAction(const G4Event* event);
50
51 // set methods
52 void SetMCStack(TVirtualMCStack* mcStack);
53 void SetPrintMemory(G4bool printMemory);
54 void SetSaveRandomStatus(G4bool saveRandomStatus);
55 void SetIsInterruptibleEvent(G4bool isInterruptible);
56
57 // get methods
58 G4bool GetPrintMemory() const;
59 G4bool GetSaveRandomStatus() const;
60 G4bool IsInterruptibleEvent() const;
61
62 private:
67
68 // data members
70 TStopwatch fTimer;
71
73 TVirtualMCApplication* fMCApplication;
74
76 TVirtualMCStack* fMCStack;
77
80
83
86
89
92
97};
98
99// inline methods
100
101inline void TG4EventAction::SetMCStack(TVirtualMCStack* mcStack)
102{
104 fMCStack = mcStack;
105}
106
107inline void TG4EventAction::SetPrintMemory(G4bool printMemory)
108{
110 fPrintMemory = printMemory;
111}
112
114{
116 return fPrintMemory;
117}
118
120{
122 return fSaveRandomStatus;
123}
124
126{
129}
130
131inline void TG4EventAction::SetSaveRandomStatus(G4bool saveRandomStatus)
132{
134 fSaveRandomStatus = saveRandomStatus;
135}
136
137inline void TG4EventAction::SetIsInterruptibleEvent(G4bool isInterruptible)
138{
140 fIsInterruptibleEvent = isInterruptible;
141}
142
143#endif // TG4_EVENT_ACTION_H
Definition of the TG4EventActionMessenger class.
Definition of the TG4Verbose class.
Messenger class that defines commands for TG4EventAction.
Actions at the beginning and the end of event.
G4bool fIsInterruptibleEvent
G4bool GetSaveRandomStatus() const
virtual void BeginOfEventAction(const G4Event *event)
G4bool fSaveRandomStatus
Control for saving random engine status for each event.
void SetIsInterruptibleEvent(G4bool isInterruptible)
TG4EventAction & operator=(const TG4EventAction &right)
Not implemented.
G4bool IsInterruptibleEvent() const
G4bool GetPrintMemory() const
TG4TrackingAction * fTrackingAction
Cached pointer to thread-local tracking action.
TVirtualMCApplication * fMCApplication
Cached pointer to thread-local VMC application.
G4bool fPrintMemory
Control for printing memory usage.
TStopwatch fTimer
timer
TG4EventActionMessenger fMessenger
messenger
void SetPrintMemory(G4bool printMemory)
TVirtualMCStack * fMCStack
Cached pointer to thread-local VMC stack.
TG4StateManager * fStateManager
Cached pointer to thread-local state manager.
void SetMCStack(TVirtualMCStack *mcStack)
void SetSaveRandomStatus(G4bool saveRandomStatus)
virtual void EndOfEventAction(const G4Event *event)
TG4TrackManager * fTrackManager
Cached pointer to thread-local track manager.
TG4EventAction(const TG4EventAction &right)
Not implemented.
virtual ~TG4EventAction()
The manager class for application state.
The class for storing G4 tracks in VMC sack.
Actions at the beginnig and at the end of track.
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36