ATLAS Offline Software
RoIsUnpackingToolBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef HLTSEEDING_ROISUNPACKINGTOOLBASE_H
5 #define HLTSEEDING_ROISUNPACKINGTOOLBASE_H
6 
7 #include "IRoIsUnpackingTool.h"
8 
11 #include "TrigConfData/L1Menu.h"
12 #include "TrigConfData/HLTMenu.h"
15 
18 
20 
21 
22 namespace ROIB {
23  class RoIBResult;
24 }
25 
32 class RoIsUnpackingToolBase : public extends<AthAlgTool, IRoIsUnpackingTool> {
33 public:
34  RoIsUnpackingToolBase(const std::string& type,
35  const std::string& name,
36  const IInterface* parent);
37 
38  virtual StatusCode initialize() override;
39 
40  virtual StatusCode unpack(const EventContext& /*ctx*/,
41  const ROIB::RoIBResult& /*roib*/,
42  const HLT::IDSet& /*activeChains*/) const override { return StatusCode::SUCCESS; }
43 
44  virtual StatusCode unpack(const EventContext& /*ctx*/,
45  const xAOD::TrigComposite& /*l1TriggerResult*/,
46  const HLT::IDSet& /*activeChains*/) const override { return StatusCode::SUCCESS; }
47 
48 protected:
52  this, "Decisions", "RoIDecisions", "Decisions for each RoI"};
53 
55  this, "DecisionsProbe", "", "Optional secondary set of Decisions for each RoI for probe a.k.a. delayed a.k.a. rerun chains"};
56 
58  this, "OutputTrigRoIs", "", "Name of the RoIs collection produced by the unpacker"};
59 
61  this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "Name of the L1Menu object to read configuration from"};
62 
64  this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "Name of the HLTMenu object to read configuration from"};
66 
67  ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" };
68  ToolHandle<IRoiUpdaterTool> m_roiupdater{ this, "RoiUpdater", "", "Roi Updater" };
69 
70  std::map<HLT::Identifier, HLT::IDVec> m_thresholdToChainMapping;
71  std::map<HLT::Identifier, HLT::Identifier> m_legToChainMapping;
72 
73  using ThrVec = std::vector<std::shared_ptr<TrigConf::L1Threshold>>;
74  using ThrVecRef = std::reference_wrapper<const ThrVec>;
83  StatusCode getL1Thresholds(const TrigConf::L1Menu& l1Menu, const std::string& thrType, std::optional<ThrVecRef>& thrVec) const;
84 
90  static std::string getProbeThresholdName(const std::string& thresholdName);
91 
98  StatusCode decodeMapping( std::function< bool(const std::string&)>&& filter );
99 
100  void addChainsToDecision( HLT::Identifier thresholdId,
102  const HLT::IDSet& activeChains ) const;
103 };
104 
105 #endif
RoIsUnpackingToolBase::unpack
virtual StatusCode unpack(const EventContext &, const xAOD::TrigComposite &, const HLT::IDSet &) const override
Definition: RoIsUnpackingToolBase.h:44
RoIsUnpackingToolBase::m_roiupdater
ToolHandle< IRoiUpdaterTool > m_roiupdater
Definition: RoIsUnpackingToolBase.h:68
RoIsUnpackingToolBase
Base class for RoI unpackers.
Definition: RoIsUnpackingToolBase.h:32
TrigCompositeUtils.h
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
hist_file_dump.d
d
Definition: hist_file_dump.py:137
RoIsUnpackingToolBase::ThrVecRef
std::reference_wrapper< const ThrVec > ThrVecRef
Definition: RoIsUnpackingToolBase.h:74
RoIsUnpackingToolBase::addChainsToDecision
void addChainsToDecision(HLT::Identifier thresholdId, TrigCompositeUtils::Decision *d, const HLT::IDSet &activeChains) const
Definition: RoIsUnpackingToolBase.cxx:88
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
SG::ReadHandleKey< TrigConf::L1Menu >
ROIB
Namespace of the LVL1 RoIB simulation.
Definition: ILvl1ResultAccessTool.h:19
IRoIsUnpackingTool.h
covarianceTool.filter
filter
Definition: covarianceTool.py:514
GenericMonitoringTool.h
RoIsUnpackingToolBase::unpack
virtual StatusCode unpack(const EventContext &, const ROIB::RoIBResult &, const HLT::IDSet &) const override
Definition: RoIsUnpackingToolBase.h:40
RoIsUnpackingToolBase::m_decisionsKeyProbe
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_decisionsKeyProbe
Definition: RoIsUnpackingToolBase.h:54
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
RoIsUnpackingToolBase::decodeMapping
StatusCode decodeMapping(std::function< bool(const std::string &)> &&filter)
Fills mapping from L1 threshold -> to HLT chain.
Definition: RoIsUnpackingToolBase.cxx:52
RoIsUnpackingToolBase::m_legToChainMapping
std::map< HLT::Identifier, HLT::Identifier > m_legToChainMapping
Definition: RoIsUnpackingToolBase.h:71
RoIsUnpackingToolBase::getL1Thresholds
StatusCode getL1Thresholds(const TrigConf::L1Menu &l1Menu, const std::string &thrType, std::optional< ThrVecRef > &thrVec) const
Retrieve a vector of thresholds with type thrType from L1Menu.
Definition: RoIsUnpackingToolBase.cxx:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IRoiUpdaterTool.h
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
RoIsUnpackingToolBase::m_decisionsKey
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_decisionsKey
Definition: RoIsUnpackingToolBase.h:51
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
RoIsUnpackingToolBase::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: RoIsUnpackingToolBase.h:67
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
RoIsUnpackingToolBase::ThrVec
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
Definition: RoIsUnpackingToolBase.h:73
RoIsUnpackingToolBase::m_trigRoIsKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigRoIsKey
Definition: RoIsUnpackingToolBase.h:57
RoIsUnpackingToolBase::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: RoIsUnpackingToolBase.h:60
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HLTIdentifier.h
RoIsUnpackingToolBase::m_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
Definition: RoIsUnpackingToolBase.h:63
HLT::IDSet
std::set< HLT::Identifier > IDSet
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:63
RoIsUnpackingToolBase::initialize
virtual StatusCode initialize() override
Definition: RoIsUnpackingToolBase.cxx:16
HLTMenu.h
RoIsUnpackingToolBase::m_thresholdToChainMapping
std::map< HLT::Identifier, HLT::IDVec > m_thresholdToChainMapping
Definition: RoIsUnpackingToolBase.h:70
RoIsUnpackingToolBase::RoIsUnpackingToolBase
RoIsUnpackingToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition: RoIsUnpackingToolBase.cxx:10
L1Menu.h
TrigComposite.h
TrigRoiDescriptorCollection.h
RoIsUnpackingToolBase::getProbeThresholdName
static std::string getProbeThresholdName(const std::string &thresholdName)
Concatenate the probe identifier string with the threshold name string.
Definition: RoIsUnpackingToolBase.cxx:47