ATLAS Offline Software
Loading...
Searching...
No Matches
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 "gFEXDriver.h"
9
10#include "GaudiKernel/ServiceHandle.h"
11#include "GaudiKernel/ITHistSvc.h"
12
13namespace LVL1 {
14
15 gFEXDriver::gFEXDriver(const std::string& name, ISvcLocator* pSvcLocator)
16 : AthAlgorithm(name, pSvcLocator)
17 {
18
19 }
20
21
23{
24 ATH_MSG_DEBUG("Destroying " << name() << "...");
25}
26
27
29{
30 ServiceHandle<ITHistSvc> histSvc("THistSvc","");
31
32 ATH_CHECK( histSvc.retrieve() );
33
34 ATH_CHECK( m_gFEXSysSimTool.retrieve() );
35
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);
57 ATH_CHECK(gFEXOutputCollectionSG.record(std::move(local_gFEXOutputCollection)));
58
59 return StatusCode::SUCCESS;
60}
61
62
63} // 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 with parameters:
gFEXDriver(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute() override
ToolHandle< IgFEXSysSim > m_gFEXSysSimTool
Definition gFEXDriver.h:37
SG::WriteHandleKey< gFEXOutputCollection > m_gFEXOutputCollectionSGKey
Definition gFEXDriver.h:35
virtual ~gFEXDriver()
virtual StatusCode initialize() override
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...