|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/IAlgExecStateSvc.h"
19 return StatusCode::SUCCESS;
30 ATH_MSG_DEBUG(
"Chain " <<
ch.name() <<
" will flip " <<
ch.counter() <<
" bit" );
39 struct { std::string
chain;
uint32_t bit; }
conf { chainAndBit.first, chainAndBit.second };
46 return StatusCode::SUCCESS;
54 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
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;
77 boost::dynamic_bitset<uint32_t>& prescaled,
78 const EventContext& ctx)
const
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;
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;
168 boost::dynamic_bitset<uint32_t>& resultToFill)
const
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;
const std::string & summaryPrescaledNodeName()
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
A container class for data required to build online output from HLT.
#define ATH_MSG_VERBOSE(x)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const std::string & summaryPassNodeName()
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.