47 meESFedsNonFatal_ = 0;
60 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
61 dqmStore_->rmdir(prefixME_ +
"/" + fedDirName_);
68 if ( ! mergeRuns_ ) this->
reset();
78 if ( meESFedsEntries_ ) meESFedsEntries_->Reset();
79 if ( meESFedsFatal_ ) meESFedsFatal_->Reset();
80 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Reset();
91 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
93 sprintf(histo,
"FEDEntries");
94 meESFedsEntries_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
96 sprintf(histo,
"FEDFatal");
97 meESFedsFatal_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
99 sprintf(histo,
"FEDNonFatal");
100 meESFedsNonFatal_ = dqmStore_->book1D(histo, histo, 56, 520, 576);
107 if ( ! init_ )
return;
110 dqmStore_->setCurrentFolder(prefixME_ +
"/" + fedDirName_);
112 if ( meESFedsEntries_ ) dqmStore_->removeElement( meESFedsEntries_->getName() );
113 meESFedsEntries_ = 0;
115 if ( meESFedsFatal_ ) dqmStore_->removeElement( meESFedsFatal_->getName() );
118 if ( meESFedsNonFatal_ ) dqmStore_->removeElement( meESFedsNonFatal_->getName() );
119 meESFedsNonFatal_ = 0;
129 LogInfo(
"ESFEDIntegrityTask") <<
"analyzed " << ievt_ <<
" events";
131 if ( enableCleanup_ ) this->
cleanup();
137 if ( ! init_ ) this->
setup();
143 int esDCC_L1A_MostFreqCounts = 0;
144 int esDCC_BX_MostFreqCounts = 0;
145 int esDCC_OrbitNumber_MostFreqCounts = 0;
146 int gtFedDataSize = 0;
151 if ( e.
getByLabel(FEDRawDataCollection_, allFedRawData) ) {
154 for (
int esFED=520; esFED<=575; ++esFED) {
156 const FEDRawData& fedData = allFedRawData->FEDData(esFED);
160 if ( meESFedsEntries_ ) meESFedsEntries_->Fill(esFED);
164 const FEDRawData& gtFedData = allFedRawData->FEDData(812);
168 if ( gtFedDataSize > 0 ) {
177 map<int, int> esDCC_L1A_FreqMap;
178 map<int, int> esDCC_BX_FreqMap;
179 map<int, int> esDCC_OrbitNumber_FreqMap;
186 esDCC_L1A_FreqMap[esdcc.
getLV1()]++;
187 esDCC_BX_FreqMap[esdcc.
getBX()]++;
190 if (esDCC_L1A_FreqMap[esdcc.
getLV1()] > esDCC_L1A_MostFreqCounts) {
191 esDCC_L1A_MostFreqCounts = esDCC_L1A_FreqMap[esdcc.
getLV1()];
195 if (esDCC_BX_FreqMap[esdcc.
getBX()] > esDCC_BX_MostFreqCounts) {
196 esDCC_BX_MostFreqCounts = esDCC_BX_FreqMap[esdcc.
getBX()];
200 if (esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()] > esDCC_OrbitNumber_MostFreqCounts) {
201 esDCC_OrbitNumber_MostFreqCounts = esDCC_OrbitNumber_FreqMap[esdcc.
getOrbitNumber()];
207 LogWarning(
"ESFEDIntegrityTask") << dccCollections_ <<
" not available";
213 LogWarning(
"ESFEDIntegrityTask") << FEDRawDataCollection_ <<
" not available";
216 vector<int> fiberStatus;
223 if ( meESFedsFatal_ ) meESFedsFatal_->Fill(dcc.
fedId());
230 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
232 for (
unsigned int i=0;
i<12; ++
i) {
233 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
234 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
238 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
240 for (
unsigned int i=12;
i<24; ++
i) {
241 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
242 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
246 meESFedsNonFatal_->Fill(dcc.
fedId(), 1./3.);
248 for (
unsigned int i=24;
i<36; ++
i) {
249 if (fiberStatus[
i]==8 || fiberStatus[
i]==10 || fiberStatus[
i]==11 || fiberStatus[
i]==12)
250 if ( meESFedsNonFatal_ ) meESFedsNonFatal_->Fill(dcc.
fedId(), 1./12.);
255 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.
#define DEFINE_FWK_MODULE(type)
std::vector< T >::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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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="")