ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXSim
src
gFEXDriver.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
gFEXDriver.h
"
7
#include "
L1CaloFEXSim/gFEXOutputCollection.h
"
8
#include "
StoreGate/WriteHandle.h
"
9
10
#include "GaudiKernel/ServiceHandle.h"
11
#include "GaudiKernel/ITHistSvc.h"
12
13
namespace
LVL1
{
14
15
gFEXDriver::gFEXDriver
(
const
std::string&
name
, ISvcLocator* pSvcLocator)
16
:
AthReentrantAlgorithm
(
name
, pSvcLocator)
17
{
18
19
}
20
21
22
gFEXDriver::~gFEXDriver
()
23
{
24
ATH_MSG_DEBUG
(
"Destroying "
<<
name
() <<
"..."
);
25
}
26
27
28
StatusCode
gFEXDriver::initialize
()
29
{
30
ServiceHandle<ITHistSvc>
histSvc(
"THistSvc"
,
""
);
31
32
ATH_CHECK
( histSvc.retrieve() );
33
34
ATH_CHECK
(
m_gFEXSysSimTool
.retrieve() );
35
36
ATH_CHECK
(
m_gFEXOutputCollectionSGKey
.initialize() );
37
38
return
StatusCode::SUCCESS;
39
}
40
41
42
StatusCode
gFEXDriver::execute
(
const
EventContext& ctx)
const
43
{
44
// STEP 1 - Do some monitoring
45
gFEXOutputCollection
* my_gFEXOutputCollection =
new
gFEXOutputCollection
();
46
my_gFEXOutputCollection->
setdooutput
(
true
);
47
48
// STEP 2 - Run the gFEXSysSim
49
ATH_CHECK
(
m_gFEXSysSimTool
->execute(ctx, my_gFEXOutputCollection));
50
51
// STEP 3 - Write the completed gFEXOutputCollection into StoreGate (move the local copy in memory)
52
std::unique_ptr<gFEXOutputCollection> local_gFEXOutputCollection = std::unique_ptr<gFEXOutputCollection>(my_gFEXOutputCollection);
53
SG::WriteHandle<LVL1::gFEXOutputCollection>
gFEXOutputCollectionSG(
m_gFEXOutputCollectionSGKey
, ctx);
54
ATH_CHECK
(gFEXOutputCollectionSG.
record
(std::move(local_gFEXOutputCollection)));
55
56
return
StatusCode::SUCCESS;
57
}
58
59
60
}
// end of LVL1 namespace
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:43
WriteHandle.h
Handle class for recording to StoreGate.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
LVL1::gFEXDriver::gFEXDriver
gFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
Definition
gFEXDriver.cxx:15
LVL1::gFEXDriver::m_gFEXSysSimTool
ToolHandle< IgFEXSysSim > m_gFEXSysSimTool
Definition
gFEXDriver.h:36
LVL1::gFEXDriver::m_gFEXOutputCollectionSGKey
SG::WriteHandleKey< gFEXOutputCollection > m_gFEXOutputCollectionSGKey
Definition
gFEXDriver.h:34
LVL1::gFEXDriver::~gFEXDriver
virtual ~gFEXDriver()
Definition
gFEXDriver.cxx:22
LVL1::gFEXDriver::initialize
virtual StatusCode initialize() override
Definition
gFEXDriver.cxx:28
LVL1::gFEXDriver::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
gFEXDriver.cxx:42
LVL1::gFEXOutputCollection
Definition
gFEXOutputCollection.h:22
LVL1::gFEXOutputCollection::setdooutput
void setdooutput(bool)
Definition
gFEXOutputCollection.cxx:102
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ServiceHandle
Definition
ClusterMakerTool.h:36
gFEXDriver.h
gFEXOutputCollection.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
TrigConf::name
Definition
HLTChainList.h:35
Generated on
for ATLAS Offline Software by
1.17.0