ATLAS Offline Software
WriteExampleElectron.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAPOOLEXAMPLEALGORITHMS_WRITEEXAMPLEELECTRON_H
6 #define ATHENAPOOLEXAMPLEALGORITHMS_WRITEEXAMPLEELECTRON_H
7 
19 
20 namespace AthPoolEx {
21 
27  public: // Constructor and Destructor
29  WriteExampleElectron(const std::string& name, ISvcLocator* pSvcLocator);
31  virtual ~WriteExampleElectron() = default;
32 
33  public:
35  virtual StatusCode initialize() override final;
36  virtual StatusCode execute(const EventContext& ctx) const override final;
37  virtual StatusCode finalize() override final;
38 
39  // Read in ExampleTracks and ExampleHits
41  this, "ExampleTrackKey", "MyTracks"};
43  "MyHits"};
44 
45  // We will want to write some of those tracks as an ExampleElectron and place
46  // them into a container
48  m_exampleElectronContainerKey{this, "ExampleElectronContainerName",
49  "TestContainer"};
50 
51  // Testing writing decorations, need keys
53  this, "ExampleElectronContainerDecorKey1", "TestContainer.decor1",
54  "decorator1 key"};
56  this, "ExampleElectronContainerDecorKey2", "TestContainer.decor2",
57  "decorator2 key"};
58 };
59 
60 } // namespace AthPoolEx
61 
62 #endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
AthPoolEx::WriteExampleElectron::m_exampleTrackKey
SG::ReadHandleKey< ExampleTrackContainer > m_exampleTrackKey
Definition: WriteExampleElectron.h:40
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
AthPoolEx::WriteExampleElectron::m_exampleElectronContainerKey
SG::WriteHandleKey< xAOD::ExampleElectronContainer > m_exampleElectronContainerKey
Definition: WriteExampleElectron.h:48
AthPoolEx::WriteExampleElectron::m_decor1Key
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor1Key
Definition: WriteExampleElectron.h:52
ExampleElectronContainer.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< ExampleHitContainer >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
AthPoolEx::WriteExampleElectron::~WriteExampleElectron
virtual ~WriteExampleElectron()=default
Destructor.
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthPoolEx::WriteExampleElectron::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: WriteExampleElectron.cxx:38
ExampleTrackContainer
This class provides a data vector for ExampleTrack objects in AthenaPool.
Definition: ExampleTrackContainer.h:20
AthPoolEx::WriteExampleElectron::m_decor2Key
SG::WriteDecorHandleKey< xAOD::ExampleElectronContainer > m_decor2Key
Definition: WriteExampleElectron.h:55
AthPoolEx::WriteExampleElectron::m_exampleHitKey
SG::ReadHandleKey< ExampleHitContainer > m_exampleHitKey
Definition: WriteExampleElectron.h:42
AthPoolEx::WriteExampleElectron::WriteExampleElectron
WriteExampleElectron(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: WriteExampleElectron.cxx:20
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthPoolEx::WriteExampleElectron::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition: WriteExampleElectron.cxx:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthPoolEx::WriteExampleElectron::finalize
virtual StatusCode finalize() override final
Definition: WriteExampleElectron.cxx:106
ExampleTrackContainer.h
This file contains the class definition for the ExampleTrackContainer class.
AthPoolEx
Definition: PassNoneFilter.h:16
AthPoolEx::WriteExampleElectron
This class provides an example for writing event data objects to Pool.
Definition: WriteExampleElectron.h:26
ExampleHitContainer.h
This file contains the class definition for the ExampleHitContainer class.