ATLAS Offline Software
METPerfFexBase.cxx
Go to the documentation of this file.
1 
5 #include "METPerfFexBase.h"
6 #include "StoreGate/ReadHandle.h"
8 #include <memory>
10 
11 namespace LVL1
12 {
13  METPerfFexBase::METPerfFexBase(const std::string &name, ISvcLocator *pSvcLocator)
14  : AthReentrantAlgorithm(name, pSvcLocator)
15  {
16  declareProperty("OutputMET", m_metKey, "Output MET");
17  }
18 
20 
22  {
23  ATH_CHECK(m_metKey.initialize());
24  return StatusCode::SUCCESS;
25  }
26 
27  StatusCode METPerfFexBase::execute(const EventContext& ctx) const
28  {
29 
30  auto met = std::make_unique<xAOD::EnergySumRoI>();
31  auto metAux = std::make_unique<xAOD::EnergySumRoIAuxInfo>();
32  met->setStore(metAux.get());
33  ATH_CHECK(runFex(ctx, *met));
34  auto metHandle = SG::makeHandle(m_metKey, ctx);
35  ATH_CHECK(metHandle.record(std::move(met), std::move(metAux)));
36 
37  return StatusCode::SUCCESS;
38  }
39 
40 } // namespace LVL1
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EnergySumRoIAuxInfo.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
LVL1::METPerfFexBase::runFex
virtual StatusCode runFex(const EventContext &ctx, xAOD::EnergySumRoI &met) const =0
WriteHandle.h
Handle class for recording to StoreGate.
met
Definition: IMETSignificance.h:24
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::METPerfFexBase::initialize
virtual StatusCode initialize() override
Definition: METPerfFexBase.cxx:21
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::METPerfFexBase::m_metKey
SG::WriteHandleKey< xAOD::EnergySumRoI > m_metKey
Definition: METPerfFexBase.h:28
TrigConf::name
Definition: HLTChainList.h:35
LVL1::METPerfFexBase::~METPerfFexBase
virtual ~METPerfFexBase() override
Definition: METPerfFexBase.cxx:19
LVL1::METPerfFexBase::METPerfFexBase
METPerfFexBase(const std::string &name, ISvcLocator *pSvcLocator)
Definition: METPerfFexBase.cxx:13
ReadHandle.h
Handle class for reading from StoreGate.
METPerfFexBase.h
LVL1::METPerfFexBase::execute
virtual StatusCode execute(const EventContext &ctx) const final
Definition: METPerfFexBase.cxx:27