22 #ifdef WITH_ECAL_COND_DB
159 name =
"EBIT data integrity quality " +
Numbers::sEB(ism);
165 name =
"EBIT data integrity quality MEM " +
Numbers::sEB(ism);
179 for (
int ie = 1; ie <= 85; ie++ ) {
180 for (
int ip = 1; ip <= 20; ip++ ) {
187 for (
int ie = 1; ie <= 10; ie++ ) {
188 for (
int ip = 1; ip <= 5; ip++ ) {
214 if (
h_[ism-1] )
delete h_[ism-1];
217 if (
h01_[ism-1] )
delete h01_[ism-1];
218 if (
h02_[ism-1] )
delete h02_[ism-1];
219 if (
h03_[ism-1] )
delete h03_[ism-1];
220 if (
h04_[ism-1] )
delete h04_[ism-1];
221 if (
h05_[ism-1] )
delete h05_[ism-1];
222 if (
h06_[ism-1] )
delete h06_[ism-1];
223 if (
h07_[ism-1] )
delete h07_[ism-1];
224 if (
h08_[ism-1] )
delete h08_[ism-1];
225 if (
h09_[ism-1] )
delete h09_[ism-1];
262 #ifdef WITH_ECAL_COND_DB
270 std::map<EcalLogicID, MonCrystalConsistencyDat> dataset1;
272 std::map<EcalLogicID, MonTTConsistencyDat> dataset2;
274 std::map<EcalLogicID, MonMemChConsistencyDat> dataset3;
276 std::map<EcalLogicID, MonMemTTConsistencyDat> dataset4;
282 if (
h00_ &&
h00_->GetBinContent(ism) != 0 ) {
283 std::cerr <<
" DCC failed " <<
h00_->GetBinContent(ism) <<
" times" << std::endl;
306 bool update0 =
false;
309 num00 =
h00_->GetBinContent(ism);
310 if ( num00 > 0 ) update0 =
true;
313 float num01, num02, num03;
315 for (
int ie = 1; ie <= 85; ie++ ) {
316 for (
int ip = 1; ip <= 20; ip++ ) {
318 num01 = num02 = num03 = 0.;
320 bool update1 =
false;
324 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
327 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
328 if ( num01 > 0 ) update1 =
true;
332 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
333 if ( num02 > 0 ) update1 =
true;
337 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
338 if ( num03 > 0 ) update1 =
true;
341 if ( update0 || update1 ) {
347 std::cout <<
"(" << ie <<
"," << ip <<
") " << num00 <<
" " << num01 <<
" " << num02 <<
" " << num03 << std::endl;
363 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
366 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
372 if ( ( num01 + num02 + num03 ) > 0 )
384 status = status && !val;
393 for (
int iet = 1; iet <= 17; iet++ ) {
394 for (
int ipt = 1; ipt <= 4; ipt++ ) {
398 bool update1 =
false;
404 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
405 for (
int ip = 1 + 5*(ipt-1); ip <= 5*ipt; ip++ ) {
406 numTot +=
h_[ism-1]->GetBinContent(ie, ip);
412 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
413 if ( num04 > 0 ) update1 =
true;
417 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
418 if ( num05 > 0 ) update1 =
true;
421 if ( update0 || update1 ) {
427 std::cout <<
"(" << iet <<
"," << ipt <<
") " << num00 <<
" " << num04 <<
" " << num05 << std::endl;
444 float errorRate2 = num00 / ( numTot/25. + num04 + num05 );
447 errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
453 if ( ( num04 + num05 ) > 0 )
465 status = status && !val;
474 for (
int ie = 1; ie <= 10; ie++ ) {
475 for (
int ip = 1; ip <= 5; ip++ ) {
479 bool update1 =
false;
483 if (
hmem_[ism-1] ) numTot =
hmem_[ism-1]->GetBinContent(ie, ip);
486 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
487 if ( num06 > 0 ) update1 =
true;
491 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
492 if ( num07 > 0 ) update1 =
true;
495 if ( update0 || update1 ) {
497 if ( ie ==1 && ip == 1 ) {
500 std::cout <<
"Preparing dataset for mem of SM=" << ism << std::endl;
501 std::cout <<
"(" << ie <<
"," << ip <<
") " << num06 <<
" " << num07 << std::endl;
517 float errorRate1 = num00 / ( numTot + num06 + num07 );
520 errorRate1 = ( num06 + num07 ) / ( numTot + num06 + num07 ) / 2.;
526 if ( ( num06 + num07 ) > 0 )
529 c3. setTaskStatus(val);
538 status = status && !val;
547 for (
int iet = 1; iet <= 2; iet++ ) {
551 bool update1 =
false;
555 if (
hmem_[ism-1] ) {
557 for (
int ie = 1 + 5*(iet-1); ie <= 5*iet; ie++ ) {
558 for (
int ip = 1 ; ip <= 5; ip++ ) {
559 numTot +=
hmem_[ism-1]->GetBinContent(ie, ip);
565 num08 =
h08_[ism-1]->GetBinContent(iet, 1);
566 if ( num08 > 0 ) update1 =
true;
570 num09 =
h09_[ism-1]->GetBinContent(iet, 1);
571 if ( num09 > 0 ) update1 =
true;
574 if ( update0 || update1 ) {
580 std::cout <<
"(" << iet <<
") " << num08 <<
" " << num09 << std::endl;
597 float errorRate2 = num00 / ( numTot/25. + num08 + num09 );
600 errorRate2 = ( num08 + num09 ) / ( numTot/25. + num08 + num09 ) / 2.;
606 if ( ( num08 + num09 ) > 0 )
618 status = status && !val;
634 }
catch (std::runtime_error &
e) {
648 if (
ievt_ % 10 == 0 ) {
711 bool update0 =
false;
715 num00 =
h00_->GetBinContent(ism);
719 float num01, num02, num03, num04, num05;
721 for (
int ie = 1; ie <= 85; ie++ ) {
722 for (
int ip = 1; ip <= 20; ip++ ) {
724 num01 = num02 = num03 = num04 = num05 = 0.;
728 bool update1 =
false;
729 bool update2 =
false;
733 if (
h_[ism-1] ) numTot =
h_[ism-1]->GetBinContent(ie, ip);
736 num01 =
h01_[ism-1]->GetBinContent(ie, ip);
741 num02 =
h02_[ism-1]->GetBinContent(ie, ip);
746 num03 =
h03_[ism-1]->GetBinContent(ie, ip);
750 int iet = 1 + ((ie-1)/5);
751 int ipt = 1 + ((ip-1)/5);
754 num04 =
h04_[ism-1]->GetBinContent(iet, ipt);
759 num05 =
h05_[ism-1]->GetBinContent(iet, ipt);
763 if ( update0 || update1 || update2 ) {
770 float errorRate1 = num00 / ( numTot + num01 + num02 + num03 );
773 errorRate1 = ( num01 + num02 + num03 ) / ( numTot + num01 + num02 + num03 ) / 3.;
776 float errorRate2 = ( num04 + num05 ) / ( numTot/25. + num04 + num05 ) / 2.;
783 if ( ( num01 + num02 + num03 ) > 0 )
785 if ( ( num04 + num05 ) > 0 )
800 float num06, num07, num08, num09;
802 for (
int ie = 1; ie <= 10; ie++ ) {
803 for (
int ip = 1; ip <= 5; ip++ ) {
805 num06 = num07 = num08 = num09 = 0.;
810 bool update1 =
false;
811 bool update2 =
false;
813 float numTotmem = -1.;
815 if (
hmem_[ism-1] ) numTotmem =
hmem_[ism-1]->GetBinContent(ie, ip);
818 num06 =
h06_[ism-1]->GetBinContent(ie, ip);
823 num07 =
h07_[ism-1]->GetBinContent(ie, ip);
827 int iet = 1 + ((ie-1)/5);
831 num08 =
h08_[ism-1]->GetBinContent(iet, ipt);
836 num09 =
h09_[ism-1]->GetBinContent(iet, ipt);
840 if ( update0 || update1 || update2 ) {
846 if ( numTotmem > 0 ) {
847 float errorRate1 = ( num06 + num07 ) / ( numTotmem + num06 + num07 ) / 2.;
850 float errorRate2 = ( num08 + num09 ) / ( numTotmem/25. + num08 + num09 ) / 2.;
855 if ( ( num06 + num07 ) > 0 )
857 if ( ( num08 + num09 ) > 0 )
878 {11, 12, 13, 14, 15},
879 {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)