ATLAS Offline Software
Loading...
Searching...
No Matches
EventFormatMetaDataTool.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2/* Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration */
3
4#ifndef XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
5#define XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
6
7// System include(s):
8#include <string>
9#include <memory>
10#include <mutex>
11
12// Gaudi/Athena include(s):
13#include "Gaudi/Property.h"
14#include "GaudiKernel/ServiceHandle.h"
19
20// EDM include(s):
22
23namespace xAODMaker {
24
35class EventFormatMetaDataTool : public extends<::AthAlgTool, IMetaDataTool> {
36 public:
38 EventFormatMetaDataTool(const std::string& type,
39 const std::string& name,
40 const IInterface* parent);
41
43 virtual StatusCode initialize() override;
44
46 virtual StatusCode beginInputFile(const SG::SourceID&) override {return beginInputFile();}
47
49 virtual StatusCode endInputFile(const SG::SourceID&) override {return endInputFile();}
50
52 virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
53
55 virtual StatusCode beginInputFile();
56
59 virtual StatusCode endInputFile() {return StatusCode::SUCCESS;}
60
62 virtual StatusCode metaDataStop() override;
63
64 private:
66 StatusCode collectMetaData();
67
70 "StoreGateSvc/InputMetaDataStore", name()};
71
74 "MetaDataSvc", name()};
75
77 Gaudi::Property<std::vector<std::string> > m_keys{ this, "Keys", {},
78 "(optional) list of keys to copy, all if empty. default: empty"};
79
81 std::mutex m_outputMutex;
82}; // class EventFormatMetaDataTool
83} // namespace xAODMaker
84
85#endif // XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
This file contains the class definition for the IAthMetaDataSvc class.
This file contains the class definition for the IMetaDataTool class.
ServiceHandle< IAthMetaDataSvc > m_outputMetaStore
Connection to the output metadata store.
virtual StatusCode beginInputFile(const SG::SourceID &) override
Function collecting the metadata from a new input file.
ServiceHandle< ::StoreGateSvc > m_inputMetaStore
Connection to the input metadata store.
virtual StatusCode endInputFile(const SG::SourceID &) override
Function collecting the metadata from a new input file.
virtual StatusCode metaDataStop(const SG::SourceID &)
Wait for metadata write operations to finish, then returns SUCCESS.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
std::mutex m_outputMutex
MetaDataStop need to wait for ongoing writes.
virtual StatusCode initialize() override
Function initialising the tool.
virtual StatusCode metaDataStop() override
Wait for metadata write operations to finish, then return SUCCESS.
StatusCode collectMetaData()
Function collecting the event format metadata from the input file.
EventFormatMetaDataTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Gaudi::Property< std::vector< std::string > > m_keys
(optional) list of keys to copy, all if empty, default: empty