Belle II Software
release-08-01-10
|
Class to perform more detailed timing studies of the Geant4 simulation. More...
#include <StepTiming.h>
Public Types | |
typedef std::function< void(G4Track *, G4LogicalVolume *, double)> | callbackType |
Signature of the callback function. | |
Public Member Functions | |
StepTiming (const callbackType &callback) | |
Constructor: create an instance with a given callback function. | |
virtual void | NewStep () |
Start timing a new step. | |
virtual void | StepInfo () |
Step finished, call callback function. | |
virtual void | AtRestDoItInvoked () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | AlongStepDoItAllDone () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | PostStepDoItAllDone () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | AlongStepDoItOneByOne () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | PostStepDoItOneByOne () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | TrackingStarted () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | DPSLStarted () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | DPSLUserLimit () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | DPSLPostStep () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | DPSLAlongStep () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | VerboseTrack () |
ignored, empty stub only implemented because it's pure virtual in base class | |
virtual void | VerboseParticleChange () |
ignored, empty stub only implemented because it's pure virtual in base class | |
Private Attributes | |
callbackType | m_callback |
callback function to call | |
double | m_startTime {0} |
start time of the step | |
Class to perform more detailed timing studies of the Geant4 simulation.
This class overrides the default G4SteppingVerbose implementation which is used by Geant4 to display stepping information. It measures the time for each step and calls a given callback function with a pointer to the track, the volume in which the step occured and the time needed for that step.
Measuring the time in each step causes a overhead of 10%-20% so this should not be used in production
Definition at line 34 of file StepTiming.h.