|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/ITHistSvc.h"
13 const std::string&
name,
16 m_histSvc(
"THistSvc",
name)
23 return StatusCode::SUCCESS;
26 std::unique_ptr<TestActionTimer>
30 auto action = std::make_unique<TestActionTimer>();
45 G4double sumVTime = 0.;
46 G4double sumPTime = 0.;
51 ATH_MSG_INFO(
"****** TestActionTimer: Beginning timer dump ******");
53 G4double DeadTime =
report.runTime - sumVTime;
54 G4double OtherPart =
report.runTime - DeadTime - sumPTime;
68 ATH_MSG_INFO(
"****** TestActionTimer: Major Subdet Times per Event *********");
79 ATH_MSG_INFO(
"******* TestActionTimer: Major Subdet Frac per Event *********");
90 ATH_MSG_INFO(
"******* TestActionTimer: Timer Information *********");
91 ATH_MSG_INFO(
"NOTE: in case of MT runs, the timings for the individual threads are added, i.e. it is");
92 ATH_MSG_INFO(
" equivalent to running the N threads sequentially instead of in parallel.");
93 ATH_MSG_INFO(
"Timers were run over " <<
report.nev <<
" events, and the averages were taken by");
94 ATH_MSG_INFO(
"detector portion. Detectors are determined by volume name. Pieces include:");
95 ATH_MSG_INFO(
"EMB, EMEC, FCAL, HEC, Tile - the sampling portions of the calorimeters.");
96 ATH_MSG_INFO(
"Pixel, SCT, TRT - the sensitive portions of the tracker only");
97 ATH_MSG_INFO(
"InDetSvc - all remaining portions of the inner detector");
98 ATH_MSG_INFO(
"Oth.LAr - all remaining portions of the LAr, including preshower, solenoid,");
100 ATH_MSG_INFO(
"Other - volumes not listed, including ATLAS::ATLAS and CALO::CALO");
102 ATH_MSG_INFO(
"Dead time includes overhead per event (file i/o, event loading, timing overhead)");
104 ATH_MSG_INFO(
"All times are user+system time on your processor");
105 ATH_MSG_INFO(
"******* TestActionTimer: End of timer dump *********");
110 report.runTime -= DeadTime;
113 r_geo->GetXaxis()->SetBinLabel(
i+1 ,
report.timeName[
i].c_str() );
121 r_geo->SetXTitle(
"Detector Region");
122 r_part->SetXTitle(
"Particle Type");
123 r_geo->SetYTitle(
"Percent of Event Time");
124 r_part->SetYTitle(
"Percent of Event Time");
127 if (
m_histSvc->regHist(
"/simTime/GeoResults",r_geo).isFailure() ||
128 m_histSvc->regHist(
"/simTime/ParticleResults",r_part).isFailure() ){
135 ATH_MSG_INFO(
"******* TestActionTimer: Nothing to report, no events timed! *********");
137 }
else {
ATH_MSG_INFO(
"******* TestActionTimer: No timing information recoreded! *********");}
138 return StatusCode::SUCCESS;
Struct for passing around user actions.
User action to measure time spent in subdetectors.
void merge(const Report &rep)
void accumulate(ResultType &result, Mapper mapOp, Reducer reduceOp)
Accumulate results across user actions with specified operations.
const Report & getReport() const
::StatusCode StatusCode
StatusCode definition for legacy code.
this holds all the data from individual threads that needs to be merged at EoR
std::vector< G4UserRunAction * > runActions
std::vector< G4UserEventAction * > eventActions
std::vector< G4UserSteppingAction * > steppingActions