ATLAS Offline Software
EventStreamInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef EVENTINFO_EVENTSTREAMINFO_H
6 #define EVENTINFO_EVENTSTREAMINFO_H
7 
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
23 class MsgStream;
24 
29 public:
30  // Constructor and Destructor
34  virtual ~EventStreamInfo();
35 public:
36  // Non-static members
38  unsigned int getNumberOfEvents() const;
40  const std::set<unsigned int>& getRunNumbers() const;
42  const std::set<unsigned int>& getLumiBlockNumbers() const;
44  const std::set<std::string>& getProcessingTags() const;
46  const std::set<std::pair<CLID, std::string> >& getItemList() const;
48  const std::set<EventType>& getEventTypes() const;
49 
51  void addEvent(unsigned int number = 1);
53  void setNumberOfEvents(unsigned int number);
56  void insertRunNumber(unsigned int run);
59  void insertLumiBlockNumber(unsigned int lumiBlock);
62  void insertProcessingTag(const std::string& process);
66  void insertItemList(CLID type, const std::string& key);
69  void insertEventType(const EventType& event);
70 
72  void print(MsgStream& log) const;
73  // Reset the EventStreamInfo payload (clear all sets and set number of events to 0)
74  void reset();
75 private:
76  unsigned int m_numberOfEvents; // Number of Events
77  std::set<unsigned int> m_runNumbers; // Run#
78  std::set<unsigned int> m_lumiBlockNumbers; // LumiBlock#
79  std::set<std::string> m_processingTags; // ProcessingTags
80  std::set<std::pair<CLID, std::string> > m_itemList; // ItemList
81  std::set<EventType> m_eventTypes; // EventTypes
82 };
83 
84 std::ostream& operator<<(std::ostream& os, const EventStreamInfo& esi);
85 
86 inline EventStreamInfo::EventStreamInfo() : m_numberOfEvents(0),
87  m_runNumbers(),
88  m_lumiBlockNumbers(),
89  m_processingTags(),
90  m_itemList(),
91  m_eventTypes() {}
93 
94 
95 #include "AthenaKernel/CLASS_DEF.h"
96 CLASS_DEF(EventStreamInfo, 167728019, 1)
97 #include "AthenaKernel/MetaCont.h"
99 #include "AthenaKernel/BaseInfo.h"
101 #endif
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
EventType.h
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
EventStreamInfo::m_runNumbers
std::set< unsigned int > m_runNumbers
Definition: EventStreamInfo.h:77
EventStreamInfo::~EventStreamInfo
virtual ~EventStreamInfo()
Destructor.
Definition: EventStreamInfo.h:92
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
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
MetaContBase
Definition: MetaCont.h:24
EventStreamInfo::setNumberOfEvents
void setNumberOfEvents(unsigned int number)
Set number of events.
Definition: EventStreamInfo.cxx:58
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
MetaCont
Definition: MetaCont.h:48
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::EventStreamInfo
EventStreamInfo()
Default Constructor.
Definition: EventStreamInfo.h:86
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
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
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
operator<<
std::ostream & operator<<(std::ostream &os, const EventStreamInfo &esi)
Definition: EventStreamInfo.cxx:101
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
SG_BASE
SG_BASE(MetaCont< EventStreamInfo >, MetaContBase)
EventStreamInfo::insertEventType
void insertEventType(const EventType &event)
Insert new Event Type into a set.
Definition: EventStreamInfo.cxx:88
CLASS_DEF.h
macros to associate a CLID to a type
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