ATLAS Offline Software
Loading...
Searching...
No Matches
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
7#include "jFEXDriver.h"
10#include "SGTools/TestStore.h"
11
12
13#define DEBUG_VHB 1
14
15
16namespace LVL1 {
17
18jFEXDriver::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() );
32
33 return StatusCode::SUCCESS;
34
35}
36
37
39{
40 ATH_MSG_DEBUG("Finalizing " << name() << "...");
41 return StatusCode::SUCCESS;
42}
43
44
45StatusCode jFEXDriver::execute() {
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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Handle class for recording to StoreGate.
Dummy event store, for regression tests.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode initialize()
ToolHandle< IjFEXSysSim > m_jFEXSysSimTool
Definition jFEXDriver.h:36
StatusCode finalize()
SG::WriteHandleKey< jFEXOutputCollection > m_jFEXOutputCollectionSGKey
Definition jFEXDriver.h:34
jFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute()
virtual ~jFEXDriver()
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...