ATLAS Offline Software
Loading...
Searching...
No Matches
MakeEventStreamInfo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MAKEEVENTSTREAMINFO_H
6#define MAKEEVENTSTREAMINFO_H
12
14
16#include "GaudiKernel/ServiceHandle.h"
18
19#include <string>
20
21class StoreGateSvc;
22namespace xAODMaker { class IEventInfoCnvTool; }
23
27class MakeEventStreamInfo : public extends<::AthAlgTool, IAthenaOutputTool> {
28public:
30 MakeEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent);
32 virtual ~MakeEventStreamInfo() = default;
35 virtual StatusCode initialize() override;
37 virtual StatusCode postInitialize() override;
39 virtual StatusCode preExecute() override;
41 virtual StatusCode preStream() override;
43 virtual StatusCode postExecute() override;
45 virtual StatusCode preFinalize() override;
47 virtual StatusCode finalize() override;
48
49private:
51 Gaudi::Property<std::string> m_dataHeaderKey{this, "DataHeaderKey", "", "name of the data header key"};
53 Gaudi::Property<std::string> m_key{this, "Key", "", "name of the EventStreamInfo object"};
54
56 Gaudi::Property<std::string> m_eventInfoKey{this, "EventInfoKey", "EventInfo", "name of the xAOD::EventInfo"};
57
59 ServiceHandle<IAthMetaDataSvc> m_metaDataSvc{this, "MetaDataSvc", "MetaDataSvc"};
60 ServiceHandle<StoreGateSvc> m_eventStore{this, "StoreGateSvc", "StoreGateSvc"};
61
63 std::atomic<unsigned int> m_eventCounter{0};
64
65};
66#endif
This file contains the class definition for the IAthMetaDataSvc class.
This file contains the class definition for the IAthenaOutputTool class.
MakeEventStreamInfo(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool Constructor.
Gaudi::Property< std::string > m_key
Key, the StoreGate key for the EventStreamInfo object.
ServiceHandle< StoreGateSvc > m_eventStore
virtual StatusCode finalize() override
Called at the end of AthenaOutputStream::finalize() (via release()).
Gaudi::Property< std::string > m_eventInfoKey
Key, the StoreGate key for the xAOD::EventInfo object.
ServiceHandle< IAthMetaDataSvc > m_metaDataSvc
Pointer to the data stores.
virtual StatusCode preFinalize() override
Called at the beginning of AthenaOutputStream::finalize().
Gaudi::Property< std::string > m_dataHeaderKey
Name of DataHeader key.
virtual ~MakeEventStreamInfo()=default
Destructor.
virtual StatusCode preStream() override
Called before actually streaming objects.
virtual StatusCode postExecute() override
Called at the end of AthenaOutputStream::execute().
virtual StatusCode initialize() override
Required of all IAthenaOutputTools: Called by AthenaOutputStream::initialize() (via ToolSvc retrieve(...
std::atomic< unsigned int > m_eventCounter
Counter of the events in the stream.
virtual StatusCode preExecute() override
Called at the beginning of AthenaOutputStream::execute().
virtual StatusCode postInitialize() override
Called at the end of AthenaOutputStream::initialize().
The Athena Transient Store API.
Interface for the tool creating xAOD::EventInfo from an AOD.