20 #ifdef WITH_ECAL_COND_DB
159 name =
"EEIT data integrity quality " +
Numbers::sEE(ism);
166 name =
"EEIT data integrity quality MEM " +
Numbers::sEE(ism);
180 for (
int ix = 1; ix <= 50; ix++ ) {
181 for (
int iy = 1; iy <= 50; iy++ ) {
188 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
197 for (
int ie = 1; ie <= 10; ie++ ) {
198 for (
int ip = 1; ip <= 5; ip++ ) {
203 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
204 if ( (ism >= 12 && ism <= 3) || (ism >= 16 && ism <= 18) )
continue;
230 if (
h_[ism-1] )
delete h_[ism-1];
233 if (
h01_[ism-1] )
delete h01_[ism-1];
234 if (
h02_[ism-1] )
delete h02_[ism-1];
235 if (
h03_[ism-1] )
delete h03_[ism-1];
236 if (
h04_[ism-1] )
delete h04_[ism-1];
237 if (
h05_[ism-1] )
delete h05_[ism-1];
238 if (
h06_[ism-1] )
delete h06_[ism-1];
239 if (
h07_[ism-1] )
delete h07_[ism-1];
240 if (
h08_[ism-1] )
delete h08_[ism-1];
241 if (
h09_[ism-1] )
delete h09_[ism-1];
278 #ifdef WITH_ECAL_COND_DB
286 std::map<EcalLogicID, MonCrystalConsistencyDat> dataset1;
288 std::map<EcalLogicID, MonTTConsistencyDat> dataset2;
290 std::map<EcalLogicID, MonMemChConsistencyDat> dataset3;
292 std::map<EcalLogicID, MonMemTTConsistencyDat> dataset4;
298 if (
h00_ &&
h00_->GetBinContent(ism) != 0 ) {
300 std::cerr <<
" DCC failed " <<
h00_->GetBinContent(ism) <<
" times" << std::endl;
323 bool update0 =
false;
326 num00 =
h00_->GetBinContent(ism);
327 if ( num00 > 0 ) update0 =
true;
330 float num01, num02, num03;
332 for (
int ix = 1; ix <= 50; ix++ ) {
333 for (
int iy = 1; iy <= 50; iy++ ) {
338 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
342 num01 = num02 = num03 = 0.;
344 bool update1 =
false;
348 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ix, iy);
351 num01 =
h01_[ism-1]->GetBinContent(ix, iy);
352 if ( num01 > 0 ) update1 =
true;
356 num02 =
h02_[ism-1]->GetBinContent(ix, iy);
357 if ( num02 > 0 ) update1 =
true;
361 num03 =
h03_[ism-1]->GetBinContent(ix, iy);
362 if ( num03 > 0 ) update1 =
true;
365 if ( update0 || update1 ) {
387 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
390 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
396 if ( ( num01 + num02 + num03 ) > 0 )
403 if ( ic == -1 )
continue;
410 status = status && !val;
419 for (
int ixt = 1; ixt <= 10; ixt++ ) {
420 for (
int iyt = 1; iyt <= 10; iyt++ ) {
425 if ( ism >= 1 && ism <= 9 ) jxt = 101 - jxt;
429 bool update1 =
false;
435 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
436 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
439 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
441 numTot +=
h_[ism-1]->GetBinContent(ix, iy);
447 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
448 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
451 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
453 num04 =
h04_[ism-1]->GetBinContent(ix, iy);
454 if ( num04 > 0 ) update1 =
true;
460 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
461 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
464 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
466 num05 =
h05_[ism-1]->GetBinContent(ix, iy);
467 if ( num05 > 0 ) update1 =
true;
472 if ( update0 || update1 ) {
495 float errorRate2 = num00 / ( numTot + num04 + num05 );
498 errorRate2 = ( num04 + num05 ) / ( numTot + num04 + num05 ) / 2.;
504 if ( ( num04 + num05 ) > 0 )
511 if ( itt == -1 )
continue;
518 status = status && !val;
527 for (
int ix = 1; ix <= 10; ix++ ) {
528 for (
int iy = 1; iy <= 5; iy++ ) {
532 bool update1 =
false;
536 if (
hmem_[ism-1] ) numTot =
hmem_[ism-1]->GetBinContent(ix, iy);
539 num06 =
h06_[ism-1]->GetBinContent(ix, iy);
540 if ( num06 > 0 ) update1 =
true;
544 num07 =
h07_[ism-1]->GetBinContent(ix, iy);
545 if ( num07 > 0 ) update1 =
true;
548 if ( update0 || update1 ) {
550 if ( ix ==1 && iy == 1 ) {
553 std::cout <<
"Preparing dataset for mem of SM=" << ism << std::endl;
554 std::cout <<
"(" << ix <<
"," << iy <<
") " << num06 <<
" " << num07 << std::endl;
570 float errorRate1 = num00 / ( numTot + num06 + num07 );
573 errorRate1 = ( num06 + num07 ) / ( numTot + num06 + num07 ) / 2.;
579 if ( ( num06 + num07 ) > 0 )
582 c3. setTaskStatus(val);
591 status = status && !val;
600 for (
int ixt = 1; ixt <= 2; ixt++ ) {
604 bool update1 =
false;
608 if (
hmem_[ism-1] ) {
610 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
611 for (
int iy = 1 ; iy <= 5; iy++ ) {
612 numTot +=
hmem_[ism-1]->GetBinContent(ix, iy);
618 num08 =
h08_[ism-1]->GetBinContent(ixt, 1);
619 if ( num08 > 0 ) update1 =
true;
623 num09 =
h09_[ism-1]->GetBinContent(ixt, 1);
624 if ( num09 > 0 ) update1 =
true;
627 if ( update0 || update1 ) {
633 std::cout <<
"(" << ixt <<
") " << num08 <<
" " << num09 << std::endl;
650 float errorRate2 = num00 / ( numTot + num08 + num09 );
653 errorRate2 = ( num08 + num09 ) / ( numTot/25. + num08 + num09 ) / 2.;
659 if ( ( num08 + num09 ) > 0 )
671 status = status && !val;
687 }
catch (std::runtime_error &
e) {
701 if (
ievt_ % 10 == 0 ) {
764 bool update0 =
false;
768 num00 =
h00_->GetBinContent(ism);
772 float num01, num02, num03, num04, num05;
774 for (
int ix = 1; ix <= 50; ix++ ) {
775 for (
int iy = 1; iy <= 50; iy++ ) {
777 num01 = num02 = num03 = num04 = num05 = 0.;
781 bool update1 =
false;
782 bool update2 =
false;
786 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ix, iy);
789 num01 =
h01_[ism-1]->GetBinContent(ix, iy);
794 num02 =
h02_[ism-1]->GetBinContent(ix, iy);
799 num03 =
h03_[ism-1]->GetBinContent(ix, iy);
804 num04 =
h04_[ism-1]->GetBinContent(ix, iy);
809 num05 =
h05_[ism-1]->GetBinContent(ix, iy);
813 if ( update0 || update1 || update2 ) {
820 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
823 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
826 float errorRate2 = ( num04 + num05 ) / ( numTot + num04 + num05 ) / 2.;
833 if ( ( num01 + num02 + num03 ) > 0 )
835 if ( ( num04 + num05 ) > 0 )
842 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
857 float num06, num07, num08, num09;
859 for (
int ie = 1; ie <= 10; ie++ ) {
860 for (
int ip = 1; ip <= 5; ip++ ) {
862 num06 = num07 = num08 = num09 = 0.;
868 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
869 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
873 bool update1 =
false;
874 bool update2 =
false;
876 float numTotmem = -1.;
878 if (
hmem_[ism-1] ) numTotmem =
hmem_[ism-1]->GetBinContent(ie, ip);
881 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
886 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
890 int iet = 1 + ((ie-1)/5);
894 num08 =
h08_[ism-1]->GetBinContent(iet, ipt);
899 num09 =
h09_[ism-1]->GetBinContent(iet, ipt);
903 if ( update0 || update1 || update2 ) {
909 if ( numTotmem > 0 ) {
910 float errorRate1 = ( num06 + num07 ) / ( numTotmem + num06 + num07 )/ 2.;
913 float errorRate2 = ( num08 + num09 ) / ( numTotmem/25. + num08 + num09 ) / 2.;
918 if ( ( num06 + num07 ) > 0 )
920 if ( ( num08 + num09 ) > 0 )
941 {11, 12, 13, 14, 15},
942 {20, 19, 18, 17, 16},
Cache logicID vector from database.
void setProblematicEvents(int prob)
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
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)
void setProblematicEvents(int prob)
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Some "id" conversions.
void setProcessedEvents(int proc)
void setProblemsID(int id)
void setProblemsLV1(int LV1)
static const int TT_SIZE_ERROR
static int ix0EE(const unsigned ism)
static const int CH_GAIN_SWITCH_ERROR
void setProblemsSize(int size)
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
void cleanup(void)
Cleanup.
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
static int iy0EE(const unsigned ism)
void setProblematicEvents(int prob)
MonitorElement * meg02_[18]
void setProcessedEvents(int proc)
std::vector< int > superModules_
virtual ~EEIntegrityClient()
Destructor.
static unsigned iSC(const EcalScDetId &id)
void removeElement(const std::string &name)
void setProblematicEvents(int prob)
void setProblemsID(int id)
void setProblemsID(int id)
void setTaskStatus(bool status)
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 beginRun(void)
BeginRun.
void setProblemsID(int id)
static const int CH_GAIN_ZERO_ERROR
void analyze(void)
Analyze.
void beginJob(void)
BeginJob.
void setTaskStatus(bool status)
void setProcessedEvents(int proc)
void setTaskStatus(bool status)
void setProcessedEvents(int proc)
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
static const int chNum[5][5]
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)
EEIntegrityClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meg01_[18]
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)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
void setCurrentFolder(const std::string &fullpath)