ATLAS Offline Software
EventFormatMetaDataTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /* Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */
3 
4 // $Id: EventFormatMetaDataTool.h 651874 2015-03-05 14:16:19Z krasznaa $
5 #ifndef XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
6 #define XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
7 
8 // System include(s):
9 #include <string>
10 #include <memory>
11 #include <mutex>
12 
13 // Gaudi/Athena include(s):
14 #include "Gaudi/Property.h"
15 #include "GaudiKernel/ServiceHandle.h"
19 #include "StoreGate/StoreGateSvc.h"
20 
21 // EDM include(s):
23 
24 namespace xAODMaker {
25 
39 class EventFormatMetaDataTool : public virtual ::IMetaDataTool, public ::AthAlgTool {
40  public:
42  EventFormatMetaDataTool(const std::string& type,
43  const std::string& name,
44  const IInterface* parent);
45 
47  virtual StatusCode initialize();
48 
51 
53  virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
54 
56  virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
57 
59  virtual StatusCode beginInputFile();
60 
63  virtual StatusCode endInputFile() {return StatusCode::SUCCESS;}
64 
66  virtual StatusCode metaDataStop();
67 
68  private:
71 
74  "StoreGateSvc/InputMetaDataStore", name()};
75 
78  "MetaDataSvc", name()};
79 
81  Gaudi::Property<std::vector<std::string> > m_keys{ this, "Keys", {},
82  "(optional) list of keys to copy, all if empty. default: empty"};
83 
86 }; // class EventFormatMetaDataTool
87 } // namespace xAODMaker
88 
89 #endif // XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
xAODMaker::EventFormatMetaDataTool::metaDataStop
virtual StatusCode metaDataStop()
Wait for metadata write operations to finish, then return SUCCESS.
Definition: EventFormatMetaDataTool.cxx:67
xAODMaker::EventFormatMetaDataTool::EventFormatMetaDataTool
EventFormatMetaDataTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: EventFormatMetaDataTool.cxx:20
xAODMaker::EventFormatMetaDataTool::endInputFile
virtual StatusCode endInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: EventFormatMetaDataTool.h:53
IAthMetaDataSvc.h
This file contains the class definition for the IAthMetaDataSvc class.
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
xAODMaker::EventFormatMetaDataTool::m_keys
Gaudi::Property< std::vector< std::string > > m_keys
(optional) list of keys to copy, all if empty, default: empty
Definition: EventFormatMetaDataTool.h:81
IMetaDataTool.h
This file contains the class definition for the IMetaDataTool class.
xAODMaker::EventFormatMetaDataTool::beginInputFile
virtual StatusCode beginInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: EventFormatMetaDataTool.h:50
xAODMaker::EventFormatMetaDataTool::m_outputMutex
std::mutex m_outputMutex
MetaDataStop need to wait for ongoing writes.
Definition: EventFormatMetaDataTool.h:85
xAODMaker
Definition: StoreGateSvc.h:72
xAODMaker::EventFormatMetaDataTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: EventFormatMetaDataTool.cxx:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAODMaker::EventFormatMetaDataTool::m_outputMetaStore
ServiceHandle< IAthMetaDataSvc > m_outputMetaStore
Connection to the output metadata store.
Definition: EventFormatMetaDataTool.h:77
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAODMaker::EventFormatMetaDataTool::m_inputMetaStore
ServiceHandle< ::StoreGateSvc > m_inputMetaStore
Connection to the input metadata store.
Definition: EventFormatMetaDataTool.h:73
xAODMaker::EventFormatMetaDataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: EventFormatMetaDataTool.h:63
xAODMaker::EventFormatMetaDataTool
Tool taking care of copying the event format object from file to file.
Definition: EventFormatMetaDataTool.h:39
EventFormat.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
xAODMaker::EventFormatMetaDataTool::collectMetaData
StatusCode collectMetaData()
Function collecting the event format metadata from the input file.
Definition: EventFormatMetaDataTool.cxx:75
xAODMaker::EventFormatMetaDataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: EventFormatMetaDataTool.cxx:49
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
xAODMaker::EventFormatMetaDataTool::metaDataStop
virtual StatusCode metaDataStop(const SG::SourceID &)
Wait for metadata write operations to finish, then returns SUCCESS.
Definition: EventFormatMetaDataTool.h:56
AthAlgTool
Definition: AthAlgTool.h:26
StoreGateSvc.h
ServiceHandle
Definition: ClusterMakerTool.h:37