ATLAS Offline Software
Loading...
Searching...
No Matches
jFEXDriver.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#include "jFEXDriver.h"
8
9
10namespace LVL1 {
11
12jFEXDriver::jFEXDriver(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator){}
13
14
16{
17 ATH_MSG_DEBUG("Destroying " << name() << "...");
18}
19
20
22{
23 ATH_CHECK( m_jFEXSysSimTool.retrieve() );
25
26 return StatusCode::SUCCESS;
27
28}
29
30
32{
33 ATH_MSG_DEBUG("Finalizing " << name() << "...");
34 return StatusCode::SUCCESS;
35}
36
37
38StatusCode jFEXDriver::execute(const EventContext& ctx) {
39
40 // STEP 1 - Set up the jFEXSysSim
41 m_jFEXSysSimTool->init();
42
43 // STEP 2 - Do some monitoring
44 jFEXOutputCollection* my_jFEXOutputCollection = new jFEXOutputCollection();
45 my_jFEXOutputCollection->setdooutput(true);
46
47 // STEP 3 - Run the jFEXSysSim
48 ATH_CHECK(m_jFEXSysSimTool->execute(ctx, my_jFEXOutputCollection));
49
50 // STEP 4 - Close and clean the event
51 m_jFEXSysSimTool->cleanup();
52
53 // STEP 5 - Write the completed jFEXOutputCollection into StoreGate (move the local copy in memory)
54 std::unique_ptr<jFEXOutputCollection> local_jFEXOutputCollection = std::unique_ptr<jFEXOutputCollection>(my_jFEXOutputCollection);
56 ATH_CHECK(jFEXOutputCollectionSG.record(std::move(local_jFEXOutputCollection)));
57
58 return StatusCode::SUCCESS;
59}
60
61} // 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.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode initialize()
ToolHandle< IjFEXSysSim > m_jFEXSysSimTool
Definition jFEXDriver.h:36
virtual StatusCode execute(const EventContext &ctx)
Execute method.
StatusCode finalize()
SG::WriteHandleKey< jFEXOutputCollection > m_jFEXOutputCollectionSGKey
Definition jFEXDriver.h:34
jFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
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...