ATLAS Offline Software
FwdAFPCountMonitoringAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 
10 FwdAFPCountMonitoringAlg::FwdAFPCountMonitoringAlg(const std::string& name, ISvcLocator* pSvcLocator)
11  : AthMonitorAlgorithm(name, pSvcLocator) {}
12 
15 }
16 
17 StatusCode FwdAFPCountMonitoringAlg::fillHistograms([[maybe_unused]] const EventContext& context) const {
18  using namespace Monitored;
19 
20  const auto& trigDecTool = getTrigDecisionTool();
21 
22  std::vector<std::string> passedChains{};
23  std::copy_if(m_chains.begin(), m_chains.end(), std::back_inserter(passedChains),
24  [&trigDecTool](const auto& chain) { return trigDecTool->isPassed(chain, TrigDefs::requireDecision); });
25 
26  if (passedChains.size() > 0) {
27  ATH_MSG_DEBUG("Passed chains (" << passedChains.size() << "):");
28 
29  for (const auto& chain : passedChains) {
30  ATH_MSG_DEBUG('\t' << chain);
31  }
32  }
33 
34  auto counts = Collection("counts", passedChains);
35  fill("AFPCount", counts);
36 
37  return StatusCode::SUCCESS;
38 }
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
AthMsgStreamMacros.h
AthMonitorAlgorithm::getTrigDecisionTool
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Definition: AthMonitorAlgorithm.cxx:189
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
MonitoredCollection.h
Monitored
Generic monitoring tool for athena components.
Definition: GenericMonitoringTool.h:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
FwdAFPCountMonitoringAlg.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FwdAFPCountMonitoringAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: FwdAFPCountMonitoringAlg.cxx:13
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
FwdAFPCountMonitoringAlg::FwdAFPCountMonitoringAlg
FwdAFPCountMonitoringAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FwdAFPCountMonitoringAlg.cxx:10
FwdAFPCountMonitoringAlg::m_chains
Gaudi::Property< std::vector< std::string > > m_chains
Definition: FwdAFPCountMonitoringAlg.h:24
FwdAFPCountMonitoringAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
Definition: FwdAFPCountMonitoringAlg.cxx:17