ATLAS Offline Software
MonitorAlgorithmClass.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "../counters/CounterAlgorithmClass.h"
7 
10 }
11 
13 
14  for (const xAOD::TrigComposite* tc : data.costCollection()) {
15  const uint32_t slot = tc->getDetail<uint32_t>("slot");
16  if (slot != data.onlineSlot()) {
17  continue; // When monitoring the master slot, this Monitor ignores algs running in different slots
18  }
19  const uint32_t nameHash = tc->getDetail<TrigConf::HLTHash>("alg");
20  const std::string& name = data.algNameToClassType(nameHash);
21  ATH_CHECK( getCounter(name)->newEvent(data, tc->index(), weight) );
22  }
23 
24  return StatusCode::SUCCESS;
25 }
26 
27 
28 std::unique_ptr<CounterBase> MonitorAlgorithmClass::newCounter(const std::string& name) {
29  return std::make_unique<CounterAlgorithmClass>(name, this);
30 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MonitorAlgorithmClass::MonitorAlgorithmClass
MonitorAlgorithmClass()=delete
Forbid default constructor.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TrigConf::HLTHash
uint32_t HLTHash
Definition: TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:19
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
MonitorAlgorithmClass.h
MonitorBase::getCounter
CounterBase * getCounter(const std::string &name)
Retrieve counter by name.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.cxx:52
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
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MonitorBase
Forward declare.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/MonitorBase.h:33
MonitorAlgorithmClass::newCounter
virtual std::unique_ptr< CounterBase > newCounter(const std::string &name) override
Concrete counter instantiation.
Definition: MonitorAlgorithmClass.cxx:28
MonitoredRange
Container which represents a time range and holds a collection of Monitors which monitor this range.
Definition: MonitoredRange.h:29
MonitorAlgorithmClass::newEvent
virtual StatusCode newEvent(const CostData &data, const float weight=1.) override
Concrete dispatch method.
Definition: MonitorAlgorithmClass.cxx:12
CostData
Caches and propagates event data to be used by monitoring algorithms.
Definition: CostData.h:26