29 if (ByLumiResetSwitch) {
41 if (gtFED.size() >
sizeof(
uint64_t)) {
42 const uint32_t* halfHeader = reinterpret_cast<const uint32_t*>(gtFED.data());
43 l1A_ = *(halfHeader + 1) & 0xffffff;
46 for (
int iFED(601); iFED <= 654; iFED++) {
48 unsigned length(fedData.size() /
sizeof(
uint64_t));
50 const uint64_t* pData(reinterpret_cast<uint64_t const*>(fedData.data()));
51 if ((pData[length - 1] & 0x4) != 0)
52 meCRC.fill(iFED - 600);
72 MESet& meFEStatusErrMapByLumi(
MEs_.
at(
"FEStatusErrMapByLumi"));
82 MESet& meEventTypePreCalib(
MEs_.
at(
"EventTypePreCalib"));
84 MESet& meEventTypePostCalib(
MEs_.
at(
"EventTypePostCalib"));
88 map<int, int> l1aCounts;
90 l1aCounts[dcchItr->getLV1()]++;
93 for (map<int, int>::iterator l1aItr(l1aCounts.begin()); l1aItr != l1aCounts.end(); ++l1aItr) {
94 if (l1aItr->second > maxVote) {
95 maxVote = l1aItr->second;
102 int dccId(dcchItr->id());
104 int dccL1A(dcchItr->getLV1());
105 short dccL1AShort(dccL1A & 0xfff);
106 int dccBX(dcchItr->getBX());
108 meOrbitDiff.fill(
dccId, dcchItr->getOrbit() -
orbit_);
109 meBXDCCDiff.fill(
dccId, dccBX -
bx_);
111 meBXFEInvalid.fill(
dccId, 68.5);
114 meRunNumber.fill(
dccId);
115 if (dcchItr->getOrbit() !=
orbit_)
118 meTriggerType.fill(
dccId);
120 meL1ADCC.fill(
dccId);
124 const vector<short>& feStatus(dcchItr->getFEStatus());
125 const vector<short>& feBxs(dcchItr->getFEBxs());
126 const vector<short>& feL1s(dcchItr->getFELv1());
129 double statusError(0.);
131 for (
unsigned iFE(0); iFE < feStatus.size(); iFE++) {
135 short status(feStatus[iFE]);
137 if (feBxs[iFE] != -1 && dccBX != -1) {
138 meBXFEDiff.fill(
dccId, feBxs[iFE] - dccBX);
140 if (feBxs[iFE] == -1)
141 meBXFEInvalid.fill(
dccId, iFE + 0.5);
144 if (feBxs[iFE] != dccBX && feBxs[iFE] != -1 && dccBX != -1) {
145 meBXFE.fill(
dccId, iFE + 0.5);
151 if (feL1s[iFE] +
feL1Offset_ != dccL1AShort && feL1s[iFE] != -1 && dccL1AShort != 0) {
152 meL1AFE.fill(
dccId, iFE + 0.5);
164 else if (iFE + 1 == 70)
170 meFEStatus.fill(
id,
status);
174 meFEStatusErrMapByLumi.fill(
id,
status);
195 meDesyncByLumi.fill(
dccId, feDesync);
196 meDesyncTotal.fill(
dccId, feDesync);
199 if (statusError > 0.)
200 meFEByLumi.fill(
dccId, statusError);
202 const vector<short>& tccBx(dcchItr->getTCCBx());
203 const vector<short>& tccL1(dcchItr->getTCCLv1());
205 if (tccBx.size() == 4) {
206 if (dccId <= kEEmHigh + 1 || dccId >=
kEEpLow + 1) {
207 for (
int iTCC(0); iTCC < 4; iTCC++) {
208 if (tccBx[iTCC] != dccBX && tccBx[iTCC] != -1 && dccBX != -1)
211 if (tccL1[iTCC] != dccL1AShort && tccL1[iTCC] != -1 && dccL1AShort != 0)
212 meL1ATCC.fill(
dccId);
215 if (tccBx[0] != dccBX && tccBx[0] != -1 && dccBX != -1)
218 if (tccL1[0] != dccL1AShort && tccL1[0] != -1 && dccL1AShort != 0)
219 meL1ATCC.fill(
dccId);
223 short srpBx(dcchItr->getSRPBx());
224 short srpL1(dcchItr->getSRPLv1());
226 if (srpBx != dccBX && srpBx != -1 && dccBX != -1)
229 if (srpL1 != dccL1AShort && srpL1 != -1 && dccL1AShort != 0)
230 meL1ASRP.fill(
dccId);
232 const int calibBX(3490);
234 short runType(dcchItr->getRunType() + 1);
235 if (runType < 0 || runType > 22)
239 else if (dccBX == calibBX)