21 #ifdef WITH_ECAL_COND_DB
153 sprintf(histo,
"EBIT data integrity quality %s",
Numbers::sEB(ism).c_str());
159 sprintf(histo,
"EBIT data integrity quality MEM %s",
Numbers::sEB(ism).c_str());
173 for (
int ie = 1; ie <= 85; ie++ ) {
174 for (
int ip = 1; ip <= 20; ip++ ) {
181 for (
int ie = 1; ie <= 10; ie++ ) {
182 for (
int ip = 1; ip <= 5; ip++ ) {
208 if (
h_[ism-1] )
delete h_[ism-1];
211 if (
h01_[ism-1] )
delete h01_[ism-1];
212 if (
h02_[ism-1] )
delete h02_[ism-1];
213 if (
h03_[ism-1] )
delete h03_[ism-1];
214 if (
h04_[ism-1] )
delete h04_[ism-1];
215 if (
h05_[ism-1] )
delete h05_[ism-1];
216 if (
h06_[ism-1] )
delete h06_[ism-1];
217 if (
h07_[ism-1] )
delete h07_[ism-1];
218 if (
h08_[ism-1] )
delete h08_[ism-1];
219 if (
h09_[ism-1] )
delete h09_[ism-1];
253 #ifdef WITH_ECAL_COND_DB
261 std::map<EcalLogicID, MonCrystalConsistencyDat> dataset1;
263 std::map<EcalLogicID, MonTTConsistencyDat> dataset2;
265 std::map<EcalLogicID, MonMemChConsistencyDat> dataset3;
267 std::map<EcalLogicID, MonMemTTConsistencyDat> dataset4;
273 if (
h00_ &&
h00_->GetBinContent(ism) != 0 ) {
274 std::cerr <<
" DCC failed " <<
h00_->GetBinContent(ism) <<
" times" << std::endl;
297 bool update0 =
false;
300 num00 =
h00_->GetBinContent(ism);
301 if ( num00 > 0 ) update0 =
true;
304 float num01, num02, num03;
306 for (
int ie = 1; ie <= 85; ie++ ) {
307 for (
int ip = 1; ip <= 20; ip++ ) {
309 num01 = num02 = num03 = 0.;
311 bool update1 =
false;
315 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
318 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
319 if ( num01 > 0 ) update1 =
true;
323 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
324 if ( num02 > 0 ) update1 =
true;
328 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
329 if ( num03 > 0 ) update1 =
true;
332 if ( update0 || update1 ) {
338 std::cout <<
"(" << ie <<
"," << ip <<
") " << num00 <<
" " << num01 <<
" " << num02 <<
" " << num03 << std::endl;
354 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
357 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
363 if ( ( num01 + num02 + num03 ) > 0 )
375 status = status && !val;
384 for (
int iet = 1; iet <= 17; iet++ ) {
385 for (
int ipt = 1; ipt <= 4; ipt++ ) {
389 bool update1 =
false;
395 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
396 for (
int ip = 1 + 5*(ipt-1); ip <= 5*ipt; ip++ ) {
397 numTot +=
h_[ism-1]->GetBinContent(ie, ip);
403 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
404 if ( num04 > 0 ) update1 =
true;
408 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
409 if ( num05 > 0 ) update1 =
true;
412 if ( update0 || update1 ) {
418 std::cout <<
"(" << iet <<
"," << ipt <<
") " << num00 <<
" " << num04 <<
" " << num05 << std::endl;
435 float errorRate2 = num00 / ( numTot/25. + num04 + num05 );
438 errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
444 if ( ( num04 + num05 ) > 0 )
456 status = status && !val;
465 for (
int ie = 1; ie <= 10; ie++ ) {
466 for (
int ip = 1; ip <= 5; ip++ ) {
470 bool update1 =
false;
474 if (
hmem_[ism-1] ) numTot =
hmem_[ism-1]->GetBinContent(ie, ip);
477 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
478 if ( num06 > 0 ) update1 =
true;
482 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
483 if ( num07 > 0 ) update1 =
true;
486 if ( update0 || update1 ) {
488 if ( ie ==1 && ip == 1 ) {
491 std::cout <<
"Preparing dataset for mem of SM=" << ism << std::endl;
492 std::cout <<
"(" << ie <<
"," << ip <<
") " << num06 <<
" " << num07 << std::endl;
508 float errorRate1 = num00 / ( numTot + num06 + num07 );
511 errorRate1 = ( num06 + num07 ) / ( numTot + num06 + num07 ) / 2.;
517 if ( ( num06 + num07 ) > 0 )
520 c3. setTaskStatus(val);
529 status = status && !val;
538 for (
int iet = 1; iet <= 2; iet++ ) {
542 bool update1 =
false;
546 if (
hmem_[ism-1] ) {
548 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
549 for (
int ip = 1 ; ip <= 5; ip++ ) {
550 numTot +=
hmem_[ism-1]->GetBinContent(ie, ip);
556 num08 =
h08_[ism-1]->GetBinContent(iet, 1);
557 if ( num08 > 0 ) update1 =
true;
561 num09 =
h09_[ism-1]->GetBinContent(iet, 1);
562 if ( num09 > 0 ) update1 =
true;
565 if ( update0 || update1 ) {
571 std::cout <<
"(" << iet <<
") " << num08 <<
" " << num09 << std::endl;
588 float errorRate2 = num00 / ( numTot/25. + num08 + num09 );
591 errorRate2 = ( num08 + num09 ) / ( numTot/25. + num08 + num09 ) / 2.;
597 if ( ( num08 + num09 ) > 0 )
609 status = status && !val;
625 }
catch (std::runtime_error &
e) {
639 if (
ievt_ % 10 == 0 ) {
654 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/EBIT DCC size error").c_str());
662 sprintf(histo, (
prefixME_ +
"/EBOccupancyTask/EBOT digi occupancy %s").c_str(),
Numbers::sEB(ism).c_str());
664 h_[ism-1] = UtilsClient::getHisto<TH2F*>( me,
cloneME_,
h_[ism-1] );
666 sprintf(histo, (
prefixME_ +
"/EBOccupancyTask/EBOT MEM digi occupancy %s").c_str(),
Numbers::sEB(ism).c_str());
670 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/Gain/EBIT gain %s").c_str(),
Numbers::sEB(ism).c_str());
674 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/ChId/EBIT ChId %s").c_str(),
Numbers::sEB(ism).c_str());
678 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/GainSwitch/EBIT gain switch %s").c_str(),
Numbers::sEB(ism).c_str());
682 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/TTId/EBIT TTId %s").c_str(),
Numbers::sEB(ism).c_str());
686 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/TTBlockSize/EBIT TTBlockSize %s").c_str(),
Numbers::sEB(ism).c_str());
690 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/MemChId/EBIT MemChId %s").c_str(),
Numbers::sEB(ism).c_str());
694 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/MemGain/EBIT MemGain %s").c_str(),
Numbers::sEB(ism).c_str());
698 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/MemTTId/EBIT MemTTId %s").c_str(),
Numbers::sEB(ism).c_str());
702 sprintf(histo, (
prefixME_ +
"/EBIntegrityTask/MemSize/EBIT MemSize %s").c_str(),
Numbers::sEB(ism).c_str());
714 bool update0 =
false;
718 num00 =
h00_->GetBinContent(ism);
722 float num01, num02, num03, num04, num05;
724 for (
int ie = 1; ie <= 85; ie++ ) {
725 for (
int ip = 1; ip <= 20; ip++ ) {
727 num01 = num02 = num03 = num04 = num05 = 0.;
731 bool update1 =
false;
732 bool update2 =
false;
736 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
739 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
744 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
749 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
753 int iet = 1 + ((ie-1)/5);
754 int ipt = 1 + ((ip-1)/5);
757 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
762 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
766 if ( update0 || update1 || update2 ) {
773 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
776 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
779 float errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
786 if ( ( num01 + num02 + num03 ) > 0 )
788 if ( ( num04 + num05 ) > 0 )
803 float num06, num07, num08, num09;
805 for (
int ie = 1; ie <= 10; ie++ ) {
806 for (
int ip = 1; ip <= 5; ip++ ) {
808 num06 = num07 = num08 = num09 = 0.;
813 bool update1 =
false;
814 bool update2 =
false;
816 float numTotmem = -1.;
818 if (
hmem_[ism-1] ) numTotmem =
hmem_[ism-1]->GetBinContent(ie, ip);
821 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
826 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
830 int iet = 1 + ((ie-1)/5);
834 num08 =
h08_[ism-1]->GetBinContent(iet, ipt);
839 num09 =
h09_[ism-1]->GetBinContent(iet, ipt);
843 if ( update0 || update1 || update2 ) {
849 if ( numTotmem > 0 ) {
850 float errorRate1 = ( num06 + num07 ) / ( numTotmem + num06 + num07 ) / 2.;
853 float errorRate2 = ( num08 + num09 ) / ( numTotmem/25. + num08 + num09 ) / 2.;
858 if ( ( num06 + num07 ) > 0 )
860 if ( ( num08 + num09 ) > 0 )
881 {11, 12, 13, 14, 15},
882 {20, 19, 18, 17, 16},
static void printBadChannels(const MonitorElement *me, const T *hi, bool positive_only=false)
Print the bad channels.
Cache logicID vector from database.
void setProblematicEvents(int prob)
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
static std::string sEB(const int ism)
static int iSC(const EcalScDetId &id)
void setProblematicEvents(int prob)
EBIntegrityClient(const edm::ParameterSet &ps)
Constructor.
virtual ~EBIntegrityClient()
Destructor.
Some "id" conversions.
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
void setProcessedEvents(int proc)
void analyze(void)
Analyze.
void setProblemsID(int id)
void cleanup(void)
Cleanup.
void beginRun(void)
BeginRun.
void setProblemsLV1(int LV1)
static const int TT_SIZE_ERROR
static const int CH_GAIN_SWITCH_ERROR
void setProblemsSize(int size)
static int icEB(const int ism, const int ix, const int iy)
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
std::vector< int > superModules_
void setProblematicEvents(int prob)
void setProcessedEvents(int proc)
static int indexEB(const int ism, const int ie, const int ip)
MonitorElement * meg01_[36]
static int iSM(const int ism, const EcalSubdetector subdet)
void removeElement(const std::string &name)
void setProblematicEvents(int prob)
void setProblemsID(int id)
static const int chNum[5][5]
void setProblemsID(int id)
void setTaskStatus(bool status)
std::string getName(Reflex::Type &cc)
void setProblemsBunchX(int bunchX)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void setProblemsGainSwitch(int prob)
Ecal Monitor Utils for Client.
void setProblemsID(int id)
void beginJob(void)
BeginJob.
static const int CH_GAIN_ZERO_ERROR
void setTaskStatus(bool status)
void setProcessedEvents(int proc)
void setTaskStatus(bool status)
void setProcessedEvents(int proc)
void setProblemsGainZero(int prob)
static const int TT_ID_ERROR
void setProblemsGainZero(int prob)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void setProblemsSize(int size)
MonitorElement * meg02_[36]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
static const int CH_ID_ERROR
int ism(int ieta, int iphi)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)