ATLAS Offline Software
Trigger
TrigT1
L1CaloFEX
L1CaloFEXSim
src
gFEXDriver.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
L1CaloFEXSim/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
:
AthAlgorithm
(
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
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(my_gFEXOutputCollection));
50
51
// STEP 3 - Close and clean the event
52
m_gFEXSysSimTool
->cleanup();
53
54
// STEP 4 - Write the completed gFEXOutputCollection into StoreGate (move the local copy in memory)
55
std::unique_ptr<gFEXOutputCollection> local_gFEXOutputCollection = std::unique_ptr<gFEXOutputCollection>(my_gFEXOutputCollection);
56
SG::WriteHandle<LVL1::gFEXOutputCollection>
gFEXOutputCollectionSG(
m_gFEXOutputCollectionSGKey
);
57
ATH_CHECK
(gFEXOutputCollectionSG.
record
(std::move(local_gFEXOutputCollection)));
58
59
return
StatusCode::SUCCESS;
60
}
61
62
63
}
// end of LVL1 namespace
LVL1::gFEXDriver::m_gFEXSysSimTool
ToolHandle< IgFEXSysSim > m_gFEXSysSimTool
Definition:
gFEXDriver.h:37
LVL1::gFEXDriver::initialize
virtual StatusCode initialize() override
Definition:
gFEXDriver.cxx:28
gFEXOutputCollection.h
LVL1::gFEXDriver::m_gFEXOutputCollectionSGKey
SG::WriteHandleKey< gFEXOutputCollection > m_gFEXOutputCollectionSGKey
Definition:
gFEXDriver.h:35
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition:
ICMMCPHitsCnvTool.h:18
LVL1::gFEXDriver::~gFEXDriver
virtual ~gFEXDriver()
Definition:
gFEXDriver.cxx:22
LVL1::gFEXOutputCollection::setdooutput
void setdooutput(bool)
Definition:
gFEXOutputCollection.cxx:102
LVL1::gFEXOutputCollection
Definition:
gFEXOutputCollection.h:22
WriteHandle.h
Handle class for recording to StoreGate.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
LVL1::gFEXDriver::execute
virtual StatusCode execute() override
Definition:
gFEXDriver.cxx:42
MuonSegmentReaderConfig.histSvc
histSvc
Definition:
MuonSegmentReaderConfig.py:96
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
AthAlgorithm
Definition:
AthAlgorithm.h:47
TrigConf::name
Definition:
HLTChainList.h:35
LVL1::gFEXDriver::gFEXDriver
gFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
gFEXDriver.cxx:15
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
gFEXDriver.h
SG::WriteHandle
Definition:
StoreGate/StoreGate/WriteHandle.h:76
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ServiceHandle< ITHistSvc >
Generated on Sun Dec 22 2024 21:10:53 for ATLAS Offline Software by
1.8.18