ATLAS Offline Software
TriggerInfo.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 
14 #include <iomanip>
15 
16 #include "EventInfo/TriggerInfo.h"
17 
18 
19 
21  const std::string& type,
22  bool obeysLumiblock,
23  const std::set<number_type>& robs,
24  const std::set<number_type>& dets
25  )
26  :
27  m_name(name),
28  m_type(type),
29  m_obeysLumiblock(obeysLumiblock),
30  m_robs(robs),
31  m_dets(dets)
32 {}
33 
35  std::string&& type,
36  bool obeysLumiblock)
37  :
38  m_name(std::move(name)),
39  m_type(std::move(type)),
40  m_obeysLumiblock(obeysLumiblock)
41 {}
42 
44  :
45  m_obeysLumiblock(false)
46 {}
47 
48 
49 const std::string&
51  return(m_name);
52 }
53 
54 const std::string&
56  return(m_type);
57 }
58 
59 bool
61  return(m_obeysLumiblock);
62 }
63 
64 const std::set<TriggerInfo::number_type>&
66  return(m_robs);
67 }
68 
69 const std::set<TriggerInfo::number_type>&
71  return(m_dets);
72 }
73 
75  :
76  m_statusElement(0),
79 {}
80 
82  number_type extendedLevel1ID,
83  number_type level1TriggerType,
84  const std::vector<number_type>& level1TriggerInfo)
85  :
86  m_statusElement(statusElement),
87  m_extendedLevel1ID(extendedLevel1ID),
88  m_level1TriggerType(level1TriggerType),
89  m_level1TriggerInfo(level1TriggerInfo)
90 {}
91 
93  number_type extendedLevel1ID,
94  number_type level1TriggerType,
95  const std::vector<number_type>& level2TriggerInfo,
96  const std::vector<number_type>& eventFilterInfo,
97  const std::vector<StreamTag>& streamTags)
98  :
99  m_statusElement(statusElement),
100  m_extendedLevel1ID(extendedLevel1ID),
101  m_level1TriggerType(level1TriggerType),
102  m_level2TriggerInfo(level2TriggerInfo),
103  m_eventFilterInfo(eventFilterInfo),
104  m_streamTags(streamTags)
105 {}
106 
108  number_type extendedLevel1ID,
109  number_type level1TriggerType,
110  const std::vector<number_type>& level1TriggerInfo,
111  const std::vector<number_type>& level2TriggerInfo,
112  const std::vector<number_type>& eventFilterInfo,
113  const std::vector<StreamTag>& streamTags)
114  :
115  m_statusElement(statusElement),
116  m_extendedLevel1ID(extendedLevel1ID),
117  m_level1TriggerType(level1TriggerType),
118  m_level1TriggerInfo(level1TriggerInfo),
119  m_level2TriggerInfo(level2TriggerInfo),
120  m_eventFilterInfo(eventFilterInfo),
121  m_streamTags(streamTags)
122 {}
123 
125 {}
126 
129  return(m_statusElement);
130 }
131 
134  return(m_extendedLevel1ID);
135 }
136 
139  return(m_level1TriggerType);
140 }
141 
142 const std::vector<TriggerInfo::number_type>&
144  return(m_level1TriggerInfo);
145 }
146 
147 const std::vector<TriggerInfo::number_type>&
149  return(m_level2TriggerInfo);
150 }
151 
152 const std::vector<TriggerInfo::number_type>&
154  return(m_eventFilterInfo);
155 }
156 
157 const std::vector<TriggerInfo::StreamTag>&
159  return(m_streamTags);
160 }
161 
162 void
165 }
166 
167 void
170 }
171 
172 void
175 }
176 
177 void
178 TriggerInfo::setLevel1TriggerInfo(const std::vector<number_type>& level1TriggerInfo) {
180 }
181 
182 void
183 TriggerInfo::setLevel1TriggerInfo(std::vector<number_type>&& level1TriggerInfo) {
185 }
186 
187 void
188 TriggerInfo::setLevel2TriggerInfo(const std::vector<number_type>& level2TriggerInfo) {
190 }
191 
192 void
193 TriggerInfo::setLevel2TriggerInfo(std::vector<number_type>&& level2TriggerInfo) {
195 }
196 
197 void
198 TriggerInfo::setEventFilterInfo(const std::vector<number_type>& eventFilterInfo) {
200 }
201 
202 void
203 TriggerInfo::setEventFilterInfo(std::vector<number_type>&& eventFilterInfo) {
204  m_eventFilterInfo = std::move(eventFilterInfo);
205 }
206 
207 void
208 TriggerInfo::setStreamTags(const std::vector<StreamTag>& streamTags) {
210 }
211 
212 void
213 TriggerInfo::setStreamTags(std::vector<StreamTag>&& streamTags) {
214  m_streamTags = std::move(streamTags);
215 }
216 
217 std::ostream&
218 operator << (std::ostream& os, const std::vector<TriggerInfo::number_type>& rhs) {
219  // switch to hex format
220  os << std::hex << std::setfill('0');
221 
222  if (rhs.size() > 0) os << " 0x" << std::setw(8) << rhs[0];
223  for (size_t i(1); i < rhs.size(); ++i)
224  os << ", 0x" << std::setw(8) << rhs[i];
225 
226  // switch back to normal format
227  os << std::dec << std::setfill(' ');
228 
229  return os;
230 }
231 
232 std::ostream&
233 operator << (std::ostream& os, const std::vector<TriggerInfo::StreamTag>& rhs) {
234  if (rhs.size() > 0) os << "(" << rhs[0].name() << "," << rhs[0].type() << "," << rhs[0].obeysLumiblock() << ")";
235  for (size_t i(1); i < rhs.size(); ++i)
236  os << ",(" << rhs[i].name() << "," << rhs[i].type() << "," << rhs[i].obeysLumiblock() << ")";
237 
238  return os;
239 }
240 
241 std::ostream&
242 operator << (std::ostream& os, const TriggerInfo& rhs) {
243  os << "\n [S,L1ID,L1TT] = ["
244  << rhs.m_statusElement
245  << "," << rhs.m_extendedLevel1ID
246  << "," << rhs.m_level1TriggerType
247  << "]"
248  << "\n L1: [" << rhs.m_level1TriggerInfo << "]"
249  << "\n L2: [" << rhs.m_level2TriggerInfo << "]"
250  << "\n EF: [" << rhs.m_eventFilterInfo << "]"
251  << "\n ST: [" << rhs.m_streamTags << "]";
252 
253  return os;
254 }
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.h
This class contains trigger related information.
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
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
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::type
const std::string & type() const
Definition: TriggerInfo.cxx:55
lumiFormat.i
int i
Definition: lumiFormat.py:85
TriggerInfo::level2TriggerInfo
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
Definition: TriggerInfo.cxx:148
python.HLT.CommonSequences.EventBuildingSequences.robs
robs
Definition: EventBuildingSequences.py:401
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TriggerInfo::StreamTag::robs
const std::set< number_type > & robs() const
Optional list of ROBIDs for PEB.
Definition: TriggerInfo.cxx:65
python.HLT.CommonSequences.EventBuildingSequences.dets
dets
Definition: EventBuildingSequences.py:402
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
operator<<
std::ostream & operator<<(std::ostream &os, const std::vector< TriggerInfo::number_type > &rhs)
Definition: TriggerInfo.cxx:218
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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