55 dqmStore_->setCurrentFolder(prefixME_ +
"/ESRawDataTask");
56 dqmStore_->rmdir(prefixME_ +
"/ESRawDataTask");
63 if ( ! mergeRuns_ ) this->
reset();
82 dqmStore_->setCurrentFolder(prefixME_ +
"/ESRawDataTask");
89 sprintf(histo,
"ES L1A DCC errors");
90 meL1ADCCErrors_ = dqmStore_->book1D(histo, histo, 56, 519.5, 575.5);
91 meL1ADCCErrors_->setAxisTitle(
"ES FED", 1);
92 meL1ADCCErrors_->setAxisTitle(
"Num of Events", 2);
94 sprintf(histo,
"ES BX DCC errors");
95 meBXDCCErrors_ = dqmStore_->book1D(histo, histo, 56, 519.5, 575.5);
96 meBXDCCErrors_->setAxisTitle(
"ES FED", 1);
97 meBXDCCErrors_->setAxisTitle(
"Num of Events", 2);
99 sprintf(histo,
"ES Orbit Number DCC errors");
100 meOrbitNumberDCCErrors_ = dqmStore_->book1D(histo, histo, 56, 519.5, 575.5);
101 meOrbitNumberDCCErrors_->setAxisTitle(
"ES FED", 1);
102 meOrbitNumberDCCErrors_->setAxisTitle(
"Num of Events", 2);
104 sprintf(histo,
"Difference between ES and GT L1A");
105 meL1ADiff_ = dqmStore_->book1D(histo, histo, 201, -100.5, 100.5);
106 meL1ADiff_->setAxisTitle(
"ES - GT L1A", 1);
107 meL1ADiff_->setAxisTitle(
"Num of Events", 2);
109 sprintf(histo,
"Difference between ES and GT BX");
110 meBXDiff_ = dqmStore_->book1D(histo, histo, 201, -100.5, 100.5);
111 meBXDiff_->setAxisTitle(
"ES - GT BX", 1);
112 meBXDiff_->setAxisTitle(
"Num of Events", 2);
114 sprintf(histo,
"Difference between ES and GT Orbit Number");
115 meOrbitNumberDiff_ = dqmStore_->book1D(histo, histo, 201, -100.5, 100.5);
116 meOrbitNumberDiff_->setAxisTitle(
"ES - GT orbit number", 1);
117 meOrbitNumberDiff_->setAxisTitle(
"Num of Events", 2);
124 if ( ! init_ )
return;
130 if ( meL1ADCCErrors_ ) dqmStore_->removeElement( meL1ADCCErrors_->getName() );
133 if ( meBXDCCErrors_ ) dqmStore_->removeElement( meBXDCCErrors_->getName() );
136 if ( meOrbitNumberDCCErrors_ ) dqmStore_->removeElement( meOrbitNumberDCCErrors_->getName() );
137 meOrbitNumberDCCErrors_ = 0;
139 if ( meL1ADiff_ ) dqmStore_->removeElement( meL1ADiff_->getName() );
142 if ( meBXDiff_ ) dqmStore_->removeElement( meBXDiff_->getName() );
145 if ( meOrbitNumberDiff_ ) dqmStore_->removeElement( meOrbitNumberDiff_->getName() );
146 meOrbitNumberDiff_ = 0;
155 LogInfo(
"ESRawDataTask") <<
"analyzed " << ievt_ <<
" events";
157 if ( enableCleanup_ ) this->
cleanup();
163 if ( ! init_ ) this->
setup();
166 runNum_ = e.
id().
run();
168 int gt_L1A = 0, gt_OrbitNumber = 0, gt_BX = 0;
169 int esDCC_L1A_MostFreqCounts = 0;
170 int esDCC_BX_MostFreqCounts = 0;
171 int esDCC_OrbitNumber_MostFreqCounts = 0;
176 int gtFedDataSize = 0;
178 if ( e.
getByLabel(FEDRawDataCollection_, allFedRawData) ) {
181 const FEDRawData& gtFedData = allFedRawData->FEDData(812);
185 if ( gtFedDataSize > 0 ) {
194 map<int, int> esDCC_L1A_FreqMap;
195 map<int, int> esDCC_BX_FreqMap;
196 map<int, int> esDCC_OrbitNumber_FreqMap;
202 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
203 esDCC_BX_FreqMap[esdcc.
getBX()]++;
206 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
207 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
211 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
212 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
213 gt_BX = esdcc.
getBX();
216 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
217 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
223 LogWarning(
"ESRawDataTask") << dccCollections_ <<
" not available";
228 LogWarning(
"ESRawDataTask") << FEDRawDataCollection_ <<
" not available";
232 vector<int> fiberStatus;
243 if (dcc.
getLV1() != gt_L1A) {
244 meL1ADCCErrors_->Fill(dcc.
fedId());
246 Float_t l1a_diff = dcc.
getLV1() - gt_L1A;
247 if (l1a_diff > 100) l1a_diff = 100;
248 else if (l1a_diff < -100) l1a_diff = -100;
249 meL1ADiff_->Fill(l1a_diff);
252 if (dcc.
getBX() != gt_BX) {
253 meBXDCCErrors_->Fill(dcc.
fedId());
255 Float_t bx_diff = dcc.
getBX() - gt_BX;
256 if (bx_diff > 100) bx_diff = 100;
257 else if (bx_diff < -100) bx_diff = -100;
258 meBXDiff_->Fill(bx_diff);
261 meOrbitNumberDCCErrors_->Fill(dcc.
fedId());
264 if (orbitnumber_diff > 100) orbitnumber_diff = 100;
265 else if (orbitnumber_diff < -100) orbitnumber_diff = -100;
266 meOrbitNumberDiff_->Fill(orbitnumber_diff);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void cleanup(void)
Cleanup.
#define DEFINE_FWK_MODULE(type)
std::vector< T >::const_iterator const_iterator
static void cleanup(const Factory::MakerMap::value_type &v)
int bunchCrossing() const
void beginJob(void)
BeginJob.
ESRawDataTask(const edm::ParameterSet &ps)
size_t size() const
Lenght of the data buffer in bytes.
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
unsigned long long uint64_t
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void reset(double vett[256])
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")