34 meESFedsEntries_ =
nullptr;
35 meESFedsFatal_ =
nullptr;
36 meESFedsNonFatal_ =
nullptr;
49 sprintf(histo,
"FEDEntries");
50 meESFedsEntries_ = iBooker.
book1D(histo, histo, 56, 520, 576);
52 sprintf(histo,
"FEDFatal");
53 meESFedsFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
55 sprintf(histo,
"FEDNonFatal");
56 meESFedsNonFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
61 LogInfo(
"ESFEDIntegrityTask") <<
"analyzed " << ievt_ <<
" events";
71 int esDCC_L1A_MostFreqCounts = 0;
72 int esDCC_BX_MostFreqCounts = 0;
73 int esDCC_OrbitNumber_MostFreqCounts = 0;
74 int gtFedDataSize = 0;
79 if ( e.
getByToken(FEDRawDataCollection_, allFedRawData) ) {
82 for (
int esFED=520; esFED<=575; ++esFED) {
88 if ( meESFedsEntries_ ) meESFedsEntries_->Fill(esFED);
96 if ( gtFedDataSize > 0 ) {
105 map<int, int> esDCC_L1A_FreqMap;
106 map<int, int> esDCC_BX_FreqMap;
107 map<int, int> esDCC_OrbitNumber_FreqMap;
114 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
115 esDCC_BX_FreqMap[esdcc.
getBX()]++;
118 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
119 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
123 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
124 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
128 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
129 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
135 LogWarning(
"ESFEDIntegrityTask") <<
"dccCollections not available";
141 LogWarning(
"ESFEDIntegrityTask") <<
"FEDRawDataCollection not available";
144 vector<int> fiberStatus;
151 if ( meESFedsFatal_ ) meESFedsFatal_->Fill(dcc.
fedId());
158 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
160 for (
unsigned int i=0;
i<12; ++
i) {
161 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
162 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
166 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
168 for (
unsigned int i=12;
i<24; ++
i) {
169 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
170 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
174 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
176 for (
unsigned int i=24;
i<36; ++
i) {
177 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
178 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
183 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
void setCurrentFolder(std::string const &fullpath)
ESFEDIntegrityTask(const edm::ParameterSet &ps)
MonitorElement * book1D(Args &&...args)
Namespace of DDCMS conversion namespace.
const_iterator end() const
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