25 MEs_.at(
"DesyncByLumi").reset();
26 MEs_.at(
"FEByLumi").reset();
27 MEs_.at(
"FEStatusErrMapByLumi").reset();
43 if (gtFED.size() >
sizeof(
uint64_t)) {
44 const uint32_t* halfHeader =
reinterpret_cast<const uint32_t*
>(gtFED.data());
45 l1A_ = *(halfHeader + 1) & 0xffffff;
48 for (
int iFED(601); iFED <= 654; iFED++) {
50 unsigned length(fedData.size() /
sizeof(
uint64_t));
52 const uint64_t* pData(reinterpret_cast<uint64_t const*>(fedData.data()));
53 if ((pData[length - 1] & 0x4) != 0)
54 meCRC.fill(iFED - 600);
65 MESet& meTriggerType(
MEs_.at(
"TriggerType"));
71 MESet& meBXFEInvalid(
MEs_.at(
"BXFEInvalid"));
74 MESet& meFEStatusErrMapByLumi(
MEs_.at(
"FEStatusErrMapByLumi"));
75 MESet& meDesyncByLumi(
MEs_.at(
"DesyncByLumi"));
76 MESet& meDesyncTotal(
MEs_.at(
"DesyncTotal"));
82 MESet& meTrendNSyncErrors(
MEs_.at(
"L1ATCC"));
83 MESet& meEventTypePreCalib(
MEs_.at(
"EventTypePreCalib"));
84 MESet& meEventTypeCalib(
MEs_.at(
"EventTypeCalib"));
85 MESet& meEventTypePostCalib(
MEs_.at(
"EventTypePostCalib"));
89 map<int, int> l1aCounts;
91 l1aCounts[dcchItr->getLV1()]++;
94 for (map<int, int>::iterator l1aItr(l1aCounts.begin()); l1aItr != l1aCounts.end(); ++l1aItr) {
95 if (l1aItr->second > maxVote) {
96 maxVote = l1aItr->second;
103 int dccId(dcchItr->id());
105 int dccL1A(dcchItr->getLV1());
106 short dccL1AShort(dccL1A & 0xfff);
107 int dccBX(dcchItr->getBX());
109 meOrbitDiff.fill(
dccId, dcchItr->getOrbit() -
orbit_);
110 meBXDCCDiff.fill(
dccId, dccBX -
bx_);
112 meBXFEInvalid.fill(
dccId, 68.5);
115 meRunNumber.fill(
dccId);
116 if (dcchItr->getOrbit() !=
orbit_)
119 meTriggerType.fill(
dccId);
121 meL1ADCC.fill(
dccId);
125 const vector<short>& feStatus(dcchItr->getFEStatus());
126 const vector<short>& feBxs(dcchItr->getFEBxs());
127 const vector<short>& feL1s(dcchItr->getFELv1());
130 double statusError(0.);
132 for (
unsigned iFE(0); iFE < feStatus.size(); iFE++) {
136 short status(feStatus[iFE]);
138 if (feBxs[iFE] != -1 && dccBX != -1) {
139 meBXFEDiff.fill(
dccId, feBxs[iFE] - dccBX);
141 if (feBxs[iFE] == -1)
142 meBXFEInvalid.fill(
dccId, iFE + 0.5);
145 if (feBxs[iFE] != dccBX && feBxs[iFE] != -1 && dccBX != -1) {
146 meBXFE.fill(
dccId, iFE + 0.5);
152 if (feL1s[iFE] +
feL1Offset_ != dccL1AShort && feL1s[iFE] != -1 && dccL1AShort != 0) {
153 meL1AFE.fill(
dccId, iFE + 0.5);
162 meFEStatus.fill(
id, status);
166 meFEStatusErrMapByLumi.fill(
id, status);
187 meDesyncByLumi.fill(
dccId, feDesync);
188 meDesyncTotal.fill(
dccId, feDesync);
191 if (statusError > 0.)
192 meFEByLumi.fill(
dccId, statusError);
194 const vector<short>& tccBx(dcchItr->getTCCBx());
195 const vector<short>& tccL1(dcchItr->getTCCLv1());
197 if (tccBx.size() == 4) {
198 if (dccId <= kEEmHigh + 1 || dccId >=
kEEpLow + 1) {
199 for (
int iTCC(0); iTCC < 4; iTCC++) {
200 if (tccBx[iTCC] != dccBX && tccBx[iTCC] != -1 && dccBX != -1)
203 if (tccL1[iTCC] != dccL1AShort && tccL1[iTCC] != -1 && dccL1AShort != 0)
204 meL1ATCC.fill(
dccId);
207 if (tccBx[0] != dccBX && tccBx[0] != -1 && dccBX != -1)
210 if (tccL1[0] != dccL1AShort && tccL1[0] != -1 && dccL1AShort != 0)
211 meL1ATCC.fill(
dccId);
215 short srpBx(dcchItr->getSRPBx());
216 short srpL1(dcchItr->getSRPLv1());
218 if (srpBx != dccBX && srpBx != -1 && dccBX != -1)
221 if (srpL1 != dccL1AShort && srpL1 != -1 && dccL1AShort != 0)
222 meL1ASRP.fill(
dccId);
224 const int calibBX(3490);
226 short runType(dcchItr->getRunType() + 1);
227 if (runType < 0 || runType > 22)
231 else if (dccBX == calibBX)
static const char runNumber_[]
#define DEFINE_ECALDQM_WORKER(TYPE)
edm::LuminosityBlockNumber_t iLumi
void runOnRawData(EcalRawDataCollection const &)
EcalElectronicsMapping const * getElectronicsMap()
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
bool ccuExists(unsigned, unsigned)
void addDependencies(DependencySet &) override
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::RunNumber_t runNumber_
void beginRun(edm::Run const &, edm::EventSetup const &) override
void runOnSource(FEDRawDataCollection const &)
void beginEvent(edm::Event const &, edm::EventSetup const &) override
const_iterator end() const
unsigned long long uint64_t
edm::EventAuxiliary::ExperimentType experimentType() const
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void push_back(Dependency const &_d)
unsigned dccId(DetId const &)
const_iterator begin() const