12 const unsigned long * buffer = (
reinterpret_cast<unsigned long*
>(
const_cast<unsigned char*
> ( fedData.
data())));
13 int fedLenght = fedData.
size();
18 edm::LogError(
"EcalSupervisorTBDataFormatter") <<
"EcalSupervisorTBData has size " << fedLenght
19 <<
" Bytes as opposed to expected "
29 a = buffer[wordCounter];wordCounter++;
33 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Burst number:\t" <<
b;
36 a = buffer[wordCounter];wordCounter++;
40 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Sync Error:\t" <<
b;
41 a = buffer[wordCounter];wordCounter++;
44 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Run Number:\t" <<
b;
45 a = buffer[wordCounter];wordCounter++;
48 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Version Number:\t" <<
b;
50 int numberOfMagnetMeasurements = -1;
55 numberOfMagnetMeasurements=
b;
57 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Number Of Magnet Measurements:\t" <<
b;
60 a = buffer[wordCounter];wordCounter++;
63 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"Event Number:\t" <<
b;
64 a = buffer[wordCounter];wordCounter++;
67 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstTimeSec:\t" <<
b;
68 a = buffer[wordCounter];wordCounter++;
71 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstTimeMsec:\t" <<
b;
72 a = buffer[wordCounter];wordCounter++;
75 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstTimeSec:\t" <<
b;
76 a = buffer[wordCounter];wordCounter++;
79 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstTimeMsec:\t" <<
b;
80 a = buffer[wordCounter];wordCounter++;
83 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"BegBurstLV1A:\t" <<
b;
84 a = buffer[wordCounter];wordCounter++;
87 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"EndBurstLV1A:\t" <<
b;
91 std::vector<EcalTBEventHeader::magnetsMeasurement_t> magnetMeasurements;
92 for (
int iMagMeas = 0; iMagMeas < numberOfMagnetMeasurements; iMagMeas ++)
94 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"++++++ New Magnet Measurement++++++\t" << (iMagMeas + 1);
97 a = buffer[wordCounter];wordCounter++;
100 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet6ReadAmpere:\t" <<
b;
101 a = buffer[wordCounter];wordCounter++;
104 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet6SetAmpere:\t" <<
b;
105 a = buffer[wordCounter];wordCounter++;
108 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet7ReadAmpere:\t" <<
b;
109 a = buffer[wordCounter];wordCounter++;
112 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"NominalMagnet7SetAmpere:\t" <<
b;
113 a = buffer[wordCounter];wordCounter++;
116 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet7MicroVolt:\t" <<
b;
117 a = buffer[wordCounter];wordCounter++;
120 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet7Ampere:\t" <<
b;
121 a = buffer[wordCounter];wordCounter++;
124 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet6MicroVolt:\t" <<
b;
125 a = buffer[wordCounter];wordCounter++;
128 LogDebug(
"EcalSupervisorTBDataFormatter") <<
"MeasuredMagnet6Ampere:\t" <<
b;
129 magnetMeasurements.push_back(aMeasurement);
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.