Belle II Software development
|
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.
typedef std::function<void (G4Track*, G4LogicalVolume*, double)> callbackType |
Signature of the callback function.
Definition at line 37 of file StepTiming.h.
|
inlineexplicit |
Constructor: create an instance with a given callback function.
Definition at line 39 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 47 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 51 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 45 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 63 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 61 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 57 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 59 of file StepTiming.h.
|
virtual |
Start timing a new step.
Definition at line 19 of file StepTiming.cc.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 49 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 53 of file StepTiming.h.
|
virtual |
Step finished, call callback function.
Definition at line 24 of file StepTiming.cc.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 55 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 67 of file StepTiming.h.
|
inlinevirtual |
ignored, empty stub only implemented because it's pure virtual in base class
Definition at line 65 of file StepTiming.h.
|
private |
callback function to call
Definition at line 70 of file StepTiming.h.
|
private |
start time of the step
Definition at line 72 of file StepTiming.h.