 |
ATLAS Offline Software
|
#include <CTPUnpackingTool.h>
Definition at line 17 of file CTPUnpackingTool.h.
◆ CTPUnpackingTool()
CTPUnpackingTool::CTPUnpackingTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ decode()
Fills the list of chains that should be activated in a given event (note HLT prescaling happens at a later stage)
Reimplemented from CTPUnpackingToolBase.
Definition at line 94 of file CTPUnpackingTool.cxx.
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;
◆ initialize()
StatusCode CTPUnpackingTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isEmulated()
virtual bool CTPUnpackingToolBase::isEmulated |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ passBeforePrescaleSelection()
StatusCode CTPUnpackingTool::passBeforePrescaleSelection |
( |
const ROIB::RoIBResult * |
roib, |
|
|
const std::vector< std::string > & |
l1ItemNames, |
|
|
bool & |
pass |
|
) |
| const |
|
overridevirtual |
Reimplemented from CTPUnpackingToolBase.
Definition at line 163 of file CTPUnpackingTool.cxx.
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;
◆ start()
StatusCode CTPUnpackingTool::start |
( |
| ) |
|
|
overridevirtual |
Definition at line 34 of file CTPUnpackingTool.cxx.
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;
◆ m_ctpResultKey
Initial value:{
this, "CTPResult", "StoreGateSvc+CTPResult", "CTP Result"}
Definition at line 44 of file CTPUnpackingTool.h.
◆ m_ctpToChain
std::unordered_map<int, HLT::IDVec> CTPUnpackingToolBase::m_ctpToChain |
|
protectedinherited |
◆ m_forceEnable
Gaudi::Property<bool> CTPUnpackingToolBase::m_forceEnable |
|
protectedinherited |
Initial value:{
this, "ForceEnableAllChains", false, "Enables all chains in each event, testing mode"}
Definition at line 48 of file CTPUnpackingToolBase.h.
◆ m_HLTMenuKey
Initial value:{
this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu"}
Definition at line 39 of file CTPUnpackingTool.h.
◆ m_itemNametoCTPIDMap
std::map<std::string, size_t> CTPUnpackingTool::m_itemNametoCTPIDMap |
|
private |
◆ m_L1MenuKey
Initial value:{
this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu"}
Definition at line 41 of file CTPUnpackingTool.h.
◆ m_monTool
◆ m_useEDMxAOD
Gaudi::Property<bool> CTPUnpackingTool::m_useEDMxAOD |
|
private |
Initial value:{
this, "UseEDMxAOD", false,
"When true, use xAOD::CTPResult object when decoding instead of relying on ROIB::RoIBResult for CTP words"}
Definition at line 51 of file CTPUnpackingTool.h.
◆ m_useTBPBit
Gaudi::Property<bool> CTPUnpackingTool::m_useTBPBit |
|
private |
Initial value:{
this, "UseTBPBits", false,
"When true, use Trigger Before Prescale bits instead of Trigger After Veto (for testing only)"}
Definition at line 47 of file CTPUnpackingTool.h.
◆ s_CTPIDForUnseededChains
constexpr int CTPUnpackingToolBase::s_CTPIDForUnseededChains = -1 |
|
staticconstexprprotectedinherited |
The documentation for this class was generated from the following files:
ROIB::CTPRoI contains a RoI delivered by the CTP.
Group
Properties of a chain group.
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())
::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.
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.