ATLAS Offline Software
jFEXDriver.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 #undef NDEBUG
6 
10 #include "SGTools/TestStore.h"
11 
12 
13 #define DEBUG_VHB 1
14 
15 
16 namespace LVL1 {
17 
18 jFEXDriver::jFEXDriver(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator){}
19 
20 
22 {
23  ATH_MSG_DEBUG("Destroying " << name() << "...");
24 }
25 
26 
28 {
29 
30  ATH_CHECK( m_jFEXSysSimTool.retrieve() );
31  ATH_CHECK( m_jFEXOutputCollectionSGKey.initialize() );
32 
33  return StatusCode::SUCCESS;
34 
35 }
36 
37 
39 {
40  ATH_MSG_DEBUG("Finalizing " << name() << "...");
41  return StatusCode::SUCCESS;
42 }
43 
44 
46 
47 
48  // STEP 1 - Set up the jFEXSysSim
49  m_jFEXSysSimTool->init();
50 
51  // STEP 2 - Do some monitoring
52  jFEXOutputCollection* my_jFEXOutputCollection = new jFEXOutputCollection();
53  my_jFEXOutputCollection->setdooutput(true);
54 
55  // STEP 3 - Run the jFEXSysSim
56  ATH_CHECK(m_jFEXSysSimTool->execute(my_jFEXOutputCollection));
57 
58  // STEP 4 - Close and clean the event
59  m_jFEXSysSimTool->cleanup();
60 
61  // STEP 5 - Write the completed jFEXOutputCollection into StoreGate (move the local copy in memory)
62  std::unique_ptr<jFEXOutputCollection> local_jFEXOutputCollection = std::unique_ptr<jFEXOutputCollection>(my_jFEXOutputCollection);
64  ATH_CHECK(jFEXOutputCollectionSG.record(std::move(local_jFEXOutputCollection)));
65 
66  return StatusCode::SUCCESS;
67 }
68 
69 } // end of LVL1 namespace
LVL1::jFEXDriver::execute
virtual StatusCode execute()
Definition: jFEXDriver.cxx:45
LVL1::jFEXDriver::finalize
StatusCode finalize()
Definition: jFEXDriver.cxx:38
LVL1::jFEXDriver::initialize
virtual StatusCode initialize()
Definition: jFEXDriver.cxx:27
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
jFEXDriver.h
jFEXOutputCollection.h
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::jFEXDriver::m_jFEXSysSimTool
ToolHandle< IjFEXSysSim > m_jFEXSysSimTool
Definition: jFEXDriver.h:36
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::jFEXOutputCollection
Definition: jFEXOutputCollection.h:23
AthAlgorithm
Definition: AthAlgorithm.h:47
TrigConf::name
Definition: HLTChainList.h:35
TestStore.h
Dummy event store, for regression tests.
LVL1::jFEXDriver::~jFEXDriver
virtual ~jFEXDriver()
Definition: jFEXDriver.cxx:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LVL1::jFEXDriver::jFEXDriver
jFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
Definition: jFEXDriver.cxx:18
LVL1::jFEXOutputCollection::setdooutput
void setdooutput(bool)
Definition: jFEXOutputCollection.cxx:200
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.
LVL1::jFEXDriver::m_jFEXOutputCollectionSGKey
SG::WriteHandleKey< jFEXOutputCollection > m_jFEXOutputCollectionSGKey
Definition: jFEXDriver.h:34