ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventFormatCnv
src
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"
15
#include "
AthenaKernel/IAthMetaDataSvc.h
"
16
#include "
AthenaKernel/IMetaDataTool.h
"
17
#include "
AthenaBaseComps/AthAlgTool.h
"
18
#include "
StoreGate/StoreGateSvc.h
"
19
20
// EDM include(s):
21
#include "
xAODEventFormat/EventFormat.h
"
22
23
namespace
xAODMaker
{
24
35
class
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
69
ServiceHandle< ::StoreGateSvc >
m_inputMetaStore
{
this
,
"InputMetaStore"
,
70
"StoreGateSvc/InputMetaDataStore"
, name()};
71
73
ServiceHandle< IAthMetaDataSvc >
m_outputMetaStore
{
this
,
"MetaDataSvc"
,
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
AthAlgTool.h
EventFormat.h
IAthMetaDataSvc.h
This file contains the class definition for the IAthMetaDataSvc class.
IMetaDataTool.h
This file contains the class definition for the IMetaDataTool class.
StoreGateSvc.h
ServiceHandle
Definition
ClusterMakerTool.h:36
xAODMaker::EventFormatMetaDataTool::m_outputMetaStore
ServiceHandle< IAthMetaDataSvc > m_outputMetaStore
Connection to the output metadata store.
Definition
EventFormatMetaDataTool.h:73
xAODMaker::EventFormatMetaDataTool::beginInputFile
virtual StatusCode beginInputFile(const SG::SourceID &) override
Function collecting the metadata from a new input file.
Definition
EventFormatMetaDataTool.h:46
xAODMaker::EventFormatMetaDataTool::m_inputMetaStore
ServiceHandle< ::StoreGateSvc > m_inputMetaStore
Connection to the input metadata store.
Definition
EventFormatMetaDataTool.h:69
xAODMaker::EventFormatMetaDataTool::endInputFile
virtual StatusCode endInputFile(const SG::SourceID &) override
Function collecting the metadata from a new input file.
Definition
EventFormatMetaDataTool.h:49
xAODMaker::EventFormatMetaDataTool::metaDataStop
virtual StatusCode metaDataStop(const SG::SourceID &)
Wait for metadata write operations to finish, then returns SUCCESS.
Definition
EventFormatMetaDataTool.h:52
xAODMaker::EventFormatMetaDataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition
EventFormatMetaDataTool.h:59
xAODMaker::EventFormatMetaDataTool::m_outputMutex
std::mutex m_outputMutex
MetaDataStop need to wait for ongoing writes.
Definition
EventFormatMetaDataTool.h:81
xAODMaker::EventFormatMetaDataTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition
EventFormatMetaDataTool.cxx:26
xAODMaker::EventFormatMetaDataTool::metaDataStop
virtual StatusCode metaDataStop() override
Wait for metadata write operations to finish, then return SUCCESS.
Definition
EventFormatMetaDataTool.cxx:60
xAODMaker::EventFormatMetaDataTool::collectMetaData
StatusCode collectMetaData()
Function collecting the event format metadata from the input file.
Definition
EventFormatMetaDataTool.cxx:68
xAODMaker::EventFormatMetaDataTool::EventFormatMetaDataTool
EventFormatMetaDataTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition
EventFormatMetaDataTool.cxx:20
xAODMaker::EventFormatMetaDataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition
EventFormatMetaDataTool.cxx:47
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:77
SG::SourceID
std::string SourceID
Definition
AthenaKernel/AthenaKernel/SourceID.h:25
xAODMaker
Definition
StoreGateSvc.h:70
type
Generated on
for ATLAS Offline Software by
1.17.0