 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/EventContext.h"
25 ATH_MSG_INFO(
"RoIBResult and L1TriggerResult keys both empty: assume we're running with CTP emulation" );
56 return StatusCode::SUCCESS;
63 ATH_CHECK( timeStampHandle.record( std::make_unique<TrigTimeStamp>() ) );
79 if (!l1TriggerResultCont.isValid()) {
81 return StatusCode::FAILURE;
83 if (l1TriggerResultCont->size() != 1) {
84 ATH_MSG_ERROR(
"Size of the L1TriggerResultContainer is " << l1TriggerResultCont->size() <<
" but 1 expected");
85 return StatusCode::FAILURE;
87 l1TriggerResult = l1TriggerResultCont->at(0);
89 const std::vector<std::string>& linkNames = l1TriggerResult->
linkColNames();
90 const std::vector<uint32_t>& linkClids = l1TriggerResult->
linkColClids();
91 ATH_MSG_DEBUG(
"L1TriggerResult has " << linkNames.size() <<
" links:");
92 for (
size_t i=0;
i<linkNames.size(); ++
i) {
93 ATH_MSG_DEBUG(
"--> " << linkNames.at(
i) <<
" CLID: " << linkClids.at(
i));
99 auto *chainsInfo = handle.
ptr();
109 std::sort( l1SeededChains.begin(), l1SeededChains.end() );
113 l1SeededChains.erase(removeFrom, l1SeededChains.end());
121 std::sort( activeChains.begin(), activeChains.end() );
123 std::set_difference(l1SeededChains.begin(), l1SeededChains.end(),
124 activeChains.begin(), activeChains.end(),
125 std::back_inserter(prescaledChains));
129 if (
std::find(activeChains.begin(), activeChains.end(),
id) != activeChains.end()) {
130 ATH_MSG_ERROR(
"Prescaled chain cannot also be an active chain (" <<
id <<
")");
142 const auto activeCostMonIt =
std::find(activeChains.begin(), activeChains.end(), costMonitorChain);
143 if (activeCostMonIt == activeChains.end()){
149 HLT::IDSet activeChainSet( activeChains.begin(), activeChains.end() );
152 ATH_CHECK( unpacker->unpack( ctx, *roib, activeChainSet ) );
157 ATH_CHECK( unpacker->unpack( ctx, roib, activeChainSet ) );
163 ATH_CHECK( unpacker->unpack( ctx, *l1TriggerResult, activeChainSet ) );
165 ATH_MSG_ERROR(
"Exception in " << unpacker->name() <<
"::unpack: " << ex.what());
166 return StatusCode::FAILURE;
179 return StatusCode::SUCCESS;
185 const std::string&
type) {
191 return StatusCode::SUCCESS;
ToolHandle< L1DataConsistencyChecker > m_consistencyChecker
JetConstituentVector::iterator iterator
ToolHandleArray< IRoIsUnpackingTool > m_roiUnpackers_xaod
ToolHandle< IPrescalingTool > m_prescaler
std::string find(const std::string &s)
return a remapped string
const_pointer_type cptr()
Dereference the pointer.
Gaudi::Property< bool > m_doCostMonitoring
Class holding the LVL1 RoIB result build by the RoIBuilder.
static StatusCode saveChainsInfo(const HLT::IDVec &chains, xAOD::TrigCompositeContainer *storage, const std::string &type)
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_l1TriggerResultKey
Level-1 result with RoIs from Run-3 hardware systems.
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
bool msgLvl(const MSG::Level lvl) const
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
const std::vector< uint32_t > & linkColClids() const
Raw access to the persistent link CLIDs.
SG::WriteHandleKey< TrigTimeStamp > m_startStampKey
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SG::ReadHandleKey< ROIB::RoIBResult > m_RoIBResultKey
ToolHandleArray< IRoIsUnpackingTool > m_roiUnpackers_roib
Handle class for recording to StoreGate.
std::vector< HLT::Identifier > IDVec
ServiceHandle< ITrigCostSvc > m_trigCostSvcHandle
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
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.
Gaudi::Property< float > m_roiZedWidthDefault
Gaudi::Property< std::string > m_costMonitoringChain
const std::vector< std::string > & linkColNames() const
Raw access to the persistent link names.
ToolHandle< TrigConf::IKeyWriterTool > m_keyWriterTool
virtual StatusCode initialize() override
static double zedWidthDefault()
ToolHandle< ICTPUnpackingTool > m_ctpUnpacker
std::set< HLT::Identifier > IDSet
HLTSeeding(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_summaryKey