1 #ifndef UCTDAQRawData_hh 2 #define UCTDAQRawData_hh 16 if((d[0] & 0x5000000000000000) != 0x5000000000000000) {
17 edm::LogError(
"UCTDAQRawData") <<
"CDF Header does not seem to be correct" 18 << std::showbase << std::internal
19 << std::setfill(
'0') << std::setw(10)
22 <<
"; but continuing!" 36 uint32_t
FOV() {
return ((
myDataPtr[0] & 0x00000000000000F0) >> 4);}
42 return ((
myDataPtr[1] & 0x0000000FFFFFFFF0) >> 4);
51 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch board ID for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
59 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch amc no for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
67 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch amc block no for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
75 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch amc size for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
83 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch crcError-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
91 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch isValid-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
99 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch isPresent-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
107 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch isEnabled-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
115 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch isSegmented-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
123 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch more-bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
131 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch length error bit for AMC = " <<
amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
139 for(uint32_t
i = 0;
i <
amc;
i++) {
144 edm::LogError(
"UCTDAQRawData") <<
"UCTDAQRawData: Failed to fetch payload location for AMC = " << amc <<
"; Max AMC = " <<
nAMCs() << std::endl;
150 for(uint32_t
i = 0;
i <
nAMCs();
i++) {
158 return (data[0] & 0x0000000000000FFF);
163 return ((data[0] & 0x00000000000FF000) >> 12);
168 return ((data[0] & 0x000000000FF00000) >> 20);
173 return ((data[0] & 0xFFFFFFFF00000000) >> 32);
178 for(uint32_t
i = 0;
i <
nAMCs();
i++) {
183 if((data[0] & 0xF000000000000000) != 0xA000000000000000) {
184 edm::LogError(
"UCTDAQRawData") <<
"CDF Trailer seems to be wrong : " 185 << std::showbase << std::internal
186 << std::setfill(
'0') << std::setw(10)
196 return ((data[0] & 0x0000000000000004) != 0);
201 return ((data[0] & 0x0000000000000008) != 0);
206 return ((data[0] & 0x00000000000000F0) >> 4);
211 return ((data[0] & 0x0000000000000F00) >> 8);
216 return ((data[0] & 0x0000000000004000) != 0);
221 return ((data[0] & 0x0000000000008000) != 0);
226 return ((data[0] & 0x00000000FFFF0000) >> 16);
231 return ((data[0] & 0x00FFFFFF00000000) >> 32);
236 LogDebug(
"UCTDAQRawData") <<
"Common cDAQ/AMC13 Data Header:" << endl;
237 LogDebug(
"UCTDAQRawData") <<
"Framework Version = " <<
internal << setfill(
'0') << setw(3) << hex <<
FOV() << endl;
239 LogDebug(
"UCTDAQRawData") <<
"BXID............. = " <<
dec <<
BXID() << endl;
240 LogDebug(
"UCTDAQRawData") <<
"L1ID............. = " <<
internal << setfill(
'0') << setw(8) << hex <<
L1ID() << endl;
241 LogDebug(
"UCTDAQRawData") <<
"eventType........ = " <<
internal << setfill(
'0') << setw(3) << hex <<
eventType() << endl;
243 LogDebug(
"UCTDAQRawData") <<
"uFOV............. = " <<
internal << setfill(
'0') << setw(8) << hex <<
uFOV() << endl;
244 LogDebug(
"UCTDAQRawData") <<
"# of CTP7s....... = " <<
dec <<
nAMCs() << endl;
245 LogDebug(
"UCTDAQRawData") <<
"Phi SlotNo BlockNo Size CRC? Valid? Present? Enabled? Segmented? More? LengthError?" << endl;
246 for(uint32_t
i = 0;
i <
nAMCs();
i++) {
248 <<
dec << setfill(
' ') << setw(6) <<
amcNo(
i) <<
" " 250 <<
dec << setfill(
' ') << setw(8) <<
amcSize(
i) <<
" " 256 <<
" " <<
more(
i) <<
" " 259 LogDebug(
"UCTDAQRawData") <<
"AMC13 Trailer:" << endl;
263 LogDebug(
"UCTDAQRawData") <<
"AMC13 CRC32...... = " <<
internal << setfill(
'0') << setw(10) << hex <<
amc13BXID() << endl;
264 LogDebug(
"UCTDAQRawData") <<
"Common DAQ Trailer:" << endl;
267 LogDebug(
"UCTDAQRawData") <<
"ttsBits.......... = " <<
internal << setfill(
'0') << setw(3) << hex <<
ttsBits() << endl;
268 LogDebug(
"UCTDAQRawData") <<
"Event Status..... = " <<
internal << setfill(
'0') << setw(3) << hex <<
eventStatus() << endl;
271 LogDebug(
"UCTDAQRawData") <<
"CRC 16........... = " <<
internal << setfill(
'0') << setw(6) << hex <<
crc16() << endl;
const uint64_t * cdfHeader() const
UCTDAQRawData(const uint64_t *d)
bool isPresent(uint32_t amc=0)
const uint64_t * myDataPtr
bool crcError(uint32_t amc=0)
const uint64_t * cdfTrailerPtr()
const uint64_t * amc13TrailerPtr()
uint32_t boardID(uint32_t amc=0)
bool isEnabled(uint32_t amc=0)
const UCTDAQRawData & operator=(const UCTDAQRawData &i)=delete
uint32_t amcSize(uint32_t amc=0)
bool isSegmented(uint32_t amc=0)
uint32_t amcBlkNo(uint32_t amc=0)
const uint64_t * dataPtr() const
const uint32_t * amcPayload(uint32_t amc)
unsigned long long uint64_t
bool isSLinkErrorDetectedByFRL()
bool lengthError(uint32_t amc=0)
char data[epos_bytes_allocation]
uint32_t amcNo(uint32_t amc=0)
bool isValid(uint32_t amc=0)
bool more(uint32_t amc=0)