33 meESFedsEntries_ =
nullptr;
34 meESFedsFatal_ =
nullptr;
35 meESFedsNonFatal_ =
nullptr;
45 sprintf(histo,
"FEDEntries");
46 meESFedsEntries_ = iBooker.
book1D(histo, histo, 56, 520, 576);
48 sprintf(histo,
"FEDFatal");
49 meESFedsFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
51 sprintf(histo,
"FEDNonFatal");
52 meESFedsNonFatal_ = iBooker.
book1D(histo, histo, 56, 520, 576);
60 int esDCC_L1A_MostFreqCounts = 0;
61 int esDCC_BX_MostFreqCounts = 0;
62 int esDCC_OrbitNumber_MostFreqCounts = 0;
63 int gtFedDataSize = 0;
68 if (e.
getByToken(FEDRawDataCollection_, allFedRawData)) {
70 for (
int esFED = 520; esFED <= 575; ++esFED) {
71 const FEDRawData& fedData = allFedRawData->FEDData(esFED);
76 meESFedsEntries_->Fill(esFED);
80 const FEDRawData& gtFedData = allFedRawData->FEDData(812);
84 if (gtFedDataSize > 0) {
91 map<int, int> esDCC_L1A_FreqMap;
92 map<int, int> esDCC_BX_FreqMap;
93 map<int, int> esDCC_OrbitNumber_FreqMap;
99 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
100 esDCC_BX_FreqMap[esdcc.
getBX()]++;
103 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
104 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
108 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
109 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
113 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
114 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
119 LogWarning(
"ESFEDIntegrityTask") <<
"dccCollections not available";
124 LogWarning(
"ESFEDIntegrityTask") <<
"FEDRawDataCollection not available";
127 vector<int> fiberStatus;
134 meESFedsFatal_->Fill(dcc.
fedId());
142 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 3.);
144 for (
unsigned int i = 0;
i < 12; ++
i) {
145 if (fiberStatus[
i] == 8 || fiberStatus[
i] == 10 || fiberStatus[
i] == 11 || fiberStatus[
i] == 12)
146 if (meESFedsNonFatal_)
147 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 12.);
151 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 3.);
153 for (
unsigned int i = 12;
i < 24; ++
i) {
154 if (fiberStatus[
i] == 8 || fiberStatus[
i] == 10 || fiberStatus[
i] == 11 || fiberStatus[
i] == 12)
155 if (meESFedsNonFatal_)
156 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 12.);
160 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 3.);
162 for (
unsigned int i = 24;
i < 36; ++
i) {
163 if (fiberStatus[
i] == 8 || fiberStatus[
i] == 10 || fiberStatus[
i] == 11 || fiberStatus[
i] == 12)
164 if (meESFedsNonFatal_)
165 meESFedsNonFatal_->Fill(dcc.
fedId(), 1. / 12.);
170 if (dcc.
getLV1() != gt_L1A)
171 meESFedsNonFatal_->Fill(dcc.
fedId());
T getUntrackedParameter(std::string const &, T const &) const
const edm::EventSetup & c
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< T >::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
ESFEDIntegrityTask(const edm::ParameterSet &ps)
unsigned long long uint64_t
T getParameter(std::string const &) const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())