ATLAS Offline Software
ReadMeta.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_READMETA_H
6 #define ATHENAPOOLEXAMPLEALGORITHMS_READMETA_H
7 
14 #include "GaudiKernel/ServiceHandle.h"
15 #include "GaudiKernel/IIncidentListener.h"
18 
19 class StoreGateSvc;
20 
21 namespace AthPoolEx {
22 
26 class ReadMeta : public AthAlgTool, virtual public IMetaDataTool, virtual public IIncidentListener {
27 public: // Constructor and Destructor
29  ReadMeta(const std::string& type, const std::string& name, const IInterface* parent);
31  virtual ~ReadMeta();
32 
33 public:
37 
39  virtual StatusCode beginInputFile();
40 
43  virtual StatusCode endInputFile() {return StatusCode::SUCCESS;}
44 
46  virtual StatusCode metaDataStop() {return StatusCode::SUCCESS;}
47 
50 
52  virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
53 
55  virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
56 
58  void handle(const Incident& incident);
59 
60 private:
63 };
64 
65 } // end AthPoolEx namespace
66 
67 #endif
AthPoolEx::ReadMeta::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: ReadMeta.h:46
AthPoolEx::ReadMeta::initialize
StatusCode initialize()
Gaudi Service Interface method implementations:
Definition: ReadMeta.cxx:34
AthPoolEx::ReadMeta::m_pMetaDataStore
ServiceHandle< StoreGateSvc > m_pMetaDataStore
Definition: ReadMeta.h:61
IMetaDataTool.h
This file contains the class definition for the IMetaDataTool class.
AthPoolEx::ReadMeta::metaDataStop
virtual StatusCode metaDataStop(const SG::SourceID &)
Function writing the collected metadata to the output.
Definition: ReadMeta.h:55
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
AthPoolEx::ReadMeta::~ReadMeta
virtual ~ReadMeta()
Destructor.
Definition: ReadMeta.cxx:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthPoolEx::ReadMeta::ReadMeta
ReadMeta(const std::string &type, const std::string &name, const IInterface *parent)
Standard Service Constructor.
Definition: ReadMeta.cxx:24
AthPoolEx::ReadMeta::beginInputFile
virtual StatusCode beginInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: ReadMeta.h:49
AthAlgTool.h
AthPoolEx::ReadMeta::endInputFile
virtual StatusCode endInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: ReadMeta.h:52
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthPoolEx::ReadMeta
This class provides an example for reading in file meta data objects from Pool.
Definition: ReadMeta.h:26
AthPoolEx::ReadMeta::m_pInputStore
ServiceHandle< StoreGateSvc > m_pInputStore
Definition: ReadMeta.h:62
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthPoolEx::ReadMeta::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: ReadMeta.h:43
AthPoolEx::ReadMeta::finalize
StatusCode finalize()
Definition: ReadMeta.cxx:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:23
IMetaDataTool
This class provides the interface for MetaDataTools.
Definition: IMetaDataTool.h:21
AthPoolEx::ReadMeta::handle
void handle(const Incident &incident)
Incident service handle listening for BeginInputFile and EndInputFile.
Definition: ReadMeta.cxx:62
AthPoolEx
Definition: PassNoneFilter.h:16
AthAlgTool
Definition: AthAlgTool.h:26
ServiceHandle< StoreGateSvc >
AthPoolEx::ReadMeta::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: ReadMeta.cxx:74