ATLAS Offline Software
Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAPOOLEXAMPLEALGORITHMS_READDATA_H
6 #define ATHENAPOOLEXAMPLEALGORITHMS_READDATA_H
7 
14 #include "GaudiKernel/ServiceHandle.h"
20 
21 class DataHeader;
22 class StoreGateSvc;
23 
24 namespace AthPoolEx {
25 
30 public: // Constructor and Destructor
32  ReadData(const std::string& name, ISvcLocator* pSvcLocator);
34  virtual ~ReadData();
35 
36 public:
38  virtual StatusCode initialize() override;
39  virtual StatusCode execute (const EventContext& ctx) const override;
40  virtual StatusCode finalize() override;
41 
42 private:
45  SG::ReadHandleKey<DataHeader> m_dataHeaderKey { this, "DataHeaderKey", "EventSelector" };
46  SG::ReadHandleKey<ExampleTrackContainer> m_exampleTrackKey { this, "ExampleTrackKey", "MyTracks" };
47  SG::ReadHandleKey<ExampleHitContainer> m_exampleHitKey { this, "ExampleHitKey", "MyHits" };
48 };
49 
50 } // end namespace AthPoolEx
51 
52 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
AthPoolEx::ReadData::m_dataHeaderKey
SG::ReadHandleKey< DataHeader > m_dataHeaderKey
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:45
AthPoolEx::ReadData::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx:59
AthPoolEx::ReadData::p_SGmeta
ServiceHandle< StoreGateSvc > p_SGmeta
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:44
SG::ReadHandleKey< DataHeader >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
AthPoolEx::ReadData::p_SGinMeta
ServiceHandle< StoreGateSvc > p_SGinMeta
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:43
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
AthPoolEx::ReadData::m_exampleTrackKey
SG::ReadHandleKey< ExampleTrackContainer > m_exampleTrackKey
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:46
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
AthPoolEx::ReadData::ReadData
ReadData(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthPoolEx::ReadData::~ReadData
virtual ~ReadData()
Destructor.
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx:35
AthPoolEx::ReadData::finalize
virtual StatusCode finalize() override
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx:163
AthPoolEx::ReadData::m_exampleHitKey
SG::ReadHandleKey< ExampleHitContainer > m_exampleHitKey
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:47
AthPoolEx::ReadData
This class provides an example for reading event data objects from Pool.
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.h:29
AthPoolEx::ReadData::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition: Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx:38
DataHeader.h
This file contains the class definition for the DataHeader and DataHeaderElement classes.
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ExampleTrackContainer.h
This file contains the class definition for the ExampleTrackContainer class.
AthPoolEx
Definition: PassNoneFilter.h:16
ExampleHitContainer.h
This file contains the class definition for the ExampleHitContainer class.
ServiceHandle< StoreGateSvc >