44 meESFedsNonFatal_ = 0;
57 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
58 dqmStore_->rmdir(prefixME_ +
"/" + fedDirName_);
65 if ( ! mergeRuns_ ) this->
reset();
75 if ( meESFedsEntries_ ) meESFedsEntries_->Reset();
76 if ( meESFedsFatal_ ) meESFedsFatal_->Reset();
77 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Reset();
88 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
90 sprintf(histo,
"FEDEntries");
91 meESFedsEntries_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
93 sprintf(histo,
"FEDFatal");
94 meESFedsFatal_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
96 sprintf(histo,
"FEDNonFatal");
97 meESFedsNonFatal_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
104 if ( ! init_ )
return;
107 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
109 if ( meESFedsEntries_ ) dqmStore_->removeElement( meESFedsEntries_->getName() );
110 meESFedsEntries_ = 0;
112 if ( meESFedsFatal_ ) dqmStore_->removeElement( meESFedsFatal_->getName() );
115 if ( meESFedsNonFatal_ ) dqmStore_->removeElement( meESFedsNonFatal_->getName() );
116 meESFedsNonFatal_ = 0;
126 LogInfo(
"ESFEDIntegrityTask") <<
"analyzed " << ievt_ <<
" events";
128 if ( enableCleanup_ ) this->
cleanup();
134 if ( ! init_ ) this->
setup();
140 int esDCC_L1A_MostFreqCounts = 0;
141 int esDCC_BX_MostFreqCounts = 0;
142 int esDCC_OrbitNumber_MostFreqCounts = 0;
143 int gtFedDataSize = 0;
148 if ( e.
getByToken(FEDRawDataCollection_, allFedRawData) ) {
151 for (
int esFED=520; esFED<=575; ++esFED) {
153 const FEDRawData& fedData = allFedRawData->FEDData(esFED);
157 if ( meESFedsEntries_ ) meESFedsEntries_->Fill(esFED);
161 const FEDRawData& gtFedData = allFedRawData->FEDData(812);
165 if ( gtFedDataSize > 0 ) {
174 map<int, int> esDCC_L1A_FreqMap;
175 map<int, int> esDCC_BX_FreqMap;
176 map<int, int> esDCC_OrbitNumber_FreqMap;
183 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
184 esDCC_BX_FreqMap[esdcc.
getBX()]++;
187 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
188 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
192 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
193 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
197 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
198 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
204 LogWarning(
"ESFEDIntegrityTask") <<
"dccCollections not available";
210 LogWarning(
"ESFEDIntegrityTask") <<
"FEDRawDataCollection not available";
213 vector<int> fiberStatus;
220 if ( meESFedsFatal_ ) meESFedsFatal_->Fill(dcc.
fedId());
227 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
229 for (
unsigned int i=0;
i<12; ++
i) {
230 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
231 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
235 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
237 for (
unsigned int i=12;
i<24; ++
i) {
238 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
239 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
243 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
245 for (
unsigned int i=24;
i<36; ++
i) {
246 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
247 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
252 if (dcc.
getLV1() != gt_L1A) meESFedsNonFatal_->Fill(dcc.
fedId());
virtual ~ESFEDIntegrityTask()
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< ESDCCHeaderBlock >::const_iterator const_iterator
static void cleanup(const Factory::MakerMap::value_type &v)
size_t size() const
Lenght of the data buffer in bytes.
void beginJob(void)
BeginJob.
void cleanup(void)
Cleanup.
ESFEDIntegrityTask(const edm::ParameterSet &ps)
DEFINE_FWK_MODULE(CaloMETProducer)
unsigned long long uint64_t
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
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 reset(double vett[256])
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")