|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/EventContext.h"
21 ISvcLocator* pSvcLocator)
34 return StatusCode::SUCCESS;
40 std::size_t idx_trk = 0;
41 float idx_decor = 0.0f;
43 auto elecCont = std::make_unique<xAOD::ExampleElectronContainer>();
44 auto elecStore = std::make_unique<xAOD::ExampleElectronAuxContainer>();
45 elecCont->setStore(elecStore.get());
53 elecCont->push_back(std::make_unique<xAOD::ExampleElectron>());
60 elecCont->back()->setPt(
track->getPT());
64 <<
"is an electron with pT = " << elecCont->back()->pt()
72 ATH_CHECK(
objs.record(std::move(elecCont), std::move(elecStore)));
89 hdl1(*
obj) = 115.9 + 12.34 * idx_decor;
90 hdl2(*
obj) = 114.9 + idx_decor;
94 <<
", decor2 = " << hdl2(*
obj) <<
". ");
102 return StatusCode::SUCCESS;
108 return StatusCode::SUCCESS;
SG::ReadHandleKey< ExampleTrackContainer > m_exampleTrackKey
SG::WriteHandleKey< xAOD::ExampleElectronContainer > m_exampleElectronContainerKey
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor1Key
This class provides a dummy track data object for AthenaPool.
An algorithm that can be simultaneously executed in multiple threads.
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
This file contains the class definition for the WriteExampleElectron class.
Handle class for adding a decoration to an object.
virtual StatusCode execute(const EventContext &ctx) const override final
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor2Key
SG::ReadHandleKey< ExampleHitContainer > m_exampleHitKey
WriteExampleElectron(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
virtual StatusCode finalize() override final
This file contains the class definition for the ExampleTrackContainer class.
This file contains the class definition for the ExampleHitContainer class.