 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/IAlgorithm.h"
21 const std::string&
name,
34 if (
const auto* parentAlg =
dynamic_cast<const IAlgorithm*
>(this->
parent()); parentAlg) {
38 return StatusCode::FAILURE;
42 return StatusCode::SUCCESS;
47 bool ignoreIfAbsent =
true;
50 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
60 return StatusCode::SUCCESS;
66 return StatusCode::SUCCESS;
70 unsigned long long runN = 0;
79 return StatusCode::FAILURE;
84 auto esinfo_up = std::make_unique<EventStreamInfo>();
85 pEventStream = esinfo_up.get();
88 return StatusCode::FAILURE;
91 static std::once_flag resetNumberOfEventsFlag;
92 std::call_once(resetNumberOfEventsFlag, [
this, pEventStream]() ->
void {
93 ATH_MSG_DEBUG(
"Resetting the EventStreamInfo payload at the first event");
94 pEventStream->
reset();
101 pEventStream->
insertItemList(dhe.getPrimaryClassID(), dhe.getKey());
107 return StatusCode::SUCCESS;
113 auto esinfo_up = std::make_unique<EventStreamInfo>();
114 pEventStream = esinfo_up.get();
118 m_eventCounter < pEventStream->getNumberOfEvents()) {
125 "Event count mismatch in EventStreamInfo (likely due to "
126 "multi-file processing). MakeEventStreamInfo processed: "
127 <<
m_eventCounter <<
" events, existing EventStreamInfo object has "
129 <<
" events. Setting number of events to what "
130 "MakeEventStreamInfo processed.");
136 return (StatusCode::SUCCESS);
141 return StatusCode::SUCCESS;
ServiceHandle< StoreGateSvc > m_eventStore
This class represents the "type of event" where the type is given by one or more "characteristics".
ServiceHandle< IAthMetaDataSvc > m_metaDataSvc
Pointer to the data stores.
uint32_t runNumber() const
The current event's run number.
This file contains the class definition for the EventStreamInfo class.
void setNumberOfEvents(unsigned int number)
Set number of events.
std::atomic< unsigned int > m_eventCounter
Counter of the events in the stream.
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
virtual StatusCode postInitialize() override
Called at the end of AthenaOutputStream::initialize().
StringProperty m_dataHeaderKey
Name of DataHeader key.
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
MakeEventStreamInfo(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool Constructor.
void addEvent(unsigned int number=1)
Increase Event Counter.
uint32_t lumiBlock() const
The current event's luminosity block number.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode finalize() override
Called at the end of AthenaOutputStream::finalize() (via release()).
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
unsigned int getNumberOfEvents() const
virtual StatusCode postExecute() override
Called at the end of AthenaOutputStream::execute().
virtual StatusCode preExecute() override
Called at the beginning of AthenaOutputStream::execute().
StringProperty m_eventInfoKey
Key, the StoreGate key for the xAOD::EventInfo object.
This class provides the summary information stored for data written as a Event Stream.
virtual StatusCode preFinalize() override
Called at the beginning of AthenaOutputStream::finalize().
virtual StatusCode preStream() override
Called before actually streaming objects.
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
virtual StatusCode initialize() override
Required of all IAthenaOutputTools: Called by AthenaOutputStream::initialize() (via ToolSvc retrieve(...
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
StringProperty m_key
Key, the StoreGate key for the EventStreamInfo object.
void insertEventType(const EventType &event)
Insert new Event Type into a set.
void insertLumiBlockNumber(unsigned int lumiBlock)
Insert new Luminosity Block Number into a set.
This file contains the class definition for the MakeEventStreamInfo class.