31 FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.
getParameter<
InputTag>(
"FEDRawDataCollection"));
39 auto lumiCache = std::make_shared<ESRawLSCache>();
40 lumiCache->ievtLS_ = 0;
42 meL1ADCCErrorsByLS_->Reset();
43 meBXDCCErrorsByLS_->Reset();
44 meOrbitNumberDCCErrorsByLS_->Reset();
61 sprintf(
histo,
"ES L1A DCC errors");
64 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
66 sprintf(
histo,
"ES BX DCC errors");
69 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
71 sprintf(
histo,
"ES Orbit Number DCC errors");
74 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
76 sprintf(
histo,
"Difference between ES and GT L1A");
79 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
81 sprintf(
histo,
"Difference between ES and GT BX");
84 meBXDiff_->setAxisTitle(
"Num of Events", 2);
86 sprintf(
histo,
"Difference between ES and GT Orbit Number");
88 meOrbitNumberDiff_->
setAxisTitle(
"ES - GT orbit number", 1);
89 meOrbitNumberDiff_->setAxisTitle(
"Num of Events", 2);
94 sprintf(
histo,
"ES L1A DCC errors");
97 meL1ADCCErrorsByLS_->setAxisTitle(
"Num of Events", 2);
99 sprintf(
histo,
"ES BX DCC errors");
102 meBXDCCErrorsByLS_->setAxisTitle(
"Num of Events", 2);
104 sprintf(
histo,
"ES Orbit Number DCC errors");
105 meOrbitNumberDCCErrorsByLS_ = iBooker.
book1D(
histo,
histo, 56, 519.5, 575.5);
107 meOrbitNumberDCCErrorsByLS_->setAxisTitle(
"Num of Events", 2);
112 runNum_ =
e.id().run();
114 int gt_L1A = 0, gt_OrbitNumber = 0, gt_BX = 0;
115 int esDCC_L1A_MostFreqCounts = 0;
116 int esDCC_BX_MostFreqCounts = 0;
117 int esDCC_OrbitNumber_MostFreqCounts = 0;
122 int gtFedDataSize = 0;
124 if (
e.getByToken(FEDRawDataCollection_, allFedRawData)) {
130 if (gtFedDataSize > 0) {
134 gt_OrbitNumber =
e.orbitNumber();
135 gt_BX =
e.bunchCrossing();
137 map<int, int> esDCC_L1A_FreqMap;
138 map<int, int> esDCC_BX_FreqMap;
139 map<int, int> esDCC_OrbitNumber_FreqMap;
141 if (
e.getByToken(dccCollections_, dccs)) {
145 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
146 esDCC_BX_FreqMap[esdcc.
getBX()]++;
149 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
150 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
154 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
155 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
156 gt_BX = esdcc.
getBX();
159 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
160 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
165 LogWarning(
"ESRawDataTask") <<
"dccCollections not available";
169 LogWarning(
"ESRawDataTask") <<
"FEDRawDataCollection not available";
173 vector<int> fiberStatus;
174 if (
e.getByToken(dccCollections_, dccs)) {
183 if (
dcc.getLV1() != gt_L1A) {
184 meL1ADCCErrors_->Fill(
dcc.fedId());
185 meL1ADCCErrorsByLS_->Fill(
dcc.fedId());
186 Float_t l1a_diff =
dcc.getLV1() - gt_L1A;
189 else if (l1a_diff < -100)
191 meL1ADiff_->Fill(l1a_diff);
194 if (
dcc.getBX() != gt_BX) {
195 meBXDCCErrors_->Fill(
dcc.fedId());
196 meBXDCCErrorsByLS_->Fill(
dcc.fedId());
197 Float_t bx_diff =
dcc.getBX() - gt_BX;
200 else if (bx_diff < -100)
202 meBXDiff_->Fill(bx_diff);
204 if (
dcc.getOrbitNumber() != gt_OrbitNumber) {
205 meOrbitNumberDCCErrors_->Fill(
dcc.fedId());
206 meOrbitNumberDCCErrorsByLS_->Fill(
dcc.fedId());
207 Float_t orbitnumber_diff =
dcc.getOrbitNumber() - gt_OrbitNumber;
208 if (orbitnumber_diff > 100)
209 orbitnumber_diff = 100;
210 else if (orbitnumber_diff < -100)
211 orbitnumber_diff = -100;
212 meOrbitNumberDiff_->Fill(orbitnumber_diff);
void globalEndLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &c) override
End Lumi.
T getParameter(std::string const &) const
ALPAKA_FN_ACC int dcc(int ieta, int iphi)
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< T >::const_iterator const_iterator
size_t size() const
Lenght of the data buffer in bytes.
ESRawDataTask(const edm::ParameterSet &ps)
std::shared_ptr< ESRawLSCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &c) const override
Begin Lumi.
T getUntrackedParameter(std::string const &, T const &) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Setup.
#define DEFINE_FWK_MODULE(type)
const_iterator begin() const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Namespace of DDCMS conversion namespace.
const_iterator end() const
unsigned long long uint64_t
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)