ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAlgorithms
TrigGenericAlgs
src
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
6
#include "
EndOfEventROIConfirmerAlg.h
"
7
8
9
EndOfEventROIConfirmerAlg::EndOfEventROIConfirmerAlg
(
const
std::string& name, ISvcLocator* pSvcLocator)
10
:
AthReentrantAlgorithm
(name, pSvcLocator) {}
11
12
13
StatusCode
EndOfEventROIConfirmerAlg::initialize
() {
14
ATH_MSG_DEBUG
(
"EndOfEventROIConfirmerAlg::initialize()"
);
15
ATH_CHECK
(
m_writeHandleKeyArray_ROIs
.initialize() );
16
return
StatusCode::SUCCESS;
17
}
18
19
20
StatusCode
EndOfEventROIConfirmerAlg::execute
(
const
EventContext& context)
const
{
21
ATH_MSG_DEBUG
(
"EndOfEventROIConfirmerAlg::execute()"
);
22
23
SG::ReadHandleKey<TrigRoiDescriptorCollection>
rhk(
"temp"
);
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
EndOfEventROIConfirmerAlg.h
TrigRoiDescriptorCollection
Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigRoiDescriptorCollection
Definition
TrigSteeringEventTPCnv.cxx:78
TrigRoiDescriptor
Athena::TPCnvVers::Current TrigRoiDescriptor
Definition
TrigSteeringEventTPCnv.cxx:68
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
EndOfEventROIConfirmerAlg::m_writeHandleKeyArray_ROIs
SG::WriteHandleKeyArray< TrigRoiDescriptorCollection > m_writeHandleKeyArray_ROIs
Definition
EndOfEventROIConfirmerAlg.h:26
EndOfEventROIConfirmerAlg::initialize
virtual StatusCode initialize() override
Definition
EndOfEventROIConfirmerAlg.cxx:13
EndOfEventROIConfirmerAlg::EndOfEventROIConfirmerAlg
EndOfEventROIConfirmerAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
EndOfEventROIConfirmerAlg.cxx:9
EndOfEventROIConfirmerAlg::execute
virtual StatusCode execute(const EventContext &context) const override
Definition
EndOfEventROIConfirmerAlg.cxx:20
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
Generated on
for ATLAS Offline Software by
1.17.0