ATLAS Offline Software
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 
12 
13 #include "GaudiKernel/MsgStream.h"
14 
15 //______________________________________________________________________________
16 unsigned int
18  return(m_numberOfEvents);
19 }
20 
21 //______________________________________________________________________________
22 const std::set<unsigned int>&
24  return(m_runNumbers);
25 }
26 
27 //______________________________________________________________________________
28 const std::set<unsigned int>&
30  return(m_lumiBlockNumbers);
31 }
32 
33 //______________________________________________________________________________
34 const std::set<std::string>&
36  return(m_processingTags);
37 }
38 
39 //______________________________________________________________________________
40 const std::set<std::pair<CLID, std::string> >&
42  return(m_itemList);
43 }
44 
45 //______________________________________________________________________________
46 const std::set<EventType>&
48  return(m_eventTypes);
49 }
50 
51 //______________________________________________________________________________
52 void
55 }
56 
57 //______________________________________________________________________________
60 }
61 
62 //______________________________________________________________________________
63 void
65  m_runNumbers.insert(run);
66 }
67 
68 //______________________________________________________________________________
69 void
72 }
73 
74 //______________________________________________________________________________
75 void
77  m_processingTags.insert(process);
78 }
79 
80 //______________________________________________________________________________
81 void
83  m_itemList.insert(std::pair<CLID, std::string>(type, key));
84 }
85 
86 //______________________________________________________________________________
87 void
89  m_eventTypes.insert(event);
90 }
91 
92 //______________________________________________________________________________
93 void
94 EventStreamInfo::print(MsgStream& log) const {
95  log << MSG::DEBUG << (*this) << endmsg;
96  return;
97 }
98 
99 //______________________________________________________________________________
100 std::ostream&
101 operator<<(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 //______________________________________________________________________________
131 void
133  m_numberOfEvents = 0;
134  m_runNumbers.clear();
135  m_lumiBlockNumbers.clear();
136  m_processingTags.clear();
137  m_itemList.clear();
138  m_eventTypes.clear();
139  return;
140 }
EventStreamInfo::print
void print(MsgStream &log) const
Print a EventStreamInfo to the log file.
Definition: EventStreamInfo.cxx:94
EventStreamInfo::getRunNumbers
const std::set< unsigned int > & getRunNumbers() const
Definition: EventStreamInfo.cxx:23
EventStreamInfo::m_processingTags
std::set< std::string > m_processingTags
Definition: EventStreamInfo.h:79
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
EventStreamInfo::getProcessingTags
const std::set< std::string > & getProcessingTags() const
Definition: EventStreamInfo.cxx:35
EventStreamInfo::reset
void reset()
Definition: EventStreamInfo.cxx:132
EventStreamInfo::getEventTypes
const std::set< EventType > & getEventTypes() const
Definition: EventStreamInfo.cxx:47
EventStreamInfo::m_runNumbers
std::set< unsigned int > m_runNumbers
Definition: EventStreamInfo.h:77
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
EventStreamInfo.h
This file contains the class definition for the EventStreamInfo class.
EventStreamInfo::getLumiBlockNumbers
const std::set< unsigned int > & getLumiBlockNumbers() const
Definition: EventStreamInfo.cxx:29
EventStreamInfo::m_eventTypes
std::set< EventType > m_eventTypes
Definition: EventStreamInfo.h:81
EventStreamInfo::setNumberOfEvents
void setNumberOfEvents(unsigned int number)
Set number of events.
Definition: EventStreamInfo.cxx:58
operator<<
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
Definition: EventStreamInfo.cxx:101
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EventStreamInfo::insertRunNumber
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
Definition: EventStreamInfo.cxx:64
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
python.BunchSpacingUtils.rn
rn
Definition: BunchSpacingUtils.py:87
run
Definition: run.py:1
EventStreamInfo::m_lumiBlockNumbers
std::set< unsigned int > m_lumiBlockNumbers
Definition: EventStreamInfo.h:78
EventStreamInfo::addEvent
void addEvent(unsigned int number=1)
Increase Event Counter.
Definition: EventStreamInfo.cxx:53
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
EventStreamInfo::insertProcessingTag
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
Definition: EventStreamInfo.cxx:76
EventStreamInfo::m_itemList
std::set< std::pair< CLID, std::string > > m_itemList
Definition: EventStreamInfo.h:80
python.selection.number
number
Definition: selection.py:20
EventStreamInfo::getNumberOfEvents
unsigned int getNumberOfEvents() const
Definition: EventStreamInfo.cxx:17
EventStreamInfo::getItemList
const std::set< std::pair< CLID, std::string > > & getItemList() const
Definition: EventStreamInfo.cxx:41
EventStreamInfo
This class provides the summary information stored for data written as a Event Stream.
Definition: EventStreamInfo.h:28
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
EventStreamInfo::insertItemList
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
Definition: EventStreamInfo.cxx:82
EventStreamInfo::m_numberOfEvents
unsigned int m_numberOfEvents
Definition: EventStreamInfo.h:76
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
EventStreamInfo::insertEventType
void insertEventType(const EventType &event)
Insert new Event Type into a set.
Definition: EventStreamInfo.cxx:88
EventStreamInfo::insertLumiBlockNumber
void insertLumiBlockNumber(unsigned int lumiBlock)
Insert new Luminosity Block Number into a set.
Definition: EventStreamInfo.cxx:70
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37