ATLAS Offline Software
ReadExampleElectron.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_READSIMPLEELECTRON_H
6 #define ATHENAPOOLEXAMPLEALGORITHMS_READSIMPLEELECTRON_H
7 
12 
13 namespace AthPoolEx {
14 
20  public:
21  ReadExampleElectron(const std::string& name, ISvcLocator* pSvcLocator);
22  virtual ~ReadExampleElectron() = default;
23 
24  public:
26  virtual StatusCode initialize() override final;
27  virtual StatusCode execute(const EventContext& ctx) const override final;
28  virtual StatusCode finalize() override final;
29 
30  private:
31  // Reading through the container of example electrons
32  SG::ReadHandleKey<xAOD::ExampleElectronContainer>
33  m_exampleElectronContainerKey{this, "ExampleElectronContainerName",
34  "TestContainer"};
35 
36  // Also want to read through '.decor1' decorations, ignoring '.decor2' for
37  // sake of demonstration see python/AthenaPoolExample_Write.py:
38  // ItemList = [ ... ,
39  // 'xAOD::ExampleElectronAuxContainer#TestContainerAux.-decor2' ]
41  this, "ExampleElectronContainerDecorKey1", "TestContainer.decor1",
42  "decorator1 key"};
43 };
44 
45 } // namespace AthPoolEx
46 
47 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
AthPoolEx::ReadExampleElectron::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition: ReadExampleElectron.cxx:24
AthPoolEx::ReadExampleElectron::m_exampleElectronContainerKey
SG::ReadHandleKey< xAOD::ExampleElectronContainer > m_exampleElectronContainerKey
Definition: ReadExampleElectron.h:33
ExampleElectronContainer.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
AthPoolEx::ReadExampleElectron::~ReadExampleElectron
virtual ~ReadExampleElectron()=default
AthPoolEx::ReadExampleElectron::m_decor1Key
SG::ReadDecorHandleKey< xAOD::ExampleElectronContainer > m_decor1Key
Definition: ReadExampleElectron.h:40
AthPoolEx::ReadExampleElectron
This class provides an example for reading event data objects from Pool.
Definition: ReadExampleElectron.h:19
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::ExampleElectronContainer
ExampleElectronContainer_v1 ExampleElectronContainer
Definition: ExampleElectronContainer.h:11
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthPoolEx::ReadExampleElectron::ReadExampleElectron
ReadExampleElectron(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ReadExampleElectron.cxx:20
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AthPoolEx::ReadExampleElectron::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: ReadExampleElectron.cxx:33
private
#define private
Definition: xAODTruthCnvAlg.h:20
AthPoolEx
Definition: PassNoneFilter.h:16
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
AthPoolEx::ReadExampleElectron::finalize
virtual StatusCode finalize() override final
Definition: ReadExampleElectron.cxx:71