24#ifndef G4PROFILINGTOOLS_TestActionVPTimer_H
25#define G4PROFILINGTOOLS_TestActionVPTimer_H
30#include "G4VPhysicalVolume.hh"
39#include "G4UserEventAction.hh"
40#include "G4UserRunAction.hh"
41#include "G4UserSteppingAction.hh"
52 public G4UserEventAction,
public G4UserRunAction,
public G4UserSteppingAction
75 this->
tTotal += acc.tTotal;
79 this->
tPion += acc.tPion;
82 this->
tMeson += acc.tMeson;
83 this->
tOther += acc.tOther;
99 typedef std::map<VolTree, TestActionVPTimer::volumeData>
VolMap;
100 typedef VolMap::const_iterator
VolIt;
124 for(
auto& element:rep.time_index){
130 existing->second+=element.second;
161 double TimerSum(G4Timer* timer)
const;
168 if (timer == 0)
return -999.;
170 return (timer->GetUserElapsed() + timer->GetSystemElapsed());
std::vector< VolID > VolTree
virtual void BeginOfRunAction(const G4Run *) override
TestActionVPTimer & operator=(const TestActionVPTimer &)=delete
double m_eventTime
Double for storing this event time.
std::map< VolTree, TestActionVPTimer::volumeData > VolMap
double TimerSum(G4Timer *timer) const
Gets the time from the timer for summation.
VolTree v_history
Vector of the current volume history, used to assign times to each element.
TestActionVPTimer(const Config &config)
G4Timer * m_eventTimer
Timer for this event.
virtual void EndOfEventAction(const G4Event *) override
VolMap::const_iterator VolIt
virtual void BeginOfEventAction(const G4Event *) override
TestActionVPTimer(const TestActionVPTimer &)=delete
virtual void UserSteppingAction(const G4Step *) override
G4Timer * v_timer
Timer activated for each volume.
virtual void EndOfRunAction(const G4Run *) override
const Report & getReport() const
G4Timer * m_runTimer
Timer for the entire run.
std::string dDetail
Path to set detailed depth in jobOptions file.
int dMUON
Used for setting depths in jobOptions file.
double runTime
Double for storing this run time.
void merge(const Report &rep)
int nev
number of processed events
double tMeson
Time spent on all mesons in volume.
double tBaryon
Time spent on other baryons in volume.
volumeData operator+=(const volumeData &acc)
< Structure of data for given volume
double tPhoton
Time spent on photons in volume.
double tTotal
Overloaded += operator.
double tPion
Time spent on pions in volume.
double tNeutron
Time spent on neutrons in volume.
double tOther
Time spent on all other particles in volume (mostly nuclei)
double tLepton
Time spent on other leptons in volume.
double tElectron
Time spent on e objects in volume.