 |
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include <boost/algorithm/string.hpp>
17 const std::string&
name,
30 return StatusCode::SUCCESS;
35 ATH_MSG_INFO(
"Updating CTP bits decoding configuration");
55 return StatusCode::SUCCESS;
59 ATH_MSG_WARNING(itemName <<
" used to seed the chain " <<
id <<
" not in the configuration ");
60 return StatusCode::SUCCESS;
62 ATH_MSG_ERROR(itemName <<
" used to seed the chain " <<
id <<
" not in the configuration ");
63 return StatusCode::FAILURE;
70 if (
chain.l1item().empty() ) {
72 }
else if (
chain.l1item().find(
',') != std::string::npos ) {
74 std::vector<std::string>
items;
76 for (
const std::string&
i:
items ) {
77 ATH_CHECK( addIfItemExists(
i, chainID,
true ) );
85 for (
auto chain: ctpIDtoChain.second ) {
90 return StatusCode::SUCCESS;
98 std::vector<uint32_t> ctpBits;
103 if (!ctpRes.isValid()) {
105 return StatusCode::FAILURE;
109 ctpBits =
m_useTBPBit ? ctpRes->getTBPWords() : ctpRes->getTAVWords();
116 ctpBits.reserve(
rois.size());
122 const size_t bitsSize = ctpBits.size();
123 constexpr
static size_t wordSize{32};
125 for (
size_t wordCounter = 0; wordCounter < bitsSize; ++wordCounter ) {
126 for (
size_t bitCounter = 0; bitCounter < wordSize; ++bitCounter ) {
127 const size_t ctpIndex = wordSize*wordCounter + bitCounter;
128 const bool decision = ( ctpBits[wordCounter] & ((
uint32_t)1 << bitCounter) ) > 0;
133 ATH_MSG_DEBUG(
"L1 item " << ctpIndex <<
" active, enabling chains "
134 << (
m_forceEnable ?
" due to the forceEnable flag" :
" due to the seed"));
139 enabledChains.insert( enabledChains.end(), itr->second.begin(), itr->second.end() );
147 enabledChains.insert( enabledChains.end(), itr->second.begin(), itr->second.end());
150 nChains = enabledChains.size();
151 for (
auto chain: enabledChains ) {
155 ATH_MSG_ERROR(
"All CTP bits were disabled, this event should not have shown here" );
156 return StatusCode::FAILURE;
159 return StatusCode::SUCCESS;
164 const std::vector<std::string>& l1ItemNames,
171 for (
const std::string& l1name : l1ItemNames) {
175 const size_t bitCounter = ctpId % 32;
176 const size_t wordCounter = ctpId / 32;
178 const bool decision = (ctpBits[wordCounter].roIWord() & ((
uint32_t)1 << bitCounter)) > 0;
180 pass = (pass || decision);
184 return StatusCode::FAILURE;
188 return StatusCode::SUCCESS;
ROIB::CTPRoI contains a RoI delivered by the CTP.
Group
Properties of a chain group.
Class holding the LVL1 RoIB result build by the RoIBuilder.
const std::vector< CTPRoI > TBP() const
get trigger result before prescale
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::vector< HLT::Identifier > IDVec
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
L1 threshold configuration.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Header file to be included by clients of the Monitored infrastructure.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const CTPResult & cTPResult() const
Gets the CTP part of the L1 RDO.
const std::vector< CTPRoI > TAV() const
get trigger result after veto
#define ATH_MSG_WARNING(x)
Declare a monitored scalar variable.