 |
ATLAS Offline Software
|
Obtains trigger bits from Navigation summary via getBits and (online) fills trigger bits in the HLTResultMT object.
More...
#include <TriggerBitsMakerTool.h>
Obtains trigger bits from Navigation summary via getBits and (online) fills trigger bits in the HLTResultMT object.
Definition at line 18 of file TriggerBitsMakerTool.h.
◆ ChainToBitMap
◆ TriggerBitsMakerTool()
TriggerBitsMakerTool::TriggerBitsMakerTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TriggerBitsMakerTool()
virtual TriggerBitsMakerTool::~TriggerBitsMakerTool |
( |
| ) |
|
|
overridevirtualdefault |
◆ fill()
StatusCode TriggerBitsMakerTool::fill |
( |
HLT::HLTResultMT & |
resultToFill, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Definition at line 136 of file TriggerBitsMakerTool.cxx.
139 boost::dynamic_bitset<uint32_t> passRaw;
140 boost::dynamic_bitset<uint32_t> prescaled;
147 const boost::dynamic_bitset<uint32_t>& passRawBits = resultToFill.
getHltPassRawBits();
148 std::vector<uint32_t> bitsTemp(passRawBits.num_blocks());
149 boost::to_block_range(passRawBits, bitsTemp.begin());
150 ATH_MSG_VERBOSE(
"HLT result now has " << bitsTemp.size() <<
" words with HLT pass raw bits:");
151 for (
const auto&
w : bitsTemp)
ATH_MSG_VERBOSE(
"0x" << MSG::hex <<
w << MSG::dec);
154 boost::to_block_range(prescaleBits, bitsTemp.begin());
155 ATH_MSG_VERBOSE(
"HLT result now has " << bitsTemp.size() <<
" words with HLT prescale bits:");
156 for (
const auto&
w : bitsTemp)
ATH_MSG_VERBOSE(
"0x" << MSG::hex <<
w << MSG::dec);
159 ATH_MSG_DEBUG(
"HLT result now has " <<
words.size() <<
" words with the final trigger bits:");
163 return StatusCode::SUCCESS;
◆ getBits()
StatusCode TriggerBitsMakerTool::getBits |
( |
boost::dynamic_bitset< uint32_t > & |
passRaw, |
|
|
boost::dynamic_bitset< uint32_t > & |
prescaled, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
< The chains which returned a positive decision
< The chains which did not run due to being prescaled out
Definition at line 76 of file TriggerBitsMakerTool.cxx.
86 if (!chainsHandle.isValid()) {
87 SmartIF<IAlgExecStateSvc> aess = svcLoc()->service<IAlgExecStateSvc>(
"AlgExecStateSvc",
false);
88 if (aess.isValid() && aess->eventStatus(ctx) != EventStatus::Success) {
90 return StatusCode::SUCCESS;
93 return StatusCode::FAILURE;
99 const Decision* HLTPassRaw =
nullptr;
100 const Decision* HLTPrescaled =
nullptr;
106 for (
const Decision* decisionObject : *chainsHandle) {
109 HLTPassRaw = decisionObject;
111 HLTPrescaled = decisionObject;
113 if (HLTPassRaw !=
nullptr && HLTPrescaled !=
nullptr) {
132 return StatusCode::SUCCESS;
◆ hashConsistencyCheck()
StatusCode TriggerBitsMakerTool::hashConsistencyCheck |
( |
const std::string & |
chain, |
|
|
const size_t |
hash |
|
) |
| const |
|
private |
Check that a chain's hash in the menu JSON (via python) agrees with the C++ implementation.
Definition at line 50 of file TriggerBitsMakerTool.cxx.
54 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
◆ initialize()
StatusCode TriggerBitsMakerTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ preInsertCheck()
StatusCode TriggerBitsMakerTool::preInsertCheck |
( |
const std::string & |
chain, |
|
|
const uint32_t |
bit |
|
) |
| const |
|
private |
Check that no existing key maps to a given value and that the string is not empty.
Definition at line 59 of file TriggerBitsMakerTool.cxx.
60 const auto checkIt = std::find_if(
62 [&](
const std::pair<TrigCompositeUtils::DecisionID, uint32_t>&
m) { return m.second == bit; }
66 <<
" and " <<
chain <<
" are both configured with ChainCounter:" << bit);
67 return StatusCode::FAILURE;
70 ATH_MSG_ERROR(
"Trying to register an empty string as a Chain." );
71 return StatusCode::FAILURE;
73 return StatusCode::SUCCESS;
◆ setBit()
Set to 1 the bit correspinding to 'chain' in 'resultToFill'.
Definition at line 167 of file TriggerBitsMakerTool.cxx.
172 return StatusCode::SUCCESS;
179 return StatusCode::FAILURE;
181 const int chainBitPosition = mappingIter->second;
183 if (resultToFill.test(chainBitPosition)) {
186 resultToFill.set(chainBitPosition);
187 return StatusCode::SUCCESS;
◆ start()
StatusCode TriggerBitsMakerTool::start |
( |
| ) |
|
|
overridevirtual |
◆ m_extraChainToBit
Gaudi::Property<std::map<std::string, uint32_t> > TriggerBitsMakerTool::m_extraChainToBit |
|
private |
Initial value:{ this, "ExtraChainToBit", {},
"Special case and testing purposes hard-coded chain-to-bit mappings to use in addition to those from the HLT menu."}
Definition at line 54 of file TriggerBitsMakerTool.h.
◆ m_finalChainDecisions
Initial value:{ this, "ChainDecisions", "HLTNav_Summary",
"Container with final chain decisions" }
Definition at line 49 of file TriggerBitsMakerTool.h.
◆ m_HLTMenuKey
◆ m_largestBit
uint32_t TriggerBitsMakerTool::m_largestBit {0} |
|
private |
Largest chain counter hence largest bit needed to be stored in result bitmap.
Definition at line 60 of file TriggerBitsMakerTool.h.
◆ m_mapping
The documentation for this class was generated from the following files:
void setHltBits(const boost::dynamic_bitset< uint32_t > &passRawBitset, const boost::dynamic_bitset< uint32_t > &prescaledBitset)
Replace both HLT pass raw and prescaled bits with the given bitsets.
TrigCompositeUtils::DecisionID numeric() const
numeric ID
const std::string & summaryPassNodeName()
#define ATH_MSG_VERBOSE(x)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class used to describe composite objects in the HLT.
const std::string & summaryPrescaledNodeName()
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.
std::set< DecisionID > DecisionIDContainer
#define ATH_MSG_WARNING(x)
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
const boost::dynamic_bitset< uint32_t > & getHltPrescaledBits() const
Const-getter for HLT prescaled bits.
const std::vector< uint32_t > & getHltBitsAsWords() const
Const-getter for HLT bits as uint32_t array. Ordering: PassRaw, Prescaled.
const boost::dynamic_bitset< uint32_t > & getHltPassRawBits() const
Const-getter for HLT pass raw bits.