ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventFormatCnv
src
EventFormatStreamHelperTool.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
#ifndef XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
4
#define XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
5
6
#include <mutex>
7
#include <set>
8
#include <string>
9
#include <vector>
10
11
// Gaudi/Athena include(s).
12
#include "Gaudi/Property.h"
13
#include "GaudiKernel/ServiceHandle.h"
14
#include "
AthenaBaseComps/AthAlgTool.h
"
15
#include "
AthenaKernel/IAthenaOutputTool.h
"
16
#include "
AthenaKernel/IAthMetaDataSvc.h
"
17
#include "
CxxUtils/checker_macros.h
"
18
19
namespace
xAODMaker
{
29
class
EventFormatStreamHelperTool
:
public
extends< AthAlgTool, IAthenaOutputTool > {
30
public
:
31
using
sgkey_t
=
SG::sgkey_t
;
32
33
// Inherit the base class's constructor(s).
34
using
extends::extends;
35
38
40
StatusCode
initialize
()
override
;
41
43
46
48
StatusCode
postInitialize
()
override
{
return
StatusCode::SUCCESS;}
49
51
StatusCode
preExecute
()
override
{
return
StatusCode::SUCCESS;}
52
54
StatusCode
postExecute
()
override
;
55
57
StatusCode
preFinalize
()
override
{
return
StatusCode::SUCCESS;}
58
60
StatusCode
preStream
()
override
{
return
StatusCode::SUCCESS;}
61
63
64
private
:
66
ServiceHandle< IAthMetaDataSvc >
m_metadataStore
{
this
,
"MetaDataSvc"
,
67
"MetaDataSvc"
,
"The metadata service use to record the xAOD::EventFormat"
};
68
70
ServiceHandle< IClassIDSvc >
m_clidSvc
{
this
,
"ClassIDSvc"
,
"ClassIDSvc"
,
71
"The ClassID service instance to use"
};
72
73
Gaudi::Property< std::string >
m_key
{
this
,
"Key"
,
"EventInfo"
,
74
"Key for EventFormat object in metadata store"
};
75
77
Gaudi::Property< std::vector< std::string > >
m_typeNames
{
this
,
78
"TypeNames"
, {
".*xAOD::.*"
,
"DataVector<SG::AuxElement>"
},
79
"Type names for which metadata entries are added"
};
80
82
Gaudi::Property< std::vector< std::string > >
m_ignoreKeys
{
this
,
83
"IgnoreKeys"
, {
"HLTAutoKey_.*"
},
84
"SG keys that should be ignored during the metadata collection"
};
85
86
Gaudi::Property< std::string >
m_dataHeaderKey
{
this
,
"DataHeaderKey"
,
""
,
87
"Key of DataHeader produced by output stream"
};
88
89
StatusCode
collectFormatMetadata
();
90
113
sgkey_t
lookUpHash
(
114
CLID
primaryClassID,
115
const
std::set< CLID >& classIDs,
116
const
std::vector< sgkey_t >& hashes)
const
;
117
119
std::set< CLID >
m_warnedCLIDs
;
121
std::mutex
m_warnedCLIDsMutex
;
122
124
mutable
std::mutex
m_efMutex
;
125
};
// class EventFormatStreamHelperTool
126
}
// namespace xAODMaker
127
128
#endif
// XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
AthAlgTool.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IAthMetaDataSvc.h
This file contains the class definition for the IAthMetaDataSvc class.
IAthenaOutputTool.h
This file contains the class definition for the IAthenaOutputTool class.
checker_macros.h
Define macros for attributes used to control the static checker.
ServiceHandle< IAthMetaDataSvc >
xAODMaker::EventFormatStreamHelperTool
Tool creating and maintaining xAOD::EventFormat at the end-of-events.
Definition
EventFormatStreamHelperTool.h:29
xAODMaker::EventFormatStreamHelperTool::m_efMutex
std::mutex m_efMutex
Mutex for the m_ef variable.
Definition
EventFormatStreamHelperTool.h:124
xAODMaker::EventFormatStreamHelperTool::sgkey_t
SG::sgkey_t sgkey_t
Definition
EventFormatStreamHelperTool.h:31
xAODMaker::EventFormatStreamHelperTool::preFinalize
StatusCode preFinalize() override
Called at the beginning of finalize.
Definition
EventFormatStreamHelperTool.h:57
xAODMaker::EventFormatStreamHelperTool::m_dataHeaderKey
Gaudi::Property< std::string > m_dataHeaderKey
Definition
EventFormatStreamHelperTool.h:86
xAODMaker::EventFormatStreamHelperTool::postInitialize
StatusCode postInitialize() override
Called at the end of initialize.
Definition
EventFormatStreamHelperTool.h:48
xAODMaker::EventFormatStreamHelperTool::preExecute
StatusCode preExecute() override
Called at the beginning of execute.
Definition
EventFormatStreamHelperTool.h:51
xAODMaker::EventFormatStreamHelperTool::m_typeNames
Gaudi::Property< std::vector< std::string > > m_typeNames
Type names for which a metadata entry should be added.
Definition
EventFormatStreamHelperTool.h:77
xAODMaker::EventFormatStreamHelperTool::collectFormatMetadata
StatusCode collectFormatMetadata()
Definition
EventFormatStreamHelperTool.cxx:48
xAODMaker::EventFormatStreamHelperTool::postExecute
StatusCode postExecute() override
Called at the end of execute.
Definition
EventFormatStreamHelperTool.cxx:37
xAODMaker::EventFormatStreamHelperTool::m_metadataStore
ServiceHandle< IAthMetaDataSvc > m_metadataStore
Use the metadata tool interface to store the EventFormat object.
Definition
EventFormatStreamHelperTool.h:66
xAODMaker::EventFormatStreamHelperTool::m_warnedCLIDs
std::set< CLID > m_warnedCLIDs
CLIDs about which warnings have already been printed.
Definition
EventFormatStreamHelperTool.h:119
xAODMaker::EventFormatStreamHelperTool::m_key
Gaudi::Property< std::string > m_key
Definition
EventFormatStreamHelperTool.h:73
xAODMaker::EventFormatStreamHelperTool::m_ignoreKeys
Gaudi::Property< std::vector< std::string > > m_ignoreKeys
StoreGate keys that should be ignored during the metadata collection.
Definition
EventFormatStreamHelperTool.h:82
xAODMaker::EventFormatStreamHelperTool::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
Connection to the CLID service.
Definition
EventFormatStreamHelperTool.h:70
xAODMaker::EventFormatStreamHelperTool::m_warnedCLIDsMutex
std::mutex m_warnedCLIDsMutex
Mutex for the m_warnedCLIDs variable.
Definition
EventFormatStreamHelperTool.h:121
xAODMaker::EventFormatStreamHelperTool::initialize
StatusCode initialize() override
Initialise the tool.
Definition
EventFormatStreamHelperTool.cxx:21
xAODMaker::EventFormatStreamHelperTool::preStream
StatusCode preStream() override
Called at the.
Definition
EventFormatStreamHelperTool.h:60
xAODMaker::EventFormatStreamHelperTool::lookUpHash
sgkey_t lookUpHash(CLID primaryClassID, const std::set< CLID > &classIDs, const std::vector< sgkey_t > &hashes) const
look up hash corresponding to primary class ID
Definition
EventFormatStreamHelperTool.cxx:143
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition
sgkey_t.h:32
xAODMaker
Definition
StoreGateSvc.h:70
Generated on
for ATLAS Offline Software by
1.17.0