20 #ifdef WITH_ECAL_COND_DB
157 name =
"EBIT data integrity quality " +
Numbers::sEB(ism);
163 name =
"EBIT data integrity quality MEM " +
Numbers::sEB(ism);
177 for (
int ie = 1; ie <= 85; ie++ ) {
178 for (
int ip = 1; ip <= 20; ip++ ) {
185 for (
int ie = 1; ie <= 10; ie++ ) {
186 for (
int ip = 1; ip <= 5; ip++ ) {
212 if (
h_[ism-1] )
delete h_[ism-1];
215 if (
h01_[ism-1] )
delete h01_[ism-1];
216 if (
h02_[ism-1] )
delete h02_[ism-1];
217 if (
h03_[ism-1] )
delete h03_[ism-1];
218 if (
h04_[ism-1] )
delete h04_[ism-1];
219 if (
h05_[ism-1] )
delete h05_[ism-1];
220 if (
h06_[ism-1] )
delete h06_[ism-1];
221 if (
h07_[ism-1] )
delete h07_[ism-1];
222 if (
h08_[ism-1] )
delete h08_[ism-1];
223 if (
h09_[ism-1] )
delete h09_[ism-1];
260 #ifdef WITH_ECAL_COND_DB
268 std::map<EcalLogicID, MonCrystalConsistencyDat> dataset1;
270 std::map<EcalLogicID, MonTTConsistencyDat> dataset2;
272 std::map<EcalLogicID, MonMemChConsistencyDat> dataset3;
274 std::map<EcalLogicID, MonMemTTConsistencyDat> dataset4;
280 if (
h00_ &&
h00_->GetBinContent(ism) != 0 ) {
281 std::cerr <<
" DCC failed " <<
h00_->GetBinContent(ism) <<
" times" << std::endl;
304 bool update0 =
false;
307 num00 =
h00_->GetBinContent(ism);
308 if ( num00 > 0 ) update0 =
true;
311 float num01, num02, num03;
313 for (
int ie = 1; ie <= 85; ie++ ) {
314 for (
int ip = 1; ip <= 20; ip++ ) {
316 num01 = num02 = num03 = 0.;
318 bool update1 =
false;
322 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
325 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
326 if ( num01 > 0 ) update1 =
true;
330 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
331 if ( num02 > 0 ) update1 =
true;
335 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
336 if ( num03 > 0 ) update1 =
true;
339 if ( update0 || update1 ) {
345 std::cout <<
"(" << ie <<
"," << ip <<
") " << num00 <<
" " << num01 <<
" " << num02 <<
" " << num03 << std::endl;
361 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
364 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
370 if ( ( num01 + num02 + num03 ) > 0 )
382 status = status && !val;
391 for (
int iet = 1; iet <= 17; iet++ ) {
392 for (
int ipt = 1; ipt <= 4; ipt++ ) {
396 bool update1 =
false;
402 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
403 for (
int ip = 1 + 5*(ipt-1); ip <= 5*ipt; ip++ ) {
404 numTot +=
h_[ism-1]->GetBinContent(ie, ip);
410 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
411 if ( num04 > 0 ) update1 =
true;
415 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
416 if ( num05 > 0 ) update1 =
true;
419 if ( update0 || update1 ) {
425 std::cout <<
"(" << iet <<
"," << ipt <<
") " << num00 <<
" " << num04 <<
" " << num05 << std::endl;
442 float errorRate2 = num00 / ( numTot/25. + num04 + num05 );
445 errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
451 if ( ( num04 + num05 ) > 0 )
463 status = status && !val;
472 for (
int ie = 1; ie <= 10; ie++ ) {
473 for (
int ip = 1; ip <= 5; ip++ ) {
477 bool update1 =
false;
481 if (
hmem_[ism-1] ) numTot =
hmem_[ism-1]->GetBinContent(ie, ip);
484 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
485 if ( num06 > 0 ) update1 =
true;
489 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
490 if ( num07 > 0 ) update1 =
true;
493 if ( update0 || update1 ) {
495 if ( ie ==1 && ip == 1 ) {
498 std::cout <<
"Preparing dataset for mem of SM=" << ism << std::endl;
499 std::cout <<
"(" << ie <<
"," << ip <<
") " << num06 <<
" " << num07 << std::endl;
515 float errorRate1 = num00 / ( numTot + num06 + num07 );
518 errorRate1 = ( num06 + num07 ) / ( numTot + num06 + num07 ) / 2.;
524 if ( ( num06 + num07 ) > 0 )
527 c3. setTaskStatus(val);
536 status = status && !val;
545 for (
int iet = 1; iet <= 2; iet++ ) {
549 bool update1 =
false;
553 if (
hmem_[ism-1] ) {
555 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
556 for (
int ip = 1 ; ip <= 5; ip++ ) {
557 numTot +=
hmem_[ism-1]->GetBinContent(ie, ip);
563 num08 =
h08_[ism-1]->GetBinContent(iet, 1);
564 if ( num08 > 0 ) update1 =
true;
568 num09 =
h09_[ism-1]->GetBinContent(iet, 1);
569 if ( num09 > 0 ) update1 =
true;
572 if ( update0 || update1 ) {
578 std::cout <<
"(" << iet <<
") " << num08 <<
" " << num09 << std::endl;
595 float errorRate2 = num00 / ( numTot/25. + num08 + num09 );
598 errorRate2 = ( num08 + num09 ) / ( numTot/25. + num08 + num09 ) / 2.;
604 if ( ( num08 + num09 ) > 0 )
616 status = status && !val;
632 }
catch (std::runtime_error &
e) {
646 if (
ievt_ % 10 == 0 ) {
709 bool update0 =
false;
713 num00 =
h00_->GetBinContent(ism);
717 float num01, num02, num03, num04, num05;
719 for (
int ie = 1; ie <= 85; ie++ ) {
720 for (
int ip = 1; ip <= 20; ip++ ) {
722 num01 = num02 = num03 = num04 = num05 = 0.;
726 bool update1 =
false;
727 bool update2 =
false;
731 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
734 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
739 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
744 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
748 int iet = 1 + ((ie-1)/5);
749 int ipt = 1 + ((ip-1)/5);
752 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
757 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
761 if ( update0 || update1 || update2 ) {
768 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
771 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
774 float errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
781 if ( ( num01 + num02 + num03 ) > 0 )
783 if ( ( num04 + num05 ) > 0 )
798 float num06, num07, num08, num09;
800 for (
int ie = 1; ie <= 10; ie++ ) {
801 for (
int ip = 1; ip <= 5; ip++ ) {
803 num06 = num07 = num08 = num09 = 0.;
808 bool update1 =
false;
809 bool update2 =
false;
811 float numTotmem = -1.;
813 if (
hmem_[ism-1] ) numTotmem =
hmem_[ism-1]->GetBinContent(ie, ip);
816 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
821 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
825 int iet = 1 + ((ie-1)/5);
829 num08 =
h08_[ism-1]->GetBinContent(iet, ipt);
834 num09 =
h09_[ism-1]->GetBinContent(iet, ipt);
838 if ( update0 || update1 || update2 ) {
844 if ( numTotmem > 0 ) {
845 float errorRate1 = ( num06 + num07 ) / ( numTotmem + num06 + num07 ) / 2.;
848 float errorRate2 = ( num08 + num09 ) / ( numTotmem/25. + num08 + num09 ) / 2.;
853 if ( ( num06 + num07 ) > 0 )
855 if ( ( num08 + num09 ) > 0 )
876 {11, 12, 13, 14, 15},
877 {20, 19, 18, 17, 16},
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)
void setProblematicEvents(int prob)
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
EBIntegrityClient(const edm::ParameterSet &ps)
Constructor.
virtual ~EBIntegrityClient()
Destructor.
Some "id" conversions.
static std::string sEB(const unsigned ism)
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 unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
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)
MonitorElement * meg01_[36]
static unsigned iSC(const EcalScDetId &id)
void removeElement(const std::string &name)
void setProblematicEvents(int prob)
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
void setProblemsID(int id)
static const int chNum[5][5]
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 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)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
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)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
void setCurrentFolder(const std::string &fullpath)