Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
event
include
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
18
#include "
TG4EventActionMessenger.h
"
19
#include "
TG4Verbose.h
"
20
21
#include <TStopwatch.h>
22
23
#include <G4UserEventAction.hh>
24
#include <globals.hh>
25
26
class
TG4TrackingAction
;
27
class
TG4TrackManager
;
28
class
TG4StateManager
;
29
30
class
TVirtualMCApplication;
31
class
TVirtualMCStack;
32
33
class
G4Event;
34
39
40
class
TG4EventAction
:
public
G4UserEventAction
,
public
TG4Verbose
41
{
42
public
:
43
TG4EventAction
();
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
:
64
TG4EventAction
(
const
TG4EventAction
& right);
66
TG4EventAction
&
operator=
(
const
TG4EventAction
& right);
67
68
// data members
69
TG4EventActionMessenger
fMessenger
;
70
TStopwatch
fTimer
;
71
73
TVirtualMCApplication*
fMCApplication
;
74
76
TVirtualMCStack*
fMCStack
;
77
79
TG4TrackingAction
*
fTrackingAction
;
80
82
TG4TrackManager
*
fTrackManager
;
83
85
TG4StateManager
*
fStateManager
;
86
88
G4bool
fPrintMemory
;
89
91
G4bool
fSaveRandomStatus
;
92
96
G4bool
fIsInterruptibleEvent
;
97
};
98
99
// inline methods
100
101
inline
void
TG4EventAction::SetMCStack
(TVirtualMCStack* mcStack)
102
{
104
fMCStack
= mcStack;
105
}
106
107
inline
void
TG4EventAction::SetPrintMemory
(G4bool printMemory)
108
{
110
fPrintMemory
= printMemory;
111
}
112
113
inline
G4bool
TG4EventAction::GetPrintMemory
()
const
114
{
116
return
fPrintMemory
;
117
}
118
119
inline
G4bool
TG4EventAction::GetSaveRandomStatus
()
const
120
{
122
return
fSaveRandomStatus
;
123
}
124
125
inline
G4bool
TG4EventAction::IsInterruptibleEvent
()
const
126
{
128
return
fIsInterruptibleEvent
;
129
}
130
131
inline
void
TG4EventAction::SetSaveRandomStatus
(G4bool saveRandomStatus)
132
{
134
fSaveRandomStatus
= saveRandomStatus;
135
}
136
137
inline
void
TG4EventAction::SetIsInterruptibleEvent
(G4bool isInterruptible)
138
{
140
fIsInterruptibleEvent
= isInterruptible;
141
}
142
143
#endif
// TG4_EVENT_ACTION_H
TG4EventActionMessenger.h
Definition of the TG4EventActionMessenger class.
TG4Verbose.h
Definition of the TG4Verbose class.
G4UserEventAction
TG4EventActionMessenger
Messenger class that defines commands for TG4EventAction.
Definition
TG4EventActionMessenger.h:35
TG4EventAction::fIsInterruptibleEvent
G4bool fIsInterruptibleEvent
Definition
TG4EventAction.h:96
TG4EventAction::GetSaveRandomStatus
G4bool GetSaveRandomStatus() const
Definition
TG4EventAction.h:119
TG4EventAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *event)
Definition
TG4EventAction.cxx:84
TG4EventAction::fSaveRandomStatus
G4bool fSaveRandomStatus
Control for saving random engine status for each event.
Definition
TG4EventAction.h:91
TG4EventAction::SetIsInterruptibleEvent
void SetIsInterruptibleEvent(G4bool isInterruptible)
Definition
TG4EventAction.h:137
TG4EventAction::TG4EventAction
TG4EventAction()
Definition
TG4EventAction.cxx:46
TG4EventAction::operator=
TG4EventAction & operator=(const TG4EventAction &right)
Not implemented.
TG4EventAction::IsInterruptibleEvent
G4bool IsInterruptibleEvent() const
Definition
TG4EventAction.h:125
TG4EventAction::GetPrintMemory
G4bool GetPrintMemory() const
Definition
TG4EventAction.h:113
TG4EventAction::fTrackingAction
TG4TrackingAction * fTrackingAction
Cached pointer to thread-local tracking action.
Definition
TG4EventAction.h:79
TG4EventAction::fMCApplication
TVirtualMCApplication * fMCApplication
Cached pointer to thread-local VMC application.
Definition
TG4EventAction.h:73
TG4EventAction::fPrintMemory
G4bool fPrintMemory
Control for printing memory usage.
Definition
TG4EventAction.h:88
TG4EventAction::fTimer
TStopwatch fTimer
timer
Definition
TG4EventAction.h:70
TG4EventAction::fMessenger
TG4EventActionMessenger fMessenger
messenger
Definition
TG4EventAction.h:69
TG4EventAction::SetPrintMemory
void SetPrintMemory(G4bool printMemory)
Definition
TG4EventAction.h:107
TG4EventAction::fMCStack
TVirtualMCStack * fMCStack
Cached pointer to thread-local VMC stack.
Definition
TG4EventAction.h:76
TG4EventAction::LateInitialize
void LateInitialize()
Definition
TG4EventAction.cxx:73
TG4EventAction::fStateManager
TG4StateManager * fStateManager
Cached pointer to thread-local state manager.
Definition
TG4EventAction.h:85
TG4EventAction::SetMCStack
void SetMCStack(TVirtualMCStack *mcStack)
Definition
TG4EventAction.h:101
TG4EventAction::SetSaveRandomStatus
void SetSaveRandomStatus(G4bool saveRandomStatus)
Definition
TG4EventAction.h:131
TG4EventAction::EndOfEventAction
virtual void EndOfEventAction(const G4Event *event)
Definition
TG4EventAction.cxx:130
TG4EventAction::fTrackManager
TG4TrackManager * fTrackManager
Cached pointer to thread-local track manager.
Definition
TG4EventAction.h:82
TG4EventAction::TG4EventAction
TG4EventAction(const TG4EventAction &right)
Not implemented.
TG4EventAction::~TG4EventAction
virtual ~TG4EventAction()
Definition
TG4EventAction.cxx:63
TG4StateManager
The manager class for application state.
Definition
TG4StateManager.h:31
TG4TrackManager
The class for storing G4 tracks in VMC sack.
Definition
TG4TrackManager.h:53
TG4TrackingAction
Actions at the beginnig and at the end of track.
Definition
TG4TrackingAction.h:46
TG4Verbose::TG4Verbose
TG4Verbose(const G4String &cmdName)
Definition
TG4Verbose.cxx:24
Generated on
for Geant4 VMC by
1.17.0