ATLAS Offline Software
Loading...
Searching...
No Matches
EndOfEventROIConfirmerAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7
8
9EndOfEventROIConfirmerAlg::EndOfEventROIConfirmerAlg(const std::string& name, ISvcLocator* pSvcLocator)
10 : AthReentrantAlgorithm(name, pSvcLocator) {}
11
12
14 ATH_MSG_DEBUG( "EndOfEventROIConfirmerAlg::initialize()" );
16 return StatusCode::SUCCESS;
17}
18
19
20StatusCode EndOfEventROIConfirmerAlg::execute(const EventContext& context) const {
21 ATH_MSG_DEBUG( "EndOfEventROIConfirmerAlg::execute()" );
22
24 ATH_CHECK( rhk.initialize() );
25
26 for (const auto& whk : m_writeHandleKeyArray_ROIs) {
27 rhk = whk.key(); // update the key
28 auto readHandle = SG::makeHandle(rhk, context);
29 if ( readHandle.isValid() ) {
30 ATH_MSG_DEBUG( "The " << whk.key() << " already present - this chain must have run as part of the trigger in this event" );
31 } else {
32 ATH_MSG_DEBUG( "The " << whk.key() << " is not here - we should create it such that we can run algorithms at the end of the HLT-accepted event" );
33
34 auto handle = SG::makeHandle(whk, context);
35 auto objp = std::make_unique<TrigRoiDescriptorCollection> (TrigRoiDescriptorCollection());
36 ATH_CHECK( handle.record (std::move (objp)) );
37 handle->push_back(new TrigRoiDescriptor(true));
38 }
39 }
40 return StatusCode::SUCCESS;
41}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigRoiDescriptorCollection
Athena::TPCnvVers::Current TrigRoiDescriptor
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKeyArray< TrigRoiDescriptorCollection > m_writeHandleKeyArray_ROIs
virtual StatusCode initialize() override
EndOfEventROIConfirmerAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &context) const override
Property holding a SG store/key/clid from which a ReadHandle is made.
const std::string & key() const
Return the StoreGate ID for the referenced object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())