35 meESFedsEntries_ =
nullptr;
36 meESFedsFatal_ =
nullptr;
37 meESFedsNonFatal_ =
nullptr;
50 sprintf(histo,
"FEDEntries");
51 meESFedsEntries_ = iBooker.
book1D(histo, histo, 56, 520, 576);
53 sprintf(histo,
"FEDFatal");
54 meESFedsFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
56 sprintf(histo,
"FEDNonFatal");
57 meESFedsNonFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
62 LogInfo(
"ESFEDIntegrityTask") <<
"analyzed " << ievt_ <<
" events";
72 int esDCC_L1A_MostFreqCounts = 0;
73 int esDCC_BX_MostFreqCounts = 0;
74 int esDCC_OrbitNumber_MostFreqCounts = 0;
75 int gtFedDataSize = 0;
80 if ( e.
getByToken(FEDRawDataCollection_, allFedRawData) ) {
83 for (
int esFED=520; esFED<=575; ++esFED) {
89 if ( meESFedsEntries_ ) meESFedsEntries_->Fill(esFED);
97 if ( gtFedDataSize > 0 ) {
106 map<int, int> esDCC_L1A_FreqMap;
107 map<int, int> esDCC_BX_FreqMap;
108 map<int, int> esDCC_OrbitNumber_FreqMap;
115 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
116 esDCC_BX_FreqMap[esdcc.
getBX()]++;
119 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
120 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
124 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
125 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
129 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
130 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
136 LogWarning(
"ESFEDIntegrityTask") <<
"dccCollections not available";
142 LogWarning(
"ESFEDIntegrityTask") <<
"FEDRawDataCollection not available";
145 vector<int> fiberStatus;
152 if ( meESFedsFatal_ ) meESFedsFatal_->Fill(dcc.
fedId());
159 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
161 for (
unsigned int i=0;
i<12; ++
i) {
162 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
163 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
167 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
169 for (
unsigned int i=12;
i<24; ++
i) {
170 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
171 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
175 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
177 for (
unsigned int i=24;
i<36; ++
i) {
178 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
179 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
184 if (dcc.
getLV1() != gt_L1A) meESFedsNonFatal_->Fill(dcc.
fedId());
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< ESDCCHeaderBlock >::const_iterator const_iterator
size_t size() const
Lenght of the data buffer in bytes.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
ESFEDIntegrityTask(const edm::ParameterSet &ps)
MonitorElement * book1D(Args &&...args)
const_iterator end() const
void setCurrentFolder(const std::string &fullpath)
unsigned long long uint64_t
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
const_iterator begin() const