8 const unsigned long*
buffer =
reinterpret_cast<const unsigned long*
>(fedData.
data());
9 int fedLenght = fedData.
size();
14 <<
"EcalSupervisorTBData has size " << fedLenght <<
" Bytes as opposed to expected " << (
nWordsPerEvent * 4)
23 a = buffer[wordCounter];
28 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Burst number:\t" <<
b;
31 a = buffer[wordCounter];
36 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Sync Error:\t" <<
b;
37 a = buffer[wordCounter];
41 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Run Number:\t" <<
b;
42 a = buffer[wordCounter];
46 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Version Number:\t" <<
b;
48 int numberOfMagnetMeasurements = -1;
52 numberOfMagnetMeasurements =
b;
54 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Number Of Magnet Measurements:\t" <<
b;
57 a = buffer[wordCounter];
61 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Event Number:\t" <<
b;
62 a = buffer[wordCounter];
66 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstTimeSec:\t" <<
b;
67 a = buffer[wordCounter];
71 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstTimeMsec:\t" <<
b;
72 a = buffer[wordCounter];
76 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstTimeSec:\t" <<
b;
77 a = buffer[wordCounter];
81 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstTimeMsec:\t" <<
b;
82 a = buffer[wordCounter];
86 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstLV1A:\t" <<
b;
87 a = buffer[wordCounter];
91 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstLV1A:\t" <<
b;
94 std::vector<EcalTBEventHeader::magnetsMeasurement_t> magnetMeasurements;
95 for (
int iMagMeas = 0; iMagMeas < numberOfMagnetMeasurements; iMagMeas++) {
96 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"++++++ New Magnet Measurement++++++\t" << (iMagMeas + 1);
99 a = buffer[wordCounter];
101 b = (a & 0xffffffff);
103 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet6ReadAmpere:\t" <<
b;
104 a = buffer[wordCounter];
106 b = (a & 0xffffffff);
108 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet6SetAmpere:\t" <<
b;
109 a = buffer[wordCounter];
111 b = (a & 0xffffffff);
113 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet7ReadAmpere:\t" <<
b;
114 a = buffer[wordCounter];
116 b = (a & 0xffffffff);
118 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet7SetAmpere:\t" <<
b;
119 a = buffer[wordCounter];
121 b = (a & 0xffffffff);
123 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet7MicroVolt:\t" <<
b;
124 a = buffer[wordCounter];
126 b = (a & 0xffffffff);
128 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet7Ampere:\t" <<
b;
129 a = buffer[wordCounter];
131 b = (a & 0xffffffff);
133 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet6MicroVolt:\t" <<
b;
134 a = buffer[wordCounter];
136 b = (a & 0xffffffff);
138 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet6Ampere:\t" <<
b;
139 magnetMeasurements.push_back(aMeasurement);
Log< level::Error, false > LogError
size_t size() const
Lenght of the data buffer in bytes.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.