31 FEDRawDataCollection_ = consumes<FEDRawDataCollection>(ps.
getParameter<
InputTag>(
"FEDRawDataCollection"));
47 sprintf(
histo,
"ES L1A DCC errors");
50 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
52 sprintf(
histo,
"ES BX DCC errors");
55 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
57 sprintf(
histo,
"ES Orbit Number DCC errors");
60 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
62 sprintf(
histo,
"Difference between ES and GT L1A");
65 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
67 sprintf(
histo,
"Difference between ES and GT BX");
70 meBXDiff_->setAxisTitle(
"Num of Events", 2);
72 sprintf(
histo,
"Difference between ES and GT Orbit Number");
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)) {
98 if (gtFedDataSize > 0) {
102 gt_OrbitNumber =
e.orbitNumber();
103 gt_BX =
e.bunchCrossing();
105 map<int, int> esDCC_L1A_FreqMap;
106 map<int, int> esDCC_BX_FreqMap;
107 map<int, int> esDCC_OrbitNumber_FreqMap;
109 if (
e.getByToken(dccCollections_, dccs)) {
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;
142 if (
e.getByToken(dccCollections_, dccs)) {
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);
172 if (
dcc.getOrbitNumber() != gt_OrbitNumber) {
173 meOrbitNumberDCCErrors_->Fill(
dcc.fedId());
175 Float_t orbitnumber_diff =
dcc.getOrbitNumber() - gt_OrbitNumber;
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 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)
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)