ATLAS Offline Software
Loading...
Searching...
No Matches
RODHeader_v2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: RODHeader_v2.cxx 694350 2015-09-11 12:02:19Z krasznaa $
6
7// System include(s):
8#include <cmath>
9
10// EDM includes(s):
12
13// Local include(s):
15
16namespace xAOD{
17
22
23 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , version , setVersion )
24 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , sourceId , setSourceId )
25 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , run , setRun )
26 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , lvl1Id , setLvl1Id )
27 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , bcid , setBcid )
28 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , trigType , setTrigType )
29 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , lvl1DetType , setLvl1DetType )
30 AUXSTORE_OBJECT_SETTER_AND_GETTER( RODHeader_v2 , std::vector<unsigned int> , statusWords , setStatusWords )
31 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , payloadSize , setPayloadSize )
32
47
48
49 // Header data
51 {
52 return (version() >> 16) & 0xffff;
53 }
54
56 {
57 return version() & 0xffff;
58 }
59
61 {
62 return sourceId();
63 }
64
66 {
67 return (sourceId() >> 16) & 0xff;
68 }
69
71 {
72 return sourceId() & 0xffff;
73 }
74
76 {
77 return sourceId() & 0xf;
78 }
79
81 {
82 return (sourceId() >> 4) & 0x3;
83 }
84
86 {
87 return (sourceId() >> 7) & 0x1;
88 }
89
91 {
92 return (run() >> 24) & 0xff;
93 }
94
96 {
97 return run() & 0xffffff;
98 }
99
101 {
102 return lvl1Id();
103 }
104
106 {
107 return (lvl1Id() >> 24) & 0xff;
108 }
109
111 {
112 return lvl1Id() & 0xffffff;
113 }
114
116 {
117 return bcid();
118 }
119
121 {
122 return trigType();
123 }
124
126 {
127 return lvl1DetType();
128 }
129
131 {
132 return (lvl1DetType() >> 16) & 0xffff;
133 }
134
136 {
137 return (lvl1DetType() >> 4) & 0xfff;
138 }
139
141 {
142 return lvl1DetType() & 0xf;
143 }
144
145
146 // Status bits - word 1
148 {
149 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x1;
150 }
151
153 {
154 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x4;
155 }
156
158 {
159 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x8;
160 }
161
163 {
164 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x10;
165 }
166
168 {
169 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x10000;
170 }
171
173 {
174 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x20000;
175 }
176
178 {
179 return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x40000;
180 }
181
182 // Status bits - word 2
184 {
185 return (statusWords().size() < 2) ? false : statusWords()[ 1 ] & 0x2;
186 }
187
189 {
190 return (statusWords().size() < 2) ? false : statusWords()[ 1 ] & 0x10000;
191 }
192
193
194} // namespace xAOD
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
uint16_t bcId(uint32_t data)
AuxElement()
Default constructor.
Description of RODHeader_v2.
void setBcid(unsigned int)
set bcid
void setPayloadSize(unsigned int)
set payloadSize
void setVersion(unsigned int)
set version
unsigned int sourceId() const
get sourceId
int majorVersion() const
virtual void initialize(uint32_t version, uint32_t sourceId, uint32_t run, uint32_t lvl1Id, uint32_t bcId, uint32_t trigType, uint32_t lvl1DetType, const std::vector< uint32_t > &statusWords, uint32_t nData)
int minorVersion() const
bool gLinkError() const
unsigned int version() const
get version
int subDetectorID() const
void setTrigType(unsigned int)
set trigType
int extendedL1ID() const
void setLvl1DetType(unsigned int)
set detType
unsigned int lvl1DetType() const
get detType
int bunchCrossing() const
bool triggerTypeTimeout() const
void setLvl1Id(unsigned int)
set lvl1Id
void setStatusWords(const std::vector< unsigned int > &)
set statusWords
bool bcnMismatch() const
int detEventType() const
bool lvdsLinkError() const
unsigned int trigType() const
get trigType
void setRun(unsigned int)
set run
bool gLinkTimeout() const
unsigned int lvl1Id() const
get lvl1Id
const std::vector< unsigned int > & statusWords() const
get statusWords
int l1TriggerType() const
unsigned int bcid() const
get bcid
unsigned int run() const
get run
bool dataTransportError() const
bool rodFifoOverflow() const
bool cmmParityError() const
int runNumber() const
bool limitedRoISet() const
void setSourceId(unsigned int)
set sourceId
Forward declaration.
Definition run.py:1
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setEventNumber setTimeStamp bcid
setEventNumber uint32_t