ATLAS Offline Software
MonitorChain.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MonitorChain.h"
6 #include "../counters/CounterChain.h"
7 
10 }
11 
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;
17  if (!counterExists(chainName)){
18  // Create a new counter using specialized constructor in order to pass number of bins for some of the histograms
19  m_counters.insert( std::make_pair(chainName, newCounter(chainName, data.costROSData().getNROS())) );
20  }
22  }
23 
24  return StatusCode::SUCCESS;
25 }
26 
27 std::unique_ptr<CounterBase> MonitorChain::newCounter(const std::string& name) {
28  return std::make_unique<CounterChain>(name, this);
29 }
30 
31 std::unique_ptr<CounterBase> MonitorChain::newCounter(const std::string& name, unsigned nROS) {
32  return std::make_unique<CounterChain>(name, nROS, this);
33 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MonitorBase::m_counters
std::unordered_map< std::string, std::unique_ptr< CounterBase > > m_counters
Storage of Monitor's collection of Counters.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h:138
MonitorChain::newEvent
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
Definition: MonitorChain.cxx:12
MonitorBase::counterExists
bool counterExists(const std::string &name) const
Check if a counter of a given name exists.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx:47
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
MonitorChain.h
MonitorBase::getCounter
CounterBase * getCounter(const std::string &name)
Retrieve counter by name.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MonitorBase
Forward declare.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h:33
MonitoredRange
Container which represents a time range and holds a collection of Monitors which monitor this range.
Definition: MonitoredRange.h:29
MonitorChain::MonitorChain
MonitorChain()=delete
Forbid default constructor.
MonitorChain::newCounter
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
Definition: MonitorChain.cxx:27
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
CostData
Caches and propagates event data to be used by monitoring algorithms.
Definition: CostData.h:26