10#ifndef SIMULATION_MODULES_FULLSIM_FULLSIMTIMINGMODULE_H
11#define SIMULATION_MODULES_FULLSIM_FULLSIMTIMINGMODULE_H
13#include <framework/core/Module.h>
14#include <simulation/kernel/StepTiming.h>
54 virtual void event()
override;
61 void processStep(G4Track* track, G4LogicalVolume* volume,
double time);
Provide more detailled timing info for FullSim module.
std::string m_rootFileName
filename of the root file to store the timing profile
double m_totalTime
total time spent stepping through the simulation geometry
bool m_isInitialized
remember whether we aleady initialized everything
std::map< constG4Region *, double >::iterator m_lastRegion
iterator pointing to the region of the last step to speed up lookup
Simulation::StepTiming * m_timing
instance of the StepTiming class which records the step times in geant4
virtual void initialize() override
Setup the timing structure.
FullSimTimingModule & operator=(const FullSimTimingModule &)=delete
No assignment.
virtual void event() override
Save the simulation time for each region in a profile.
FullSimTimingModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void terminate() override
Save the output.
FullSimTimingModule(const FullSimTimingModule &)=delete
No copying.
double m_eventTime
stepping time of the current event
void processStep(G4Track *track, G4LogicalVolume *volume, double time)
store the time it took a Geant4 track for one step inside a volume
unsigned int m_eventCount
number of events with m_eventTime>0
std::map< const G4Region *, int > m_regionIndices
map between region and and bin indices in the TProfile
std::map< const G4Region *, double > m_regionCache
map containing the amount of time spent in each region
TProfile * m_timingProfile
profile of the time spent per event in each region
Class to perform more detailed timing studies of the Geant4 simulation.
Abstract base class for different kinds of events.