31 FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.
getParameter<
InputTag>(
"FEDRawDataCollection"));
47 sprintf(histo,
"ES L1A DCC errors");
48 meL1ADCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
50 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
52 sprintf(histo,
"ES BX DCC errors");
53 meBXDCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
55 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
57 sprintf(histo,
"ES Orbit Number DCC errors");
58 meOrbitNumberDCCErrors_ = iBooker.
book1D(histo, histo, 56, 519.5, 575.5);
60 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
62 sprintf(histo,
"Difference between ES and GT L1A");
63 meL1ADiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
65 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
67 sprintf(histo,
"Difference between ES and GT BX");
68 meBXDiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
70 meBXDiff_->setAxisTitle(
"Num of Events", 2);
72 sprintf(histo,
"Difference between ES and GT Orbit Number");
73 meOrbitNumberDiff_ = iBooker.
book1D(histo, histo, 201, -100.5, 100.5);
74 meOrbitNumberDiff_->
setAxisTitle(
"ES - GT orbit number", 1);
75 meOrbitNumberDiff_->setAxisTitle(
"Num of Events", 2);
80 runNum_ = e.
id().
run();
82 int gt_L1A = 0, gt_OrbitNumber = 0, gt_BX = 0;
83 int esDCC_L1A_MostFreqCounts = 0;
84 int esDCC_BX_MostFreqCounts = 0;
85 int esDCC_OrbitNumber_MostFreqCounts = 0;
90 int gtFedDataSize = 0;
92 if (e.
getByToken(FEDRawDataCollection_, allFedRawData)) {
94 const FEDRawData& gtFedData = allFedRawData->FEDData(812);
98 if (gtFedDataSize > 0) {
105 map<int, int> esDCC_L1A_FreqMap;
106 map<int, int> esDCC_BX_FreqMap;
107 map<int, int> esDCC_OrbitNumber_FreqMap;
113 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
114 esDCC_BX_FreqMap[esdcc.
getBX()]++;
117 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
118 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
122 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
123 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
124 gt_BX = esdcc.
getBX();
127 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
128 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
133 LogWarning(
"ESRawDataTask") <<
"dccCollections not available";
137 LogWarning(
"ESRawDataTask") <<
"FEDRawDataCollection not available";
141 vector<int> fiberStatus;
151 if (dcc.
getLV1() != gt_L1A) {
152 meL1ADCCErrors_->Fill(dcc.
fedId());
154 Float_t l1a_diff = dcc.
getLV1() - gt_L1A;
157 else if (l1a_diff < -100)
159 meL1ADiff_->Fill(l1a_diff);
162 if (dcc.
getBX() != gt_BX) {
163 meBXDCCErrors_->Fill(dcc.
fedId());
165 Float_t bx_diff = dcc.
getBX() - gt_BX;
168 else if (bx_diff < -100)
170 meBXDiff_->Fill(bx_diff);
173 meOrbitNumberDCCErrors_->Fill(dcc.
fedId());
176 if (orbitnumber_diff > 100)
177 orbitnumber_diff = 100;
178 else if (orbitnumber_diff < -100)
179 orbitnumber_diff = -100;
180 meOrbitNumberDiff_->Fill(orbitnumber_diff);
T getUntrackedParameter(std::string const &, T const &) const
const edm::EventSetup & c
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
int bunchCrossing() const
ESRawDataTask(const edm::ParameterSet &ps)
size_t size() const
Lenght of the data buffer in bytes.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Setup.
unsigned long long uint64_t
T getParameter(std::string const &) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
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())
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)