#include <MonitorChain.h>
|
| | MonitorChain ()=delete |
| | Forbid default constructor.
|
| | MonitorChain (const std::string &name, const MonitoredRange *parent) |
| | Construct monitor.
|
| virtual | ~MonitorChain ()=default |
| | Default destructor.
|
| MonitorChain & | operator= (const MonitorChain &)=delete |
| | Forbid assignment.
|
| | MonitorChain (const MonitorChain &)=delete |
| | Forbid copy.
|
| virtual StatusCode | newEvent (const CostData &data, const float weight=1.) override |
| | Concrete dispatch method.
|
| virtual std::unique_ptr< CounterBase > | newCounter (const std::string &name) override |
| | Concrete counter instantiation.
|
| std::unique_ptr< CounterBase > | newCounter (const std::string &name, unsigned nROS) |
| | Concrete counter instantiation.
|
| const std::string & | getName () const |
| | Getter for Monitor's name.
|
| const MonitoredRange * | getParent () const |
| | Return cached non-owning const ptr to this Monitor's parent Range.
|
| TH1 * | bookGetPointer (TH1 *hist, const std::string &tDir="") const |
| | Appends Monitor name (to histogram path) and forwards histogram book request to parent Range.
|
| bool | counterExists (const std::string &name) const |
| | Check if a counter of a given name exists.
|
| CounterBase * | getCounter (const std::string &name) |
| | Retrieve counter by name.
|
| virtual StatusCode | endEvent (float weight=1.) |
| | Called by the framework.
|
| MsgStream & | msg () |
| | Logging.
|
| MsgStream & | msg (const MSG::Level lvl) |
| | Logging on a given level.
|
| bool | msgLvl (const MSG::Level lvl) |
| | Returns if requested level is same or higher than logging level.
|
Definition at line 15 of file MonitorChain.h.
◆ MonitorChain() [1/3]
| MonitorChain::MonitorChain |
( |
| ) |
|
|
delete |
Forbid default constructor.
◆ MonitorChain() [2/3]
| MonitorChain::MonitorChain |
( |
const std::string & | name, |
|
|
const MonitoredRange * | parent ) |
Construct monitor.
- Parameters
-
| [in] | name | Monitor's name |
| [in] | parent | Monitor's parent Range, cached non-owning pointer. |
Definition at line 8 of file MonitorChain.cxx.
10}
MonitorBase()=delete
Forbid default constructor.
◆ ~MonitorChain()
| virtual MonitorChain::~MonitorChain |
( |
| ) |
|
|
virtualdefault |
◆ MonitorChain() [3/3]
◆ bookGetPointer()
| TH1 * MonitorBase::bookGetPointer |
( |
TH1 * | hist, |
|
|
const std::string & | tDir = "" ) const |
|
inherited |
Appends Monitor name (to histogram path) and forwards histogram book request to parent Range.
- Parameters
-
| [in] | hist | Bare pointer to histogram. Ownership transferred to THistSvc. |
| [in] | tDir | Histogram name & directory. |
- Returns
- Cached pointer to histogram. Used to fill histogram without having to perform THishSvc lookup.
Definition at line 37 of file Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx.
37 {
39 if (tDir != "") {
42 }
44}
const MonitoredRange * getParent() const
Return cached non-owning const ptr to this Monitor's parent Range.
const std::string & getName() const
Getter for Monitor's name.
TH1 * bookGetPointer(TH1 *hist, const std::string &tDir="") const
Appends Range's name (to histogram path) and forwards histogram book request to parent Athena algorit...
◆ counterExists()
| bool MonitorBase::counterExists |
( |
const std::string & | name | ) |
const |
|
inherited |
Check if a counter of a given name exists.
- Parameters
-
- Returns
- True if counter already exists.
Definition at line 47 of file Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx.
47 {
49}
std::unordered_map< std::string, std::unique_ptr< CounterBase > > m_counters
Storage of Monitor's collection of Counters.
◆ endEvent()
| StatusCode MonitorBase::endEvent |
( |
float | weight = 1. | ) |
|
|
virtualinherited |
Called by the framework.
Causes per-Event Variables to fill their histograms with their accumulated data.
Definition at line 29 of file Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx.
29 {
31 ATH_CHECK( nameCounterPair.second->endEvent(weight) );
32 }
33 return StatusCode::SUCCESS;
34}
#define ATH_CHECK
Evaluate an expression and check for errors.
◆ getCounter()
| CounterBase * MonitorBase::getCounter |
( |
const std::string & | name | ) |
|
|
inherited |
Retrieve counter by name.
If no such counter exists, a new one will be instanced and returned.
- Parameters
-
- Returns
- Mutable base-class pointer to Counter.
Definition at line 52 of file Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx.
52 {
55 return it->second.get();
56 }
57
60 return it->second.get();
61}
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name)=0
Pure virtual Counter instantiation specialisation.
◆ getName()
| const std::string & MonitorBase::getName |
( |
| ) |
const |
|
inherited |
◆ getParent()
◆ msg() [1/2]
| MsgStream & MonitorBase::msg |
( |
| ) |
|
|
inherited |
◆ msg() [2/2]
| MsgStream & MonitorBase::msg |
( |
const MSG::Level | lvl | ) |
|
|
inherited |
◆ msgLvl()
| bool MonitorBase::msgLvl |
( |
const MSG::Level | lvl | ) |
|
|
inherited |
◆ newCounter() [1/2]
| std::unique_ptr< CounterBase > MonitorChain::newCounter |
( |
const std::string & | name | ) |
|
|
overridevirtual |
Concrete counter instantiation.
Mints named counter of CounterAlgorith type.
- Parameters
-
| [in] | name | Name of Counter to mint. |
- Returns
- Owning unique ptr object typed on the CounterBase base class which points to concrete Counter of specialised type.
Implements MonitorBase.
Definition at line 27 of file MonitorChain.cxx.
27 {
28 return std::make_unique<CounterChain>(name, this);
29}
◆ newCounter() [2/2]
| std::unique_ptr< CounterBase > MonitorChain::newCounter |
( |
const std::string & | name, |
|
|
unsigned | nROS ) |
Concrete counter instantiation.
Mints named counter of CounterAlgorith type.
- Parameters
-
| [in] | name | Name of Counter to mint. |
| [in] | nROS | Number of possible ROB ids to initialize ROB monitoring histograms |
- Returns
- Owning unique ptr object typed on the CounterBase base class which points to concrete Counter of specialised type.
Definition at line 31 of file MonitorChain.cxx.
31 {
32 return std::make_unique<CounterChain>(name, nROS, this);
33}
◆ newEvent()
| StatusCode MonitorChain::newEvent |
( |
const CostData & | data, |
|
|
const float | weight = 1. ) |
|
overridevirtual |
Concrete dispatch method.
Iterate over all Algorithms in event data and dispatch to owned Counters
- Parameters
-
| [in] | data | Access to event data |
| [in] | weight | Global event weight |
Implements MonitorBase.
Definition at line 12 of file MonitorChain.cxx.
12 {
13
14 const std::vector<TrigCompositeUtils::AlgToChainTool::ChainInfo>& seededChains =
data.seededChains();
15 for (
size_t i = 0;
i < seededChains.size(); ++
i){
16 std::string chainName = seededChains[
i].name;
18
20 }
22 }
23
24 return StatusCode::SUCCESS;
25}
char data[hepevt_bytes_allocation_ATLAS]
CounterBase * getCounter(const std::string &name)
Retrieve counter by name.
bool counterExists(const std::string &name) const
Check if a counter of a given name exists.
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
◆ operator=()
◆ m_counters
| std::unordered_map< std::string, std::unique_ptr<CounterBase> > MonitorBase::m_counters |
|
protectedinherited |
◆ m_msgStream
| MsgStream MonitorBase::m_msgStream |
|
protectedinherited |
◆ m_name
| const std::string MonitorBase::m_name |
|
privateinherited |
◆ m_parent
The documentation for this class was generated from the following files: