ATLAS Offline Software
Loading...
Searching...
No Matches
FwdAFPCountMonitoringAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
11FwdAFPCountMonitoringAlg::FwdAFPCountMonitoringAlg(const std::string& name, ISvcLocator* pSvcLocator)
12 : AthMonitorAlgorithm(name, pSvcLocator) {}
13
17
18StatusCode FwdAFPCountMonitoringAlg::fillHistograms([[maybe_unused]] const EventContext& context) const {
19 using namespace Monitored;
20
21 const auto& trigDecTool = getTrigDecisionTool();
22
23 std::vector<std::string> passedChains{};
24 std::copy_if(m_chains.begin(), m_chains.end(), std::back_inserter(passedChains),
25 [&trigDecTool](const auto& chain) { return trigDecTool->isPassed(chain, TrigDefs::requireDecision); });
26
27 if (passedChains.size() > 0) {
28 ATH_MSG_DEBUG("Passed chains (" << passedChains.size() << "):");
29
30 for (const auto& chain : passedChains) {
31 ATH_MSG_DEBUG('\t' << chain);
32 }
33 }
34
35 auto counts = Collection("counts", passedChains);
36 fill("AFPCount", counts);
37
38 return StatusCode::SUCCESS;
39}
#define ATH_MSG_DEBUG(x)
virtual StatusCode initialize() override
initialize
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
FwdAFPCountMonitoringAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::vector< std::string > > m_chains
virtual StatusCode initialize() override
initialize
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
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.
Generic monitoring tool for athena components.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.