ATLAS Offline Software
MetricsSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EVENT_LOOP_METRICS_SVC_H
6 #define EVENT_LOOP_METRICS_SVC_H
7 
10 
11 #include <EventLoop/Algorithm.h>
12 
13 class TBenchmark;
14 class TTree;
15 
16 namespace EL
17 {
18  class MetricsSvc : public EL::Algorithm
19  {
20  //
21  // public interface
22  //
23 
25  public:
26  static const std::string name;
27 
28 
31  public:
32  void testInvariant () const;
33 
34 
37  public:
38  MetricsSvc ();
39 
42  public:
43  ~MetricsSvc ();
44 
45 
46 
47  //
48  // interface inherited from Algorithm
49  //
50 
53  public:
54  virtual const char *GetName () const override;
55 
56 
59  private:
60  virtual StatusCode fileExecute () override;
61 
62 
67  private:
68  virtual StatusCode endOfFile () override;
69 
70 
75  private:
76  virtual StatusCode histInitialize () override;
77 
78 
81  private:
82  virtual StatusCode execute () override;
83 
84 
89  private:
90  virtual StatusCode histFinalize () override;
91 
92 
93 
94  //
95  // private interface
96  //
97 
99  private:
100  TTree *m_fileMetrics;
101 
103  private:
104  TTree *m_jobMetrics;
105 
107  private:
108  Int_t m_filesRead;
109 
111  private:
112  Int_t m_eventsRead;
113 
116  private:
117  TBenchmark *m_benchmark;
118 
119 #pragma GCC diagnostic push
120 #pragma GCC diagnostic ignored "-Wpragmas"
121 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
122 #pragma GCC diagnostic ignored "-Winconsistent-missing-override"
124 #pragma GCC diagnostic pop
125  };
126 }
127 
128 
129 #endif
EL::MetricsSvc::fileExecute
virtual StatusCode fileExecute() override
effects: do all the processing that needs to be done once per file guarantee: no-fail
Definition: MetricsSvc.cxx:66
EL::MetricsSvc::name
static const std::string name
description: the name of the service
Definition: MetricsSvc.h:26
EL::MetricsSvc::~MetricsSvc
~MetricsSvc()
effects: standard destructor.
Definition: MetricsSvc.cxx:44
EL::MetricsSvc::ClassDef
ClassDef(MetricsSvc, 1)
EL::MetricsSvc::histFinalize
virtual StatusCode histFinalize() override
effects: do the job post-processing guarantee: basic failures: out of memory failures: in/out trees o...
Definition: MetricsSvc.cxx:119
EL::MetricsSvc::m_benchmark
TBenchmark * m_benchmark
description: the benchmark object used rationale: this is a pointer to avoid including the header in ...
Definition: MetricsSvc.h:117
EL::MetricsSvc::m_eventsRead
Int_t m_eventsRead
description: the number of events processed
Definition: MetricsSvc.h:112
EL::Algorithm
Definition: Algorithm.h:22
EL::MetricsSvc::histInitialize
virtual StatusCode histInitialize() override
effects: create the output TTrees guarantee: basic failures: out of memory failures: output already e...
Definition: MetricsSvc.cxx:52
EL::MetricsSvc::execute
virtual StatusCode execute() override
effects: process the next event guarantee: no-fail
Definition: MetricsSvc.cxx:110
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Algorithm.h
EL::MetricsSvc::m_filesRead
Int_t m_filesRead
description: the number of files processed
Definition: MetricsSvc.h:108
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::MetricsSvc::GetName
virtual const char * GetName() const override
effects: return the name of this algorithm guarantee: no-fail
Definition: MetricsSvc.cxx:28
EL::MetricsSvc::MetricsSvc
MetricsSvc()
effects: standard constructor.
Definition: MetricsSvc.cxx:35
EL::MetricsSvc::m_jobMetrics
TTree * m_jobMetrics
description: the job metrics
Definition: MetricsSvc.h:104
EL::MetricsSvc::m_fileMetrics
TTree * m_fileMetrics
description: the file cache metrics
Definition: MetricsSvc.h:100
EL::MetricsSvc
Definition: MetricsSvc.h:19
EL::MetricsSvc::endOfFile
virtual StatusCode endOfFile() override
effects: do the post-processing for each input file guarantee: basic failures: out of memory failures...
Definition: MetricsSvc.cxx:75
EL::MetricsSvc::testInvariant
void testInvariant() const
effects: test the invariant of this object guarantee: no-fail
Definition: MetricsSvc.cxx:23