ATLAS Offline Software
Loading...
Searching...
No Matches
EventStreamInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4
10
12
13#include "GaudiKernel/MsgStream.h"
14
15//______________________________________________________________________________
16unsigned int
20
21//______________________________________________________________________________
22const std::set<unsigned int>&
26
27//______________________________________________________________________________
28const std::set<unsigned int>&
32
33//______________________________________________________________________________
34const std::set<std::string>&
38
39//______________________________________________________________________________
40const std::set<std::pair<CLID, std::string> >&
42 return(m_itemList);
43}
44
45//______________________________________________________________________________
46const std::set<EventType>&
50
51//______________________________________________________________________________
52void
56
57//______________________________________________________________________________
61
62//______________________________________________________________________________
63void
65 m_runNumbers.insert(run);
66}
67
68//______________________________________________________________________________
69void
71 m_lumiBlockNumbers.insert(lumiBlock);
72}
73
74//______________________________________________________________________________
75void
79
80//______________________________________________________________________________
81void
82EventStreamInfo::insertItemList(CLID type, const std::string& key) {
83 m_itemList.insert(std::pair<CLID, std::string>(type, key));
84}
85
86//______________________________________________________________________________
87void
89 m_eventTypes.insert(event);
90}
91
92//______________________________________________________________________________
93void
94EventStreamInfo::print(MsgStream& log) const {
95 log << MSG::DEBUG << (*this) << endmsg;
96 return;
97}
98
99//______________________________________________________________________________
100std::ostream&
101operator<<(std::ostream& os, const EventStreamInfo& esi){
102 os << "EventStreamInfo number of events: " << esi.getNumberOfEvents() << '\n';
103
104 os << "EventStreamInfo Run Numbers: ";
105 for (unsigned int rn : esi.getRunNumbers()) {
106 os << rn << ", ";
107 }
108 os << '\n';
109
110 os << "EventStreamInfo LumiBlock Numbers: ";
111 for (unsigned int lbn : esi.getLumiBlockNumbers()) {
112 os << lbn << ", ";
113 }
114 os << '\n';
115
116 os << "EventStreamInfo Processing Tags: ";
117 for (const std::string& tag : esi.getProcessingTags()) {
118 os << tag << ", ";
119 }
120 os << '\n';
121
122 os << "EventStreamInfo Event Types: ";
123 for (const EventType& typ : esi.getEventTypes()) {
124 os << typ.typeToString() << ", ";
125 }
126
127 return os;
128}
129
130//______________________________________________________________________________
131void
134 m_runNumbers.clear();
135 m_lumiBlockNumbers.clear();
136 m_processingTags.clear();
137 m_itemList.clear();
138 m_eventTypes.clear();
139 return;
140}
#define endmsg
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
This file contains the class definition for the EventStreamInfo class.
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
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.
const std::set< EventType > & getEventTypes() const
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
std::set< std::pair< CLID, std::string > > m_itemList
std::set< unsigned int > m_lumiBlockNumbers
void setNumberOfEvents(unsigned int number)
Set number of events.
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