22 #ifdef WITH_ECAL_COND_DB
161 name =
"EEIT data integrity quality " +
Numbers::sEE(ism);
168 name =
"EEIT data integrity quality MEM " +
Numbers::sEE(ism);
182 for (
int ix = 1; ix <= 50; ix++ ) {
183 for (
int iy = 1; iy <= 50; iy++ ) {
190 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
199 for (
int ie = 1; ie <= 10; ie++ ) {
200 for (
int ip = 1; ip <= 5; ip++ ) {
205 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
206 if ( (ism >= 12 && ism <= 3) || (ism >= 16 && ism <= 18) )
continue;
232 if (
h_[ism-1] )
delete h_[ism-1];
235 if (
h01_[ism-1] )
delete h01_[ism-1];
236 if (
h02_[ism-1] )
delete h02_[ism-1];
237 if (
h03_[ism-1] )
delete h03_[ism-1];
238 if (
h04_[ism-1] )
delete h04_[ism-1];
239 if (
h05_[ism-1] )
delete h05_[ism-1];
240 if (
h06_[ism-1] )
delete h06_[ism-1];
241 if (
h07_[ism-1] )
delete h07_[ism-1];
242 if (
h08_[ism-1] )
delete h08_[ism-1];
243 if (
h09_[ism-1] )
delete h09_[ism-1];
280 #ifdef WITH_ECAL_COND_DB
288 std::map<EcalLogicID, MonCrystalConsistencyDat> dataset1;
290 std::map<EcalLogicID, MonTTConsistencyDat> dataset2;
292 std::map<EcalLogicID, MonMemChConsistencyDat> dataset3;
294 std::map<EcalLogicID, MonMemTTConsistencyDat> dataset4;
300 if (
h00_ &&
h00_->GetBinContent(ism) != 0 ) {
302 std::cerr <<
" DCC failed " <<
h00_->GetBinContent(ism) <<
" times" << std::endl;
325 bool update0 =
false;
328 num00 =
h00_->GetBinContent(ism);
329 if ( num00 > 0 ) update0 =
true;
332 float num01, num02, num03;
334 for (
int ix = 1; ix <= 50; ix++ ) {
335 for (
int iy = 1; iy <= 50; iy++ ) {
340 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
344 num01 = num02 = num03 = 0.;
346 bool update1 =
false;
350 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ix, iy);
353 num01 =
h01_[ism-1]->GetBinContent(ix, iy);
354 if ( num01 > 0 ) update1 =
true;
358 num02 =
h02_[ism-1]->GetBinContent(ix, iy);
359 if ( num02 > 0 ) update1 =
true;
363 num03 =
h03_[ism-1]->GetBinContent(ix, iy);
364 if ( num03 > 0 ) update1 =
true;
367 if ( update0 || update1 ) {
389 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
392 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
398 if ( ( num01 + num02 + num03 ) > 0 )
405 if ( ic == -1 )
continue;
412 status = status && !val;
421 for (
int ixt = 1; ixt <= 10; ixt++ ) {
422 for (
int iyt = 1; iyt <= 10; iyt++ ) {
427 if ( ism >= 1 && ism <= 9 ) jxt = 101 - jxt;
431 bool update1 =
false;
437 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
438 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
441 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
443 numTot +=
h_[ism-1]->GetBinContent(ix, iy);
449 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
450 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
453 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
455 num04 =
h04_[ism-1]->GetBinContent(ix, iy);
456 if ( num04 > 0 ) update1 =
true;
462 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
463 for (
int iy = 1 + 5*(iyt-1); iy <= 5*iyt; iy++ ) {
466 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
468 num05 =
h05_[ism-1]->GetBinContent(ix, iy);
469 if ( num05 > 0 ) update1 =
true;
474 if ( update0 || update1 ) {
497 float errorRate2 = num00 / ( numTot + num04 + num05 );
500 errorRate2 = ( num04 + num05 ) / ( numTot + num04 + num05 ) / 2.;
506 if ( ( num04 + num05 ) > 0 )
513 if ( itt == -1 )
continue;
520 status = status && !val;
529 for (
int ix = 1; ix <= 10; ix++ ) {
530 for (
int iy = 1; iy <= 5; iy++ ) {
534 bool update1 =
false;
538 if (
hmem_[ism-1] ) numTot =
hmem_[ism-1]->GetBinContent(ix, iy);
541 num06 =
h06_[ism-1]->GetBinContent(ix, iy);
542 if ( num06 > 0 ) update1 =
true;
546 num07 =
h07_[ism-1]->GetBinContent(ix, iy);
547 if ( num07 > 0 ) update1 =
true;
550 if ( update0 || update1 ) {
552 if ( ix ==1 && iy == 1 ) {
555 std::cout <<
"Preparing dataset for mem of SM=" << ism << std::endl;
556 std::cout <<
"(" << ix <<
"," << iy <<
") " << num06 <<
" " << num07 << std::endl;
572 float errorRate1 = num00 / ( numTot + num06 + num07 );
575 errorRate1 = ( num06 + num07 ) / ( numTot + num06 + num07 ) / 2.;
581 if ( ( num06 + num07 ) > 0 )
584 c3. setTaskStatus(val);
593 status = status && !val;
602 for (
int ixt = 1; ixt <= 2; ixt++ ) {
606 bool update1 =
false;
610 if (
hmem_[ism-1] ) {
612 for (
int ix = 1 + 5*(ixt-1); ix <= 5*ixt; ix++ ) {
613 for (
int iy = 1 ; iy <= 5; iy++ ) {
614 numTot +=
hmem_[ism-1]->GetBinContent(ix, iy);
620 num08 =
h08_[ism-1]->GetBinContent(ixt, 1);
621 if ( num08 > 0 ) update1 =
true;
625 num09 =
h09_[ism-1]->GetBinContent(ixt, 1);
626 if ( num09 > 0 ) update1 =
true;
629 if ( update0 || update1 ) {
635 std::cout <<
"(" << ixt <<
") " << num08 <<
" " << num09 << std::endl;
652 float errorRate2 = num00 / ( numTot + num08 + num09 );
655 errorRate2 = ( num08 + num09 ) / ( numTot/25. + num08 + num09 ) / 2.;
661 if ( ( num08 + num09 ) > 0 )
673 status = status && !val;
689 }
catch (std::runtime_error &
e) {
703 if (
ievt_ % 10 == 0 ) {
766 bool update0 =
false;
770 num00 =
h00_->GetBinContent(ism);
774 float num01, num02, num03, num04, num05;
776 for (
int ix = 1; ix <= 50; ix++ ) {
777 for (
int iy = 1; iy <= 50; iy++ ) {
779 num01 = num02 = num03 = num04 = num05 = 0.;
783 bool update1 =
false;
784 bool update2 =
false;
788 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ix, iy);
791 num01 =
h01_[ism-1]->GetBinContent(ix, iy);
796 num02 =
h02_[ism-1]->GetBinContent(ix, iy);
801 num03 =
h03_[ism-1]->GetBinContent(ix, iy);
806 num04 =
h04_[ism-1]->GetBinContent(ix, iy);
811 num05 =
h05_[ism-1]->GetBinContent(ix, iy);
815 if ( update0 || update1 || update2 ) {
822 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
825 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
828 float errorRate2 = ( num04 + num05 ) / ( numTot + num04 + num05 ) / 2.;
835 if ( ( num01 + num02 + num03 ) > 0 )
837 if ( ( num04 + num05 ) > 0 )
844 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
859 float num06, num07, num08, num09;
861 for (
int ie = 1; ie <= 10; ie++ ) {
862 for (
int ip = 1; ip <= 5; ip++ ) {
864 num06 = num07 = num08 = num09 = 0.;
870 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
871 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
875 bool update1 =
false;
876 bool update2 =
false;
878 float numTotmem = -1.;
880 if (
hmem_[ism-1] ) numTotmem =
hmem_[ism-1]->GetBinContent(ie, ip);
883 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
888 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
892 int iet = 1 + ((ie-1)/5);
896 num08 =
h08_[ism-1]->GetBinContent(iet, ipt);
901 num09 =
h09_[ism-1]->GetBinContent(iet, ipt);
905 if ( update0 || update1 || update2 ) {
911 if ( numTotmem > 0 ) {
912 float errorRate1 = ( num06 + num07 ) / ( numTotmem + num06 + num07 )/ 2.;
915 float errorRate2 = ( num08 + num09 ) / ( numTotmem/25. + num08 + num09 ) / 2.;
920 if ( ( num06 + num07 ) > 0 )
922 if ( ( num08 + num09 ) > 0 )
943 {11, 12, 13, 14, 15},
944 {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)
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 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)