ATLAS Offline Software
|
A user action for monitoring G4 runtime at event and run level. More...
#include <G4SimTimer.h>
Classes | |
struct | Report |
Simple struct which holds timing results for an action instance. More... | |
Public Member Functions | |
G4SimTimer () | |
Constructor. More... | |
virtual void | BeginOfEventAction (const G4Event *event) override final |
Start timing this Geant4 event. More... | |
virtual void | EndOfEventAction (const G4Event *event) override final |
Finish timing this Geant4 event. More... | |
const Report & | getReport () const |
Retrieve my timing results. More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
G4Timer | m_eventTimer |
My private instance of an event timer. More... | |
Report | m_results |
My timing results. More... | |
bool | m_firstEvent |
Used to skip the first event. More... | |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
A user action for monitoring G4 runtime at event and run level.
This class implements the event and run action interfaces. The implementation was mostly taken from the previous G4SimTimer design. Results across worker threads are merged in finalize method of the G4SimTimerTool.
IMPORTANT NOTE: The G4SimTimer results will seem nonsensical in MT because the USER time is reported which sums over all threads in the process. The per-event timing can roughly be determined by dividing by the number of threads, but this is only precise when averaged over all events.
Definition at line 40 of file G4SimTimer.h.
G4UA::G4SimTimer::G4SimTimer | ( | ) |
Constructor.
Definition at line 35 of file G4SimTimer.cxx.
|
finaloverridevirtual |
Start timing this Geant4 event.
Definition at line 43 of file G4SimTimer.cxx.
|
finaloverridevirtual |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
lvl | The message level to test against |
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
My private instance of an event timer.
Definition at line 83 of file G4SimTimer.h.
|
private |
Used to skip the first event.
Definition at line 89 of file G4SimTimer.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
My timing results.
Definition at line 86 of file G4SimTimer.h.