ATLAS Offline Software
|
#include <MetricsSvc.h>
Public Member Functions | |
void | testInvariant () const |
effects: test the invariant of this object guarantee: no-fail More... | |
MetricsSvc () | |
effects: standard constructor. More... | |
~MetricsSvc () | |
effects: standard destructor. More... | |
virtual const char * | GetName () const override |
effects: return the name of this algorithm guarantee: no-fail More... | |
IWorker * | wk () const |
description: the worker that is controlling us guarantee: no-fail More... | |
void | book (const TH1 &hist) |
book the given histogram More... | |
TH1 * | hist (const std::string &name) const |
get the histogram with the given name More... | |
asg::SgTEvent * | evtStore () const |
get the (main) event store for this algorithm More... | |
virtual const std::string & | name () const |
Static Public Attributes | |
static const std::string | name |
description: the name of the service More... | |
Private Member Functions | |
virtual StatusCode | fileExecute () override |
effects: do all the processing that needs to be done once per file guarantee: no-fail More... | |
virtual StatusCode | endOfFile () override |
effects: do the post-processing for each input file guarantee: basic failures: out of memory failures: in/out trees or input file not available More... | |
virtual StatusCode | histInitialize () override |
effects: create the output TTrees guarantee: basic failures: out of memory failures: output already exists More... | |
virtual StatusCode | execute () override |
effects: process the next event guarantee: no-fail More... | |
virtual StatusCode | histFinalize () override |
effects: do the job post-processing guarantee: basic failures: out of memory failures: in/out trees or input file not available More... | |
ClassDef (MetricsSvc, 1) | |
virtual StatusCode | setupJob (Job &job) |
effects: give the algorithm a chance to intialize the job with anything this algorithm needs. More... | |
virtual StatusCode | changeInput (bool firstFile) |
effects: do all changes to work with a new input file, e.g. More... | |
virtual StatusCode | initialize () |
effects: do everything that needs to be done before running the algorithm, e.g. More... | |
virtual StatusCode | postExecute () |
effects: do the post-processing for the event guarantee: basic failures: algorithm dependent rationale: this is mainly used for specialized services that need to get input from subsequent algorithms before filling their event data More... | |
virtual StatusCode | finalize () |
effects: do everything that needs to be done after completing work on this worker guarantee: basic failures: algorithm dependent rationale: currently there is no use foreseen, but this routine is provided regardless More... | |
virtual bool | hasName (const std::string &name) const |
returns: whether this algorithm has the given name guarantee: basic failures: algorithm dependent rationale: this is to allow an algorithm to be known by multiple names. More... | |
void | sysSetupJob (Job &job) |
effects: give the algorithm a chance to intialize the job with anything this algorithm needs. More... | |
Private Attributes | |
TTree * | m_fileMetrics |
description: the file cache metrics More... | |
TTree * | m_jobMetrics |
description: the job metrics More... | |
Int_t | m_filesRead |
description: the number of files processed More... | |
Int_t | m_eventsRead |
description: the number of events processed More... | |
TBenchmark * | m_benchmark |
description: the benchmark object used rationale: this is a pointer to avoid including the header in this file More... | |
IWorker * | m_wk |
asg::SgTEvent * | m_evtStorePtr = nullptr |
the value of evtStore More... | |
asg::SgTEvent | m_evtStore |
when configured, the object returned by evtStore More... | |
MsgStream * | m_msg = nullptr |
the message stream, if it has been instantiated More... | |
std::string | m_msgName |
the algorithm name for which the message stream has been instantiated More... | |
int | m_msgLevel = 3 |
the message level configured More... | |
std::string | m_nameCache |
the cache for name More... | |
Definition at line 18 of file MetricsSvc.h.
EL::MetricsSvc::MetricsSvc | ( | ) |
EL::MetricsSvc::~MetricsSvc | ( | ) |
|
inherited |
book the given histogram
|
privatevirtualinherited |
effects: do all changes to work with a new input file, e.g.
set new branch addresses. if firstFile is set, this method is called just before init() is called
Warning: If a file is split across multiple jobs this will be called more than once. This only happens for specific batch drivers and/or if it is explicitly configured by the user. With PROOF it could even happen multiple times within the same job, and while PROOF is no longer supported that behavior may come back if support for a similar framework is added in the future. As such, this method should not be used for accounting that relies to be called exactly once per file, take a look at fileExecute() if you want something that is guaranteed to be executed exactly once per input file.
Warning: The execution order of changeInput and fileExecute is currently unspecified.
guarantee: basic failures: algorithm dependent
Reimplemented in EL::DuplicateChecker, EL::UnitTestAlg1, EL::UnitTestAlg, EL::UnitTestAlgXAOD, EL::NTupleSvc, MD::FormulaSvc, and EL::UnitTestSkim.
|
private |
|
overrideprivatevirtual |
effects: do the post-processing for each input file guarantee: basic failures: out of memory failures: in/out trees or input file not available
Reimplemented from EL::Algorithm.
Definition at line 75 of file MetricsSvc.cxx.
|
inherited |
get the (main) event store for this algorithm
This is mostly to mirror the method of the same name in AthAlgorithm, allowing to make the tutorial instructions more dual-use.
|
overrideprivatevirtual |
effects: process the next event guarantee: no-fail
Reimplemented from EL::Algorithm.
Definition at line 110 of file MetricsSvc.cxx.
|
overrideprivatevirtual |
effects: do all the processing that needs to be done once per file guarantee: no-fail
Reimplemented from EL::Algorithm.
Definition at line 66 of file MetricsSvc.cxx.
|
privatevirtualinherited |
effects: do everything that needs to be done after completing work on this worker guarantee: basic failures: algorithm dependent rationale: currently there is no use foreseen, but this routine is provided regardless
Reimplemented in EL::UnitTestAlg1, EL::UnitTestAlg, and EL::UnitTestAlgXAOD.
|
overridevirtual |
effects: return the name of this algorithm guarantee: no-fail
Definition at line 28 of file MetricsSvc.cxx.
|
privatevirtualinherited |
returns: whether this algorithm has the given name guarantee: basic failures: algorithm dependent rationale: this is to allow an algorithm to be known by multiple names.
this is needed for NTupleSvc, so that it can be located with and without the output tree name.
Reimplemented in EL::NTupleSvc.
|
inherited |
get the histogram with the given name
|
overrideprivatevirtual |
effects: do the job post-processing guarantee: basic failures: out of memory failures: in/out trees or input file not available
Reimplemented from EL::Algorithm.
Definition at line 119 of file MetricsSvc.cxx.
|
overrideprivatevirtual |
effects: create the output TTrees guarantee: basic failures: out of memory failures: output already exists
Reimplemented from EL::Algorithm.
Definition at line 52 of file MetricsSvc.cxx.
|
privatevirtualinherited |
effects: do everything that needs to be done before running the algorithm, e.g.
create output n-tuples and histograms. this method is called only once right after changeInput(true) is called guarantee: basic failures: algorithm dependent rationale: in principle all this work could be done on changeInput(true). However, providing this method should make it easier for the user to set up all his outputs and to do so only once.
Reimplemented in EL::DuplicateChecker, EL::UnitTestAlg1, EL::UnitTestAlg, EL::UnitTestAlgXAOD, EL::NTupleSvc, EL::AlgSelect, MD::AlgHist, MD::AlgCFlow, and EL::UnitTestSkim.
|
inherited |
messaging interface
this is the interface to work with the standard messaging macros from AsgTools. Instead of enums I pass ints, so that I can avoid the include dependency (forward declarations are only allowed for enum classes AFAIK).
the standard message stream for this object
|
inherited |
the message stream for this object, configured for the given level
|
inherited |
whether we are configured to print messages at the given level
|
virtualinherited |
|
privatevirtualinherited |
effects: do the post-processing for the event guarantee: basic failures: algorithm dependent rationale: this is mainly used for specialized services that need to get input from subsequent algorithms before filling their event data
Reimplemented in EL::NTupleSvc.
|
inherited |
set the message level for the message stream for this object
|
privatevirtualinherited |
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
this method is automatically called before the algorithm is actually added to the job. guarantee: basic failures: algorithm dependent rationale: this is currently used to give algorithms a chance to register their output datasets, but can also be used for other stuff.
Reimplemented in EL::DuplicateChecker, EL::UnitTestAlg1, EL::UnitTestAlg, EL::UnitTestAlgXAOD, EL::VomsProxySvc, EL::NTupleSvc, EL::AlgSelect, MD::AlgHist, and MD::AlgCFlow.
|
privateinherited |
effects: give the algorithm a chance to intialize the job with anything this algorithm needs.
this method is automatically called before the algorithm is actually added to the job. guarantee: basic failures: algorithm dependent rationale: this is currently used to give algorithms a chance to register their output datasets, but can also be used for other stuff.
void EL::MetricsSvc::testInvariant | ( | ) | const |
effects: test the invariant of this object guarantee: no-fail
Definition at line 23 of file MetricsSvc.cxx.
|
inherited |
description: the worker that is controlling us guarantee: no-fail
|
private |
description: the benchmark object used rationale: this is a pointer to avoid including the header in this file
Definition at line 117 of file MetricsSvc.h.
|
private |
description: the number of events processed
Definition at line 112 of file MetricsSvc.h.
|
mutableprivateinherited |
when configured, the object returned by evtStore
Definition at line 329 of file Algorithm.h.
|
mutableprivateinherited |
the value of evtStore
Definition at line 325 of file Algorithm.h.
|
private |
description: the file cache metrics
Definition at line 100 of file MetricsSvc.h.
|
private |
description: the number of files processed
Definition at line 108 of file MetricsSvc.h.
|
private |
description: the job metrics
Definition at line 104 of file MetricsSvc.h.
|
mutableprivateinherited |
the message stream, if it has been instantiated
Definition at line 333 of file Algorithm.h.
|
privateinherited |
the message level configured
Definition at line 342 of file Algorithm.h.
|
mutableprivateinherited |
the algorithm name for which the message stream has been instantiated
Definition at line 338 of file Algorithm.h.
|
mutableprivateinherited |
the cache for name
Definition at line 346 of file Algorithm.h.
|
privateinherited |
Definition at line 321 of file Algorithm.h.
|
static |
description: the name of the service
Definition at line 26 of file MetricsSvc.h.