ATLAS Offline Software
TriggerInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef EVENTINFO_TRIGGERINFO_H
6 # define EVENTINFO_TRIGGERINFO_H 1
7 
17 #include <vector>
18 #include <set>
19 #include <string>
20 #include <iostream>
21 
22 
77 class TriggerInfo {
78 public:
80 
81  typedef unsigned int number_type;
83 
85 
86  class StreamTag
87  {
88  public:
89  StreamTag();
90  StreamTag(const std::string& name,
91  const std::string& type,
92  bool obeysLumiblock,
93  const std::set<number_type>& robs = std::set<number_type>(),
94  const std::set<number_type>& dets = std::set<number_type>());
95  StreamTag(std::string&& name,
96  std::string&& type,
97  bool obeysLumiblock);
98 
99  const std::string& name() const;
100  const std::string& type() const;
101  bool obeysLumiblock() const;
102  const std::set<number_type>& robs() const;
103  const std::set<number_type>& dets() const;
104  private:
105  std::string m_name;
106  std::string m_type;
108  std::set<number_type> m_robs;
109  std::set<number_type> m_dets;
110  };
111 
113 
114  TriggerInfo();
116 
121  const std::vector<number_type>& level1TriggerInfo);
122 
127  const std::vector<number_type>& level2TriggerInfo,
128  const std::vector<number_type>& eventFilterInfo,
129  const std::vector<StreamTag>& streamTags);
130 
135  const std::vector<number_type>& level1TriggerInfo,
136  const std::vector<number_type>& level2TriggerInfo,
137  const std::vector<number_type>& eventFilterInfo,
138  const std::vector<StreamTag>& streamTags);
139 
140  // Default copy constructor.
141  virtual ~TriggerInfo();
143 
144 
146 
147  number_type statusElement() const;
154  const std::vector<number_type>& level1TriggerInfo() const;
156  const std::vector<number_type>& level2TriggerInfo() const;
158  const std::vector<number_type>& eventFilterInfo() const;
160  const std::vector<StreamTag>& streamTags() const;
162 
163 
165 
173  void setLevel1TriggerInfo(const std::vector<number_type>& level1TriggerInfo);
174  void setLevel1TriggerInfo(std::vector<number_type>&& level1TriggerInfo);
176  void setLevel2TriggerInfo(const std::vector<number_type>& level2TriggerInfo);
177  void setLevel2TriggerInfo(std::vector<number_type>&& level2TriggerInfo);
179  void setEventFilterInfo(const std::vector<number_type>& eventFilterInfo);
180  void setEventFilterInfo(std::vector<number_type>&& eventFilterInfo);
181 
183 
184  void setStreamTags(const std::vector<StreamTag>& streamTags);
185  void setStreamTags(std::vector<StreamTag>&& streamTags);
187 
189  friend std::ostream& operator << (std::ostream& os, const TriggerInfo& rhs);
190 private:
194  std::vector<number_type> m_level1TriggerInfo;
195  std::vector<number_type> m_level2TriggerInfo;
196  std::vector<number_type> m_eventFilterInfo;
197  std::vector<StreamTag> m_streamTags;
198 };
199 
200 
201 #endif // EVENTINFO_TRIGGERINFO_H
TriggerInfo::setLevel1TriggerType
void setLevel1TriggerType(const number_type level1TriggerType)
set level1 trigger type
Definition: TriggerInfo.cxx:173
TriggerInfo::streamTags
const std::vector< StreamTag > & streamTags() const
get stream tags
Definition: TriggerInfo.cxx:158
TriggerInfo::StreamTag::name
const std::string & name() const
Definition: TriggerInfo.cxx:50
TriggerInfo::setExtendedLevel1ID
void setExtendedLevel1ID(const number_type extendedLevel1ID)
set extended level1 ID
Definition: TriggerInfo.cxx:168
TriggerInfo::StreamTag::obeysLumiblock
bool obeysLumiblock() const
Definition: TriggerInfo.cxx:60
TriggerInfo::setLevel2TriggerInfo
void setLevel2TriggerInfo(const std::vector< number_type > &level2TriggerInfo)
set level2 trigger info
Definition: TriggerInfo.cxx:188
TriggerInfo::setEventFilterInfo
void setEventFilterInfo(const std::vector< number_type > &eventFilterInfo)
set event filter trigger info
Definition: TriggerInfo.cxx:198
TriggerInfo::m_level1TriggerType
number_type m_level1TriggerType
Definition: TriggerInfo.h:193
TriggerInfo::m_eventFilterInfo
std::vector< number_type > m_eventFilterInfo
Definition: TriggerInfo.h:196
TriggerInfo::m_extendedLevel1ID
number_type m_extendedLevel1ID
Definition: TriggerInfo.h:192
TriggerInfo::level1TriggerInfo
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
Definition: TriggerInfo.cxx:143
TriggerInfo::StreamTag::m_type
std::string m_type
Definition: TriggerInfo.h:106
TriggerInfo::StreamTag::StreamTag
StreamTag()
Definition: TriggerInfo.cxx:43
TriggerInfo::setStatusElement
void setStatusElement(const number_type statusElement)
set status element
Definition: TriggerInfo.cxx:163
TriggerInfo::TriggerInfo
TriggerInfo()
empty default constructor (all zero)
Definition: TriggerInfo.cxx:74
TriggerInfo::StreamTag
Definition: TriggerInfo.h:87
TriggerInfo::StreamTag::type
const std::string & type() const
Definition: TriggerInfo.cxx:55
TriggerInfo::level2TriggerInfo
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
Definition: TriggerInfo.cxx:148
TriggerInfo::setStreamTags
void setStreamTags(const std::vector< StreamTag > &streamTags)
Definition: TriggerInfo.cxx:208
TriggerInfo::m_statusElement
number_type m_statusElement
Definition: TriggerInfo.h:191
TriggerInfo::~TriggerInfo
virtual ~TriggerInfo()
Definition: TriggerInfo.cxx:124
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TriggerInfo::level1TriggerType
number_type level1TriggerType() const
get level1 trigger type
Definition: TriggerInfo.cxx:138
TriggerInfo::number_type
unsigned int number_type
Definition: TriggerInfo.h:81
TriggerInfo
This class contains trigger related information.
Definition: TriggerInfo.h:77
TriggerInfo::StreamTag::m_name
std::string m_name
Definition: TriggerInfo.h:105
TriggerInfo::StreamTag::robs
const std::set< number_type > & robs() const
Optional list of ROBIDs for PEB.
Definition: TriggerInfo.cxx:65
TriggerInfo::StreamTag::m_obeysLumiblock
bool m_obeysLumiblock
Definition: TriggerInfo.h:107
TriggerInfo::m_level1TriggerInfo
std::vector< number_type > m_level1TriggerInfo
Definition: TriggerInfo.h:194
TriggerInfo::m_level2TriggerInfo
std::vector< number_type > m_level2TriggerInfo
Definition: TriggerInfo.h:195
TriggerInfo::extendedLevel1ID
number_type extendedLevel1ID() const
get extended level1 ID
Definition: TriggerInfo.cxx:133
TriggerInfo::eventFilterInfo
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
Definition: TriggerInfo.cxx:153
TriggerInfo::setLevel1TriggerInfo
void setLevel1TriggerInfo(const std::vector< number_type > &level1TriggerInfo)
set level1 trigger info
Definition: TriggerInfo.cxx:178
TriggerInfo::StreamTag::m_dets
std::set< number_type > m_dets
Definition: TriggerInfo.h:109
TriggerInfo::m_streamTags
std::vector< StreamTag > m_streamTags
Definition: TriggerInfo.h:197
TriggerInfo::StreamTag::dets
const std::set< number_type > & dets() const
Optional list of DETIDs for PEB.
Definition: TriggerInfo.cxx:70
TriggerInfo::statusElement
number_type statusElement() const
get status element
Definition: TriggerInfo.cxx:128
TriggerInfo::StreamTag::m_robs
std::set< number_type > m_robs
Definition: TriggerInfo.h:108
TriggerInfo::operator<<
friend std::ostream & operator<<(std::ostream &os, const TriggerInfo &rhs)
extraction operators
Definition: TriggerInfo.cxx:242