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 //______________________________________________________________________________
58 void
60  m_runNumbers.insert(run);
61 }
62 
63 //______________________________________________________________________________
64 void
67 }
68 
69 //______________________________________________________________________________
70 void
72  m_processingTags.insert(process);
73 }
74 
75 //______________________________________________________________________________
76 void
78  m_itemList.insert(std::pair<CLID, std::string>(type, key));
79 }
80 
81 //______________________________________________________________________________
82 void
84  m_eventTypes.insert(event);
85 }
86 
87 //______________________________________________________________________________
88 void
89 EventStreamInfo::print(MsgStream& log) const {
90  log << MSG::DEBUG << (*this) << endmsg;
91  return;
92 }
93 
94 //______________________________________________________________________________
95 std::ostream&
96 operator<<(std::ostream& os, const EventStreamInfo& esi){
97  os << "EventStreamInfo number of events: " << esi.getNumberOfEvents() << '\n';
98 
99  os << "EventStreamInfo Run Numbers: ";
100  for (unsigned int rn : esi.getRunNumbers()) {
101  os << rn << ", ";
102  }
103  os << '\n';
104 
105  os << "EventStreamInfo LumiBlock Numbers: ";
106  for (unsigned int lbn : esi.getLumiBlockNumbers()) {
107  os << lbn << ", ";
108  }
109  os << '\n';
110 
111  os << "EventStreamInfo Processing Tags: ";
112  for (const std::string& tag : esi.getProcessingTags()) {
113  os << tag << ", ";
114  }
115  os << '\n';
116 
117  os << "EventStreamInfo Event Types: ";
118  for (const EventType& typ : esi.getEventTypes()) {
119  os << typ.typeToString() << ", ";
120  }
121 
122  return os;
123 }
EventStreamInfo::print
void print(MsgStream &log) const
Print a EventStreamInfo to the log file.
Definition: EventStreamInfo.cxx:89
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:75
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::getEventTypes
const std::set< EventType > & getEventTypes() const
Definition: EventStreamInfo.cxx:47
EventStreamInfo::m_runNumbers
std::set< unsigned int > m_runNumbers
Definition: EventStreamInfo.h:73
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:77
operator<<
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
Definition: EventStreamInfo.cxx:96
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EventStreamInfo::insertRunNumber
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
Definition: EventStreamInfo.cxx:59
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:74
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:71
EventStreamInfo::m_itemList
std::set< std::pair< CLID, std::string > > m_itemList
Definition: EventStreamInfo.h:76
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:77
EventStreamInfo::m_numberOfEvents
unsigned int m_numberOfEvents
Definition: EventStreamInfo.h:72
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:83
EventStreamInfo::insertLumiBlockNumber
void insertLumiBlockNumber(unsigned int lumiBlock)
Insert new Luminosity Block Number into a set.
Definition: EventStreamInfo.cxx:65
LB_AnalMapSplitter.lbn
lbn
Definition: LB_AnalMapSplitter.py:28
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37