ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
EventInfo
src
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
11
#include "
EventInfo/EventStreamInfo.h
"
12
13
#include "GaudiKernel/MsgStream.h"
14
15
//______________________________________________________________________________
16
unsigned
int
17
EventStreamInfo::getNumberOfEvents
()
const
{
18
return
(
m_numberOfEvents
);
19
}
20
21
//______________________________________________________________________________
22
const
std::set<unsigned int>&
23
EventStreamInfo::getRunNumbers
()
const
{
24
return
(
m_runNumbers
);
25
}
26
27
//______________________________________________________________________________
28
const
std::set<unsigned int>&
29
EventStreamInfo::getLumiBlockNumbers
()
const
{
30
return
(
m_lumiBlockNumbers
);
31
}
32
33
//______________________________________________________________________________
34
const
std::set<std::string>&
35
EventStreamInfo::getProcessingTags
()
const
{
36
return
(
m_processingTags
);
37
}
38
39
//______________________________________________________________________________
40
const
std::set<std::pair<CLID, std::string> >&
41
EventStreamInfo::getItemList
()
const
{
42
return
(
m_itemList
);
43
}
44
45
//______________________________________________________________________________
46
const
std::set<EventType>&
47
EventStreamInfo::getEventTypes
()
const
{
48
return
(
m_eventTypes
);
49
}
50
51
//______________________________________________________________________________
52
void
53
EventStreamInfo::addEvent
(
unsigned
int
number
) {
54
m_numberOfEvents
+=
number
;
55
}
56
57
//______________________________________________________________________________
58
void
EventStreamInfo::setNumberOfEvents
(
unsigned
int
number
) {
59
m_numberOfEvents
=
number
;
60
}
61
62
//______________________________________________________________________________
63
void
64
EventStreamInfo::insertRunNumber
(
unsigned
int
run
) {
65
m_runNumbers
.insert(
run
);
66
}
67
68
//______________________________________________________________________________
69
void
70
EventStreamInfo::insertLumiBlockNumber
(
unsigned
int
lumiBlock) {
71
m_lumiBlockNumbers
.insert(lumiBlock);
72
}
73
74
//______________________________________________________________________________
75
void
76
EventStreamInfo::insertProcessingTag
(
const
std::string&
process
) {
77
m_processingTags
.insert(
process
);
78
}
79
80
//______________________________________________________________________________
81
void
82
EventStreamInfo::insertItemList
(
CLID
type
,
const
std::string& key) {
83
m_itemList
.insert(std::pair<CLID, std::string>(
type
, key));
84
}
85
86
//______________________________________________________________________________
87
void
88
EventStreamInfo::insertEventType
(
const
EventType
& event) {
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
132
EventStreamInfo::reset
() {
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
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
operator<<
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
Definition
EventStreamInfo.cxx:101
EventStreamInfo.h
This file contains the class definition for the EventStreamInfo class.
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
EventStreamInfo
This class provides the summary information stored for data written as a Event Stream.
Definition
EventStreamInfo.h:28
EventStreamInfo::getProcessingTags
const std::set< std::string > & getProcessingTags() const
Definition
EventStreamInfo.cxx:35
EventStreamInfo::reset
void reset()
Definition
EventStreamInfo.cxx:132
EventStreamInfo::m_processingTags
std::set< std::string > m_processingTags
Definition
EventStreamInfo.h:86
EventStreamInfo::m_eventTypes
std::set< EventType > m_eventTypes
Definition
EventStreamInfo.h:88
EventStreamInfo::getLumiBlockNumbers
const std::set< unsigned int > & getLumiBlockNumbers() const
Definition
EventStreamInfo.cxx:29
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
EventStreamInfo::print
void print(MsgStream &log) const
Print a EventStreamInfo to the log file.
Definition
EventStreamInfo.cxx:94
EventStreamInfo::m_runNumbers
std::set< unsigned int > m_runNumbers
Definition
EventStreamInfo.h:84
EventStreamInfo::getRunNumbers
const std::set< unsigned int > & getRunNumbers() const
Definition
EventStreamInfo.cxx:23
EventStreamInfo::insertRunNumber
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
Definition
EventStreamInfo.cxx:64
EventStreamInfo::addEvent
void addEvent(unsigned int number=1)
Increase Event Counter.
Definition
EventStreamInfo.cxx:53
EventStreamInfo::getEventTypes
const std::set< EventType > & getEventTypes() const
Definition
EventStreamInfo.cxx:47
EventStreamInfo::insertProcessingTag
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
Definition
EventStreamInfo.cxx:76
EventStreamInfo::getItemList
const std::set< std::pair< CLID, std::string > > & getItemList() const
Definition
EventStreamInfo.cxx:41
EventStreamInfo::m_numberOfEvents
unsigned int m_numberOfEvents
Definition
EventStreamInfo.h:83
EventStreamInfo::insertItemList
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
Definition
EventStreamInfo.cxx:82
EventStreamInfo::getNumberOfEvents
unsigned int getNumberOfEvents() const
Definition
EventStreamInfo.cxx:17
EventStreamInfo::m_itemList
std::set< std::pair< CLID, std::string > > m_itemList
Definition
EventStreamInfo.h:87
EventStreamInfo::m_lumiBlockNumbers
std::set< unsigned int > m_lumiBlockNumbers
Definition
EventStreamInfo.h:85
EventStreamInfo::setNumberOfEvents
void setNumberOfEvents(unsigned int number)
Set number of events.
Definition
EventStreamInfo.cxx:58
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition
EventType.h:92
process
const std::string process
Definition
fbtTestBasics.cxx:76
type
run
int run(int argc, char *argv[])
Definition
ttree2hdf5.cxx:28
number
std::string number(const double &d, const std::string &s)
Definition
utils.cxx:186
Generated on
for ATLAS Offline Software by
1.17.0