Base class for RoI unpackers.
More...
#include <RoIsUnpackingToolBase.h>
Inherits extends< AthAlgTool, IRoIsUnpackingTool >.
Inherited by RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, ContainerName, ThresholdType >, EMRoIsUnpackingTool, FSRoIsUnpackingTool, JRoIsUnpackingTool, METRoIsUnpackingTool, MURoIsUnpackingTool, RoIsUnpackingEmulationTool, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, N_RoIContainer, N_ThresholdType >, and TAURoIsUnpackingTool.
|
| static std::string | getProbeThresholdName (const std::string &thresholdName) |
| | Concatenate the probe identifier string with the threshold name string.
|
Base class for RoI unpackers.
Provides common features needed by all unpackers. By itself it does not do anything useful.
Definition at line 32 of file RoIsUnpackingToolBase.h.
◆ ThrVec
◆ ThrVecRef
◆ RoIsUnpackingToolBase()
| RoIsUnpackingToolBase::RoIsUnpackingToolBase |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ addChainsToDecision()
Definition at line 88 of file RoIsUnpackingToolBase.cxx.
90 {
94 return;
95 }
96
98 for (
auto chainId:
chains->second ) {
99 if ( activeChains.find(chainId) != activeChains.end() ) {
100 ids.insert( chainId.numeric() );
101 ATH_MSG_DEBUG(
"Added " << chainId <<
" to the RoI/threshold decision " << thresholdId );
102 } else {
105
106 if ( activeChains.find( legIterator->second ) != activeChains.end() ) {
107 ids.insert( chainId.numeric() );
108 ATH_MSG_DEBUG(
"Added " << chainId <<
" to the RoI/threshold decision " << thresholdId );
109 }
110 }
111 }
112 }
114 ATH_MSG_DEBUG(
"Number of decisions in this RoI after adding chains using threshold " << thresholdId
116}
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
std::set< DecisionID > DecisionIDContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
◆ decodeMapping()
| StatusCode RoIsUnpackingToolBase::decodeMapping |
( |
std::function< bool(const std::string &)> && | filter | ) |
|
|
protected |
Fills mapping from L1 threshold -> to HLT chain.
- filter Function that, using the threshold name, defines if this decoder instance should take care of this threshold
Definition at line 52 of file RoIsUnpackingToolBase.cxx.
52 {
55
57
58 for ( const TrigConf::Chain& chain: *hltMenuHandle ) {
59 const HLT::Identifier chainIdentifier(
chain.name());
60 const std::vector<std::string> thresholds{
chain.l1thresholds() };
61 const std::vector<size_t> legMultiplicities{
chain.legMultiplicities() };
62 if (thresholds.size() != legMultiplicities.size()) {
63 ATH_MSG_ERROR(
"Encountered a chain " <<
chain.name() <<
" with " << legMultiplicities.size()
64 << " legs but only " << thresholds.size() << " thresholds. These should be the same.");
65 return StatusCode::FAILURE;
66 }
68 for ( const std::string& th: thresholds ) {
70 const HLT::Identifier thresholdIdentifier(th);
72 ATH_MSG_DEBUG(
"Associating " << chainIdentifier <<
" with threshold " << th );
73 if ( thresholds.size() > 1 ) {
77 ATH_MSG_DEBUG(
"Associating additional chain leg " << legIdentifier
78 << " with threshold " << thresholdIdentifier );
79 }
80 }
82 }
83 }
84 return StatusCode::SUCCESS;
85}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
◆ getL1Thresholds()
| StatusCode RoIsUnpackingToolBase::getL1Thresholds |
( |
const TrigConf::L1Menu & | l1Menu, |
|
|
const std::string & | thrType, |
|
|
std::optional< ThrVecRef > & | thrVec ) const |
|
protected |
Retrieve a vector of thresholds with type thrType from L1Menu.
- Parameters
-
| [in] | l1Menu | The L1Menu object |
| [in] | thrType | The threshold type, e.g. EM, MU, eTAU |
| [out] | thrVec | The output will be passed into this parameter |
- Returns
- FAILURE on exception reading the menu (e.g. thrType not in menu), SUCCESS otherwise
Definition at line 33 of file RoIsUnpackingToolBase.cxx.
35 {
36 try {
38 }
39 catch (const std::exception& ex) {
40 ATH_MSG_ERROR(
"Failed to retrieve " << thrType <<
" thresholds from L1 menu. Exception:" << ex.what());
41 return StatusCode::FAILURE;
42 }
43 return StatusCode::SUCCESS;
44}
◆ getProbeThresholdName()
| std::string RoIsUnpackingToolBase::getProbeThresholdName |
( |
const std::string & | thresholdName | ) |
|
|
staticprotected |
Concatenate the probe identifier string with the threshold name string.
Creates an alternate threshold name, used by lower pT probe legs of tag+probe chains.
Definition at line 47 of file RoIsUnpackingToolBase.cxx.
47 {
48 return "PROBE" + thresholdName;
49}
◆ initialize()
| StatusCode RoIsUnpackingToolBase::initialize |
( |
| ) |
|
|
overridevirtual |
should this really be here if it is only accessed in derived classes ?
Reimplemented in EMRoIsUnpackingTool, FSRoIsUnpackingTool, JRoIsUnpackingTool, METRoIsUnpackingTool, MURoIsUnpackingTool, RoIsUnpackingEmulationTool, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, N_RoIContainer, N_ThresholdType >, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, ContainerName, ThresholdType >, and TAURoIsUnpackingTool.
Definition at line 16 of file RoIsUnpackingToolBase.cxx.
16 {
17
22
28
29 return StatusCode::SUCCESS;
30}
◆ unpack() [1/2]
Reimplemented in EMRoIsUnpackingTool, FSRoIsUnpackingTool, JRoIsUnpackingTool, METRoIsUnpackingTool, MURoIsUnpackingTool, RoIsUnpackingEmulationTool, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, N_RoIContainer, N_ThresholdType >, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, ContainerName, ThresholdType >, and TAURoIsUnpackingTool.
Definition at line 40 of file RoIsUnpackingToolBase.h.
42 { return StatusCode::SUCCESS; }
◆ unpack() [2/2]
Reimplemented in EMRoIsUnpackingTool, FSRoIsUnpackingTool, JRoIsUnpackingTool, METRoIsUnpackingTool, MURoIsUnpackingTool, RoIsUnpackingEmulationTool, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, N_RoIContainer, N_ThresholdType >, RoIsUnpackingToolPhase1< T_RoI, T_RoIContainer, F_RoIWordGetter, ContainerName, ThresholdType >, and TAURoIsUnpackingTool.
Definition at line 44 of file RoIsUnpackingToolBase.h.
46 { return StatusCode::SUCCESS; }
◆ m_decisionsKey
Initial value:{
this, "Decisions", "RoIDecisions", "Decisions for each RoI"}
Definition at line 51 of file RoIsUnpackingToolBase.h.
51 {
52 this, "Decisions", "RoIDecisions", "Decisions for each RoI"};
◆ m_decisionsKeyProbe
Initial value:{
this, "DecisionsProbe", "", "Optional secondary set of Decisions for each RoI for probe a.k.a. delayed a.k.a. rerun chains"}
Definition at line 54 of file RoIsUnpackingToolBase.h.
54 {
55 this, "DecisionsProbe", "", "Optional secondary set of Decisions for each RoI for probe a.k.a. delayed a.k.a. rerun chains"};
◆ m_HLTMenuKey
Initial value:{
this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "Name of the HLTMenu object to read configuration from"}
Definition at line 63 of file RoIsUnpackingToolBase.h.
63 {
64 this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "Name of the HLTMenu object to read configuration from"};
◆ m_l1MenuKey
Initial value:{
this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "Name of the L1Menu object to read configuration from"}
Definition at line 60 of file RoIsUnpackingToolBase.h.
60 {
61 this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "Name of the L1Menu object to read configuration from"};
◆ m_legToChainMapping
◆ m_monTool
| ToolHandle<GenericMonitoringTool> RoIsUnpackingToolBase::m_monTool { this, "MonTool", "", "Monitoring tool" } |
|
protected |
◆ m_roiupdater
| ToolHandle<IRoiUpdaterTool> RoIsUnpackingToolBase::m_roiupdater { this, "RoiUpdater", "", "Roi Updater" } |
|
protected |
◆ m_thresholdToChainMapping
◆ m_trigRoIsKey
Initial value:{
this, "OutputTrigRoIs", "", "Name of the RoIs collection produced by the unpacker"}
Definition at line 57 of file RoIsUnpackingToolBase.h.
57 {
58 this, "OutputTrigRoIs", "", "Name of the RoIs collection produced by the unpacker"};
The documentation for this class was generated from the following files: