ATLAS Offline Software
Loading...
Searching...
No Matches
EventStreamInfo.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 EVENTINFO_EVENTSTREAMINFO_H
6#define EVENTINFO_EVENTSTREAMINFO_H
7
13
14#include "GaudiKernel/ClassID.h"
15
16#include "EventInfo/EventType.h"
17
18#include <string>
19#include <set>
20#include <iostream>
21
22// Forward declarations
23class MsgStream;
24
29public:
30 // Constructor and Destructor
34 virtual ~EventStreamInfo();
35
36 // Copy/move
41
42public:
43 // Non-static members
45 unsigned int getNumberOfEvents() const;
47 const std::set<unsigned int>& getRunNumbers() const;
49 const std::set<unsigned int>& getLumiBlockNumbers() const;
51 const std::set<std::string>& getProcessingTags() const;
53 const std::set<std::pair<CLID, std::string> >& getItemList() const;
55 const std::set<EventType>& getEventTypes() const;
56
58 void addEvent(unsigned int number = 1);
60 void setNumberOfEvents(unsigned int number);
63 void insertRunNumber(unsigned int run);
66 void insertLumiBlockNumber(unsigned int lumiBlock);
69 void insertProcessingTag(const std::string& process);
73 void insertItemList(CLID type, const std::string& key);
76 void insertEventType(const EventType& event);
77
79 void print(MsgStream& log) const;
80 // Reset the EventStreamInfo payload (clear all sets and set number of events to 0)
81 void reset();
82private:
83 unsigned int m_numberOfEvents; // Number of Events
84 std::set<unsigned int> m_runNumbers; // Run#
85 std::set<unsigned int> m_lumiBlockNumbers; // LumiBlock#
86 std::set<std::string> m_processingTags; // ProcessingTags
87 std::set<std::pair<CLID, std::string> > m_itemList; // ItemList
88 std::set<EventType> m_eventTypes; // EventTypes
89};
90
91std::ostream& operator<<(std::ostream& os, const EventStreamInfo& esi);
92
100
101
103CLASS_DEF(EventStreamInfo, 167728019, 1)
104#include "AthenaKernel/MetaCont.h"
106#include "AthenaKernel/BaseInfo.h"
108#endif
#define SG_BASE(D, B)
Declare that class D derives from class B.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
This class provides general information about an event.
uint32_t CLID
The Class ID type.
This class provides the summary information stored for data written as a Event Stream.
const std::set< std::string > & getProcessingTags() const
std::set< std::string > m_processingTags
std::set< EventType > m_eventTypes
const std::set< unsigned int > & getLumiBlockNumbers() const
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.
void print(MsgStream &log) const
Print a EventStreamInfo to the log file.
std::set< unsigned int > m_runNumbers
EventStreamInfo()
Default Constructor.
const std::set< unsigned int > & getRunNumbers() const
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
void addEvent(unsigned int number=1)
Increase Event Counter.
EventStreamInfo & operator=(EventStreamInfo &&)=default
const std::set< EventType > & getEventTypes() const
EventStreamInfo & operator=(const EventStreamInfo &)=default
EventStreamInfo(EventStreamInfo &&)=default
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
const std::set< std::pair< CLID, std::string > > & getItemList() const
unsigned int m_numberOfEvents
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
unsigned int getNumberOfEvents() const
virtual ~EventStreamInfo()
Destructor.
std::set< std::pair< CLID, std::string > > m_itemList
std::set< unsigned int > m_lumiBlockNumbers
void setNumberOfEvents(unsigned int number)
Set number of events.
EventStreamInfo(const EventStreamInfo &)=default
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition EventType.h:92
const std::string process
Definition run.py:1
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186