ATLAS Offline Software
StopwatchModule.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef EVENT_LOOP__STOPWATCH_MODULE_H
10 #define EVENT_LOOP__STOPWATCH_MODULE_H
11 
12 #include <EventLoop/Global.h>
13 
14 #include <EventLoop/Module.h>
15 #include <TH1.h>
16 #include <TStopwatch.h>
17 
18 namespace EL
19 {
20  namespace Detail
21  {
23 
24  class StopwatchModule final : public Module
25  {
26  //
27  // public interfacce
28  //
29 
30  public:
31 
32  using Module::Module;
33 
34  virtual StatusCode firstInitialize (ModuleData& data) override;
35  virtual StatusCode onFileExecute (ModuleData& data) override;
36  virtual StatusCode postFinalize (ModuleData& data) override;
37  virtual StatusCode onWorkerEnd (ModuleData& data) override;
38 
39  //
40  // private interface
41  //
42 
44  private:
45  std::unique_ptr<TH1> m_runTime {nullptr};
46 
48  private:
49  std::unique_ptr<TStopwatch> m_stopwatch;
50  };
51  }
52 }
53 
54 #endif
EL::Detail::StopwatchModule::onFileExecute
virtual StatusCode onFileExecute(ModuleData &data) override
actions just before fileExecute is called on algorithms
Definition: StopwatchModule.cxx:49
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition: ModuleData.h:64
EL::Detail::StopwatchModule
a Module wrapping the TStopwatch class
Definition: StopwatchModule.h:25
Module.h
EL::Detail::StopwatchModule::onWorkerEnd
virtual StatusCode onWorkerEnd(ModuleData &data) override
action at the end of the worker job
Definition: StopwatchModule.cxx:72
EL::Detail::ManagerStep::final
@ final
EL::Detail::StopwatchModule::postFinalize
virtual StatusCode postFinalize(ModuleData &data) override
actions after algorithms have been finalized
Definition: StopwatchModule.cxx:58
EL::Detail::Module
the base class for EventLoop instrumentation module
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/Module.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::Detail::StopwatchModule::m_stopwatch
std::unique_ptr< TStopwatch > m_stopwatch
the stop watch we use for measuring total time spend
Definition: StopwatchModule.h:49
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::Detail::StopwatchModule::m_runTime
std::unique_ptr< TH1 > m_runTime
the run time summary histogram
Definition: StopwatchModule.h:45
xAOD::DiTauJetParameters::Detail
Detail
Definition: DiTauDefs.h:38
Global.h
EL::Detail::StopwatchModule::firstInitialize
virtual StatusCode firstInitialize(ModuleData &data) override
action at the the very beginning of the worker job
Definition: StopwatchModule.cxx:29