CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QTest.h
Go to the documentation of this file.
1 #ifndef DQMSERVICES_CORE_Q_CRITERION_H
2 # define DQMSERVICES_CORE_Q_CRITERION_H
3 
5 # include "TProfile2D.h"
6 # include "TProfile.h"
7 # include "TH2F.h"
8 # include "TH1F.h"
9 # include <sstream>
10 # include <string>
11 # include <map>
12 
13 //#include "DQMServices/Core/interface/DQMStore.h"
14 
24 //class AllContentWithinFixedRange; typedef AllContentWithinFixedRange RuleAllContentWithinFixedRange; typedef AllContentWithinFixedRange AllContentWithinFixedRangeROOT;
25 //class AllContentWithinFloatingRange; typedef AllContentWithinFloatingRange RuleAllContentWithinFloatingRange; typedef AllContentWithinFloatingRange AllContentWithinFloatingRangeROOT;
26 class FlatOccupancy1d; typedef FlatOccupancy1d RuleFlatOccupancy1d; typedef FlatOccupancy1d FlatOccupancy1dROOT;
28 class CSC01; typedef CSC01 RuleCSC01; typedef CSC01 CSC01ROOT;
29 class AllContentAlongDiagonal; typedef AllContentAlongDiagonal RuleAllContentAlongDiagonal; typedef AllContentAlongDiagonal AllContentAlongDiagonalROOT;
32 
46 {
48 
49 public:
50 
52  int getStatus(void) const { return status_; }
54  std::string getMessage(void) const { return message_; }
56  std::string getName(void) const { return qtname_; }
58  std::string algoName(void) const { return algoName_; }
60  void setWarningProb(float prob) { warningProb_ = prob; }
61  void setErrorProb(float prob) { errorProb_ = prob; }
64  virtual std::vector<DQMChannel> getBadChannels(void) const
65  { return std::vector<DQMChannel>(); }
66 
67 protected:
68  QCriterion(std::string qtname) { qtname_ = qtname; init(); }
70  void init(void);
71 
72  virtual ~QCriterion(void) {}
73 
74  virtual float runTest(const MonitorElement *me);
76  void setAlgoName(std::string name) { algoName_ = name; }
77 
78  float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv) {
79  assert(qr.qcriterion_ == this);
80  assert(qv.qtname == qtname_);
81 
82  prob_ = runTest(me); // this runTest goes to SimpleTest derivates
83 
87 
88  setMessage(); // this goes to SimpleTest derivates
89 
90  if (verbose_==2) std::cout << " Message = " << message_ << std::endl;
91  if (verbose_==2) std::cout << " Name = " << qtname_ <<
92  " / Algorithm = " << algoName_ <<
93  " / Status = " << status_ <<
94  " / Prob = " << prob_ << std::endl;
95 
96  qv.code = status_;
97  qv.message = message_;
98  qv.qtname = qtname_;
99  qv.algorithm = algoName_;
100  qv.qtresult = prob_;
102 
103  return prob_;
104  }
105 
107  virtual void setMessage(void) = 0;
108 
109  std::string qtname_;
110  std::string algoName_;
111  float prob_;
112  int status_;
113  std::string message_;
116  int verbose_;
117 
118 private:
120  static const float WARNING_PROB_THRESHOLD;
121  static const float ERROR_PROB_THRESHOLD;
122 
124  friend class DQMStore;
126  friend class MonitorElement;
127 };
128 
132 
133 class SimpleTest : public QCriterion
134 {
135 public:
136  SimpleTest(const std::string &name, bool keepBadChannels = false) : QCriterion(name),
137  minEntries_ (0),
138  keepBadChannels_ (keepBadChannels)
139  {}
140 
142  void setMinimumEntries(unsigned n) { minEntries_ = n; }
144  virtual std::vector<DQMChannel> getBadChannels(void) const
145  {
147  }
148 
149 protected:
150 
152  virtual void setMessage(void)
153  {
154  message_.clear();
155  }
156 
157  unsigned minEntries_; //< minimum # of entries needed
158  std::vector<DQMChannel> badChannels_;
160  };
161 
162 
163 //===============================================================//
164 //========= Classes for particular QUALITY TESTS ================//
165 //===============================================================//
166 
167 //===================== Comp2RefEqualH ===================//
168 //== Algorithm for comparing equality of histograms ==//
170 {
171 public:
172  Comp2RefEqualH(const std::string &name) : SimpleTest(name,true)
173  {
174  setAlgoName( getAlgoName() );
175  }
176  static std::string getAlgoName(void) { return "Comp2RefEqualH"; }
177  float runTest(const MonitorElement*me);
178 };
179 
180 //===================== Comp2RefChi2 ===================//
181 // comparison to reference using the chi^2 algorithm
182 class Comp2RefChi2 : public SimpleTest
183 {
184 public:
185  Comp2RefChi2(const std::string &name) :SimpleTest(name)
186  {
188  }
189  static std::string getAlgoName(void) { return "Comp2RefChi2"; }
190  float runTest(const MonitorElement*me);
191 
192 protected:
193 
194  void setMessage(void)
195  {
196  std::ostringstream message;
197  message << "chi2/Ndof = " << chi2_ << "/" << Ndof_
198  << ", minimum needed statistics = " << minEntries_
199  << " warning threshold = " << this->warningProb_
200  << " error threshold = " << this->errorProb_;
201  message_ = message.str();
202  }
203 
204  // # of degrees of freedom and chi^2 for test
205  int Ndof_; double chi2_;
206 };
207 
208 //===================== Comp2RefKolmogorov ===================//
211 {
212 public:
213  Comp2RefKolmogorov(const std::string &name) : SimpleTest(name)
214  {
216  }
217  static std::string getAlgoName(void) { return "Comp2RefKolmogorov"; }
218 
219  float runTest(const MonitorElement *me);
220 };
221 
222 //==================== ContentsXRange =========================//
223 //== Check that histogram contents are between [Xmin, Xmax] ==//
225 {
226 public:
227  ContentsXRange(const std::string &name) : SimpleTest(name)
228  {
229  rangeInitialized_ = false;
231  }
232  static std::string getAlgoName(void) { return "ContentsXRange"; }
233  float runTest(const MonitorElement *me) ;
234 
236  virtual void setAllowedXRange(double xmin, double xmax)
237  {
238  xmin_ = xmin; xmax_ = xmax;
239  rangeInitialized_ = true;
240  }
241 
242 protected:
243  double xmin_;double xmax_;
245 };
246 
247 //==================== ContentsYRange =========================//
248 //== Check that histogram contents are between [Ymin, Ymax] ==//
250 {
251 public:
252  ContentsYRange(const std::string &name) : SimpleTest(name,true)
253  {
254  rangeInitialized_ = false;
256  }
257  static std::string getAlgoName(void) { return "ContentsYRange"; }
258  float runTest(const MonitorElement *me);
259 
260  void setUseEmptyBins(unsigned int useEmptyBins) { useEmptyBins_ = useEmptyBins; }
261  virtual void setAllowedYRange(double ymin, double ymax)
262  {
263  ymin_ = ymin; ymax_ = ymax;
264  rangeInitialized_ = true;
265  }
266 
267 protected:
268  double ymin_; double ymax_;
270  unsigned int useEmptyBins_;
271 
272 };
273 
274 //============================== DeadChannel =================================//
276 class DeadChannel : public SimpleTest
277 {
278 public:
279  DeadChannel(const std::string &name) : SimpleTest(name,true)
280  {
281  rangeInitialized_ = false;
283  }
284  static std::string getAlgoName(void) { return "DeadChannel"; }
285  float runTest(const MonitorElement *me);
286 
288  void setThreshold(double ymin)
289  {
290  ymin_ = ymin;
291  rangeInitialized_ = true;
292  }
293 
294 protected:
295  double ymin_;
297 };
298 
299 
300 //==================== NoisyChannel =========================//
302 class NoisyChannel : public SimpleTest
303 {
304 public:
305  NoisyChannel(const std::string &name) : SimpleTest(name,true)
306  {
307  rangeInitialized_ = false;
308  numNeighbors_ = 1;
310  }
311  static std::string getAlgoName(void) { return "NoisyChannel"; }
312  float runTest(const MonitorElement*me);
313 
321  void setNumNeighbors(unsigned n) { if (n > 0) numNeighbors_ = n; }
322 
327  void setTolerance(float percentage)
328  {
329  if (percentage >=0)
330  {
331  tolerance_ = percentage;
332  rangeInitialized_ = true;
333  }
334  }
335 
336 protected:
339  double getAverage(int bin, const TH1 *h) const;
340 
341  float tolerance_; /*< tolerance for considering a channel noisy */
342  unsigned numNeighbors_; /*< # of neighboring channels for calculating average to be used
343  for comparison with channel under consideration */
344  bool rangeInitialized_; /*< init-flag for tolerance */
345 };
346 
347 //==================== ContentsWithinExpected =========================//
348 // Check that every TH2 channel has mean, RMS within allowed range.
350 {
351 public:
352  ContentsWithinExpected(const std::string &name) : SimpleTest(name,true)
353  {
354  checkMean_ = checkRMS_ = false;
355  minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
356  checkMeanTolerance_ = false;
357  toleranceMean_ = -1.0;
359  }
360  static std::string getAlgoName(void) { return "ContentsWithinExpected"; }
361  float runTest(const MonitorElement *me);
362 
363  void setUseEmptyBins(unsigned int useEmptyBins) {
364  useEmptyBins_ = useEmptyBins;
365  }
366  void setMeanRange(double xmin, double xmax);
367  void setRMSRange(double xmin, double xmax);
368 
370  void setMeanTolerance(float fracTolerance)
371  {
372  if (fracTolerance >= 0.0)
373  {
374  toleranceMean_ = fracTolerance;
375  checkMeanTolerance_ = true;
376  }
377  }
378 
379 protected:
380  bool checkMean_; //< if true, check the mean value
381  bool checkRMS_; //< if true, check the RMS value
382  bool checkMeanTolerance_; //< if true, check mean tolerance
383  float toleranceMean_; //< fractional tolerance on mean (use only if checkMeanTolerance_ = true)
384  float minMean_, maxMean_; //< allowed range for mean (use only if checkMean_ = true)
385  float minRMS_, maxRMS_; //< allowed range for mean (use only if checkRMS_ = true)
386  unsigned int useEmptyBins_;
387 
388 };
389 
390 //==================== MeanWithinExpected =========================//
393 {
394 public:
395  MeanWithinExpected(const std::string &name) : SimpleTest(name)
396  {
398  }
399  static std::string getAlgoName(void) { return "MeanWithinExpected"; }
400  float runTest(const MonitorElement*me);
401 
402  void setExpectedMean(double mean) { expMean_ = mean; }
403  void useRange(double xmin, double xmax);
404  void useSigma(double expectedSigma);
405  void useRMS(void) ;
406 
407 protected:
408  bool useRMS_; //< if true, will use RMS of distribution
409  bool useSigma_; //< if true, will use expected_sigma
410  bool useRange_; //< if true, will use allowed range
411  double sigma_; //< sigma to be used in probability calculation (use only if useSigma_ = true)
412  double expMean_; //< expected mean value (used only if useSigma_ = true or useRMS_ = true)
413  double xmin_, xmax_; //< allowed range for mean (use only if useRange_ = true)
414 
415 };
416 
417 //==================== AllContentWithinFixedRange =========================//
418 /*class AllContentWithinFixedRange : public SimpleTest
419 {
420 public:
421  AllContentWithinFixedRange(const std::string &name) : SimpleTest(name)
422  {
423  setAlgoName(getAlgoName());
424  }
425  static std::string getAlgoName(void) { return "RuleAllContentWithinFixedRange"; }
426  float runTest(const MonitorElement *me);
427 
428  void set_x_min(double x) { x_min = x; }
429  void set_x_max(double x) { x_max = x; }
430  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
431  void set_S_fail(double S) { S_fail = S; }
432  void set_S_pass(double S) { S_pass = S; }
433  double get_epsilon_obs(void) { return epsilon_obs; }
434  double get_S_fail_obs(void) { return S_fail_obs; }
435  double get_S_pass_obs(void) { return S_pass_obs; }
436  int get_result(void) { return result; }
437 
438 protected:
439  TH1F *histogram ; //define Test histo
440  double x_min, x_max;
441  double epsilon_max;
442  double S_fail, S_pass;
443  double epsilon_obs;
444  double S_fail_obs, S_pass_obs;
445  int result;
446 };
447 */
448 //==================== AllContentWithinFloatingRange =========================//
449 /*class AllContentWithinFloatingRange : public SimpleTest
450 {
451 public:
452  AllContentWithinFloatingRange(const std::string &name) : SimpleTest(name)
453  {
454  setAlgoName(getAlgoName());
455  }
456  static std::string getAlgoName(void) { return "RuleAllContentWithinFloatingRange"; }
457 
458  void set_Nrange(int N) { Nrange = N; }
459  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
460  void set_S_fail(double S) { S_fail = S; }
461  void set_S_pass(double S) { S_pass = S; }
462  double get_epsilon_obs(void) { return epsilon_obs; }
463  double get_S_fail_obs(void) { return S_fail_obs; }
464  double get_S_pass_obs(void) { return S_pass_obs; }
465  int get_result(void) { return result; }
466 
467  float runTest(const MonitorElement *me );
468 
469 protected:
470  TH1F *histogram ; //define Test histo
471  int Nrange;
472  double epsilon_max;
473  double S_fail, S_pass;
474  double epsilon_obs;
475  double S_fail_obs, S_pass_obs;
476  int result;
477 };*/
478 
479 //==================== FlatOccupancy1d =========================//
480 #if 0 // FIXME: need to know what parameters to set before runTest!
481 class FlatOccupancy1d : public SimpleTest
482 {
483 public:
484  FlatOccupancy1d(const std::string &name) : SimpleTest(name)
485  {
486  Nbins = 0;
487  FailedBins[0] = 0;
488  FailedBins[1] = 0;
489  setAlgoName(getAlgoName());
490  }
491 
492  ~FlatOccupancy1d(void)
493  {
494  delete [] FailedBins[0];
495  delete [] FailedBins[1];
496  }
497 
498  static std::string getAlgoName(void) { return "RuleFlatOccupancy1d"; }
499 
500  void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
501  void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
502  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
503  void set_S_fail(double S) { S_fail = S; }
504  void set_S_pass(double S) { S_pass = S; }
505  double get_FailedBins(void) { return *FailedBins[2]; } // FIXME: WRONG! OFF BY ONE!?
506  int get_result() { return result; }
507 
508  float runTest(const MonitorElement*me);
509 
510 protected:
511  double *ExclusionMask;
512  double epsilon_min, epsilon_max;
513  double S_fail, S_pass;
514  double *FailedBins[2];
515  int Nbins;
516  int result;
517 };
518 #endif
519 
520 //==================== FixedFlatOccupancy1d =========================//
522 {
523 public:
524  FixedFlatOccupancy1d(const std::string &name) : SimpleTest(name)
525  {
526  Nbins = 0;
527  FailedBins[0] = 0;
528  FailedBins[1] = 0;
530  }
531 
533  {
534  if( Nbins > 0 )
535  {
536  delete [] FailedBins[0];
537  delete [] FailedBins[1];
538  }
539  }
540 
541  static std::string getAlgoName(void) { return "RuleFixedFlatOccupancy1d"; }
542 
543  void set_Occupancy(double level) { b = level; }
544  void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
547  void set_S_fail(double S) { S_fail = S; }
548  void set_S_pass(double S) { S_pass = S; }
549  double get_FailedBins(void) { return *FailedBins[2]; } // FIXME: WRONG! OFF BY ONE!?
550  int get_result() { return result; }
551 
552  float runTest(const MonitorElement*me);
553 
554 protected:
555  double b;
556  double *ExclusionMask;
558  double S_fail, S_pass;
559  double *FailedBins[2];
560  int Nbins;
561  int result;
562 };
563 
564 //==================== CSC01 =========================//
565 class CSC01 : public SimpleTest
566 {
567 public:
568  CSC01(const std::string &name) : SimpleTest(name)
569  {
571  }
572  static std::string getAlgoName(void) { return "RuleCSC01"; }
573 
575  void set_S_fail(double S) { S_fail = S; }
576  void set_S_pass(double S) { S_pass = S; }
577  double get_epsilon_obs() { return epsilon_obs; }
578  double get_S_fail_obs() { return S_fail_obs; }
579  double get_S_pass_obs() { return S_pass_obs; }
580  int get_result() { return result; }
581 
582  float runTest(const MonitorElement*me);
583 
584 protected:
585  double epsilon_max;
586  double S_fail, S_pass;
587  double epsilon_obs;
589  int result;
590 };
591 
592 //======================== CompareToMedian ====================//
594 {
595 public:
596  //Initialize for TProfile, colRings
597  CompareToMedian(const std::string &name) : SimpleTest(name,true){
598  this->_min = 0.2;
599  this->_max = 3.0;
600  this->_emptyBins = 0;
601  this->_maxMed = 10;
602  this->_minMed = 0;
603  this->nBins = 0;
604  this->_statCut = 0;
605  reset();
607  };
608 
610 
611  static std::string getAlgoName(void) { return "CompareToMedian"; }
612 
613  float runTest(const MonitorElement *me);
614  void setMin(float min){_min = min;};
615  void setMax(float max){_max = max;};
616  void setEmptyBins(int eB){eB > 0 ? _emptyBins = 1 : _emptyBins = 0;};
617  void setMaxMedian(float max){_maxMed = max;};
618  void setMinMedian(float min){_minMed = min;};
619  void setStatCut(float cut){_statCut = (cut > 0) ? cut : 0;};
620 
621 protected :
622  void setMessage(void){
623  std::ostringstream message;
624  message << "Test " << qtname_ << " (" << algoName_
625  << "): Entry fraction within range = " << prob_;
626  message_ = message.str();
627  }
628 
629 private :
630  float _min, _max; //Test values
631  int _emptyBins; //use empty bins
632  float _maxMed,_minMed; //Global max for median&mean
633  float _statCut; //Minimal number of non zero entries needed for the quality test
634 
635  int nBinsX, nBinsY; //Dimensions of hystogram
636 
637  int nBins; //Number of (non empty) bins
638 
639  //Vector contain bin values
640  std::vector<float> binValues;
641 
642  void reset(){binValues.clear();};
643 
644 };
645 //======================== CompareLastFilledBin ====================//
647 {
648 public:
649  //Initialize for TProfile, colRings
650  CompareLastFilledBin(const std::string &name) : SimpleTest(name,true){
651  this->_min = 0.0;
652  this->_max = 1.0;
653  this->_average = 0.0;
655  };
656 
658 
659  static std::string getAlgoName(void) { return "CompareLastFilledBin"; }
660 
661  float runTest(const MonitorElement *me);
663  void setMin(float min){_min = min;};
664  void setMax(float max){_max = max;};
665 
666 
667 protected :
668  void setMessage(void){
669  std::ostringstream message;
670  message << "Test " << qtname_ << " (" << algoName_
671  << "): Last Bin filled with desired value = " << prob_;
672  message_ = message.str();
673  }
674 
675 private :
676  float _min, _max; //Test values
677  float _average;
678 };
679 
680 //==================== AllContentAlongDiagonal =========================//
681 #if 0 // FIXME: need to know what parameters to set before runTest!
682 class AllContentAlongDiagonal : public SimpleTest
683 
684 public:
685  AllContentAlongDiagonal(const std::string &name) : SimpleTest(name)
686  {
687  setAlgoName(getAlgoName());
688  }
689  static std::string getAlgoName(void) { return "RuleAllContentAlongDiagonal"; }
690 
691  void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
692  void set_S_fail(double S) { S_fail = S; }
693  void set_S_pass(double S) { S_pass = S; }
694  double get_epsilon_obs() { return epsilon_obs; }
695  double get_S_fail_obs() { return S_fail_obs; }
696  double get_S_pass_obs() { return S_pass_obs; }
697  int get_result() { return result; }
698 
699  //public:
700  //using SimpleTest::runTest;
701  float runTest(const MonitorElement*me);
702 
703 protected:
704  double epsilon_max;
705  double S_fail, S_pass;
706  double epsilon_obs;
707  double S_fail_obs, S_pass_obs;
708  int result;
709 };
710 #endif
711 
712 #endif // DQMSERVICES_CORE_Q_CRITERION_H
ContentsWithinExpected ContentsWithinExpectedROOT
Definition: QTest.h:22
void setErrorProb(float prob)
Definition: QTest.h:61
float runTest(const MonitorElement *me)
std::string getMessage(void) const
get message attached to test
Definition: QTest.h:54
void set_epsilon_min(double epsilon)
Definition: QTest.h:545
FixedFlatOccupancy1d FixedFlatOccupancy1dROOT
Definition: QTest.h:27
QCriterion * qcriterion_
Definition: QReport.h:51
void setStatCut(float cut)
Definition: QTest.h:619
double get_S_pass_obs()
Definition: QTest.h:579
static std::string getAlgoName(void)
Definition: QTest.h:311
double xmin_
Definition: QTest.h:413
double getAverage(int bin, const TH1 *h) const
Definition: QTest.cc:843
void useRMS(void)
Definition: QTest.cc:1247
Comp2RefEqualH(const std::string &name)
Definition: QTest.h:172
float runTest(const MonitorElement *me)
Definition: QTest.cc:547
void setAlgoName(std::string name)
set algorithm name
Definition: QTest.h:76
std::string getName(void) const
get name of quality test
Definition: QTest.h:56
test that histogram contents are above Ymin
Definition: QTest.h:276
double epsilon_max
Definition: QTest.h:557
double ymin_
ymin - threshold
Definition: QTest.h:295
double epsilon_max
Definition: QTest.h:585
CSC01(const std::string &name)
Definition: QTest.h:568
float runTest(const MonitorElement *me)
Definition: QTest.cc:872
SimpleTest(const std::string &name, bool keepBadChannels=false)
Definition: QTest.h:136
std::string algorithm
Definition: DQMNet.h:92
void set_ExclusionMask(double *mask)
Definition: QTest.h:544
float runTest(const MonitorElement *me)
Definition: QTest.cc:626
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:260
void setMin(float min)
Definition: QTest.h:614
double epsilon_obs
Definition: QTest.h:587
int verbose_
Definition: QTest.h:116
static std::string getAlgoName(void)
Definition: QTest.h:360
FlatOccupancy1d FlatOccupancy1dROOT
Definition: QTest.h:26
float _statCut
Definition: QTest.h:633
int status_
Definition: QTest.h:112
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram&#39;s X-range)
Definition: QTest.h:236
float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv)
Definition: QTest.h:78
FlatOccupancy1d RuleFlatOccupancy1d
Definition: QTest.h:26
double * ExclusionMask
Definition: QTest.h:556
std::string algoName_
name of quality test
Definition: QTest.h:110
Comp2RefChi2 Comp2RefChi2ROOT
Definition: QTest.h:15
static const int WARNING
static std::string getAlgoName(void)
Definition: QTest.h:232
int get_result()
Definition: QTest.h:580
void setRMSRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1123
void useSigma(double expectedSigma)
Definition: QTest.cc:1236
#define min(a, b)
Definition: mlp_lapack.h:161
CSC01 CSC01ROOT
Definition: QTest.h:28
double S_pass
Definition: QTest.h:586
int _emptyBins
Definition: QTest.h:631
double S_pass_obs
Definition: QTest.h:588
void setMax(float max)
Definition: QTest.h:615
virtual std::vector< DQMChannel > getBadChannels(void) const
get vector of channels that failed test (not always relevant!)
Definition: QTest.h:144
void setMin(float min)
Definition: QTest.h:663
double xmax_
Definition: QTest.h:413
NoisyChannel NoisyChannelROOT
Definition: QTest.h:20
std::string qtname_
Definition: QTest.h:109
void setNumNeighbors(unsigned n)
Definition: QTest.h:321
static std::string getAlgoName(void)
Definition: QTest.h:284
Algorithm for testing if histogram&#39;s mean value is near expected value.
Definition: QTest.h:392
static std::string getAlgoName(void)
Definition: QTest.h:611
DeadChannel(const std::string &name)
Definition: QTest.h:279
float runTest(const MonitorElement *me)
Definition: QTest.cc:293
ContentsXRange(const std::string &name)
Definition: QTest.h:227
Check if any channels are noisy compared to neighboring ones.
Definition: QTest.h:302
float runTest(const MonitorElement *me)
Definition: QTest.cc:1395
AllContentAlongDiagonal RuleAllContentAlongDiagonal
Definition: QTest.h:29
double epsilon_min
Definition: QTest.h:557
int Ndof_
Definition: QTest.h:205
bool rangeInitialized_
Definition: QTest.h:244
Comp2RefEqualH Comp2RefEqualHROOT
Definition: QTest.h:17
ContentsXRange ContentsXRangeROOT
Definition: QTest.h:18
CompareToMedian CompareToMedianROOT
Definition: QTest.h:30
float errorProb_
Definition: QTest.h:114
virtual void setMessage(void)
set status &amp; message after test has run
Definition: QTest.h:152
CompareLastFilledBin CompareLastFilledBinROOT
Definition: QTest.h:31
double get_S_fail_obs()
Definition: QTest.h:578
const T & max(const T &a, const T &b)
FixedFlatOccupancy1d RuleFixedFlatOccupancy1d
Definition: QTest.h:27
double S_fail_obs
Definition: QTest.h:588
float _minMed
Definition: QTest.h:632
FixedFlatOccupancy1d(const std::string &name)
Definition: QTest.h:524
tuple result
Definition: query.py:137
void setEmptyBins(int eB)
Definition: QTest.h:616
Comp2RefKolmogorov Comp2RefKolmogorovROOT
Definition: QTest.h:16
void set_Occupancy(double level)
Definition: QTest.h:543
static std::string getAlgoName(void)
Definition: QTest.h:572
void set_epsilon_max(double epsilon)
Definition: QTest.h:574
static std::string getAlgoName(void)
Definition: QTest.h:217
float _maxMed
Definition: QTest.h:632
float prob_
name of algorithm
Definition: QTest.h:111
~CompareToMedian()
Definition: QTest.h:609
std::string algoName(void) const
get algorithm name
Definition: QTest.h:58
CompareLastFilledBin(const std::string &name)
Definition: QTest.h:650
static const float ERROR_PROB_THRESHOLD
Definition: QTest.h:121
void setTolerance(float percentage)
Definition: QTest.h:327
double xmax_
Definition: QTest.h:243
unsigned int useEmptyBins_
Definition: QTest.h:386
CSC01 RuleCSC01
Definition: QTest.h:28
static std::string getAlgoName(void)
Definition: QTest.h:257
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:142
float runTest(const MonitorElement *me)
Definition: QTest.cc:747
double S_fail
Definition: QTest.h:586
MeanWithinExpected MeanWithinExpectedROOT
Definition: QTest.h:23
virtual std::vector< DQMChannel > getBadChannels(void) const
Definition: QTest.h:64
void reset()
Definition: QTest.h:642
bool checkMeanTolerance_
Definition: QTest.h:382
ContentsWithinExpected(const std::string &name)
Definition: QTest.h:352
void setExpectedMean(double mean)
Definition: QTest.h:402
bool keepBadChannels_
Definition: QTest.h:159
double xmin_
Definition: QTest.h:243
std::string qtname
Definition: DQMNet.h:91
AllContentAlongDiagonal AllContentAlongDiagonalROOT
Definition: QTest.h:29
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:363
double sigma_
Definition: QTest.h:411
void setMaxMedian(float max)
Definition: QTest.h:617
std::string message_
quality test status
Definition: QTest.h:113
int result
Definition: QTest.h:589
void useRange(double xmin, double xmax)
Definition: QTest.cc:1226
static std::string getAlgoName(void)
Definition: QTest.h:176
void set_epsilon_max(double epsilon)
Definition: QTest.h:546
int getStatus(void) const
(class should be created by DQMStore class)
Definition: QTest.h:52
std::vector< float > binValues
Definition: QTest.h:640
double * FailedBins[2]
Definition: QTest.h:559
NoisyChannel(const std::string &name)
Definition: QTest.h:305
CompareToMedian(const std::string &name)
Definition: QTest.h:597
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
float runTest(const MonitorElement *me)
Definition: QTest.cc:163
virtual float runTest(const MonitorElement *me)
Definition: QTest.cc:27
double ymin_
Definition: QTest.h:268
void set_S_pass(double S)
Definition: QTest.h:548
std::vector< DQMChannel > badChannels_
Definition: QTest.h:158
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
int average
Definition: PDRates.py:137
MeanWithinExpected(const std::string &name)
Definition: QTest.h:395
double get_epsilon_obs()
Definition: QTest.h:577
Comparison to reference using the Kolmogorov algorithm.
Definition: QTest.h:210
static std::string getAlgoName(void)
Definition: QTest.h:541
float tolerance_
Definition: QTest.h:341
void init(void)
initialize values
Definition: QTest.cc:17
void setVerbose(int verbose)
probability limits for warnings, errors
Definition: QTest.h:115
void setMax(float max)
Definition: QTest.h:664
void setMessage(void)
set status &amp; message after test has run
Definition: QTest.h:622
void setMeanRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1111
float _max
Definition: QTest.h:630
static std::string getAlgoName(void)
Definition: QTest.h:189
float runTest(const MonitorElement *me)
Definition: QTest.cc:1147
void set_S_fail(double S)
Definition: QTest.h:547
bool rangeInitialized_
Definition: QTest.h:269
double expMean_
Definition: QTest.h:412
DeadChannel DeadChannelROOT
Definition: QTest.h:21
QCriterion(std::string qtname)
Definition: QTest.h:68
std::vector< DQMChannel > badChannels_
Definition: QReport.h:52
std::string message
Definition: DQMNet.h:90
static const int STATUS_OK
tuple cout
Definition: gather_cfg.py:121
float runTest(const MonitorElement *me)
Definition: QTest.cc:40
ContentsYRange(const std::string &name)
Definition: QTest.h:252
ContentsYRange ContentsYRangeROOT
Definition: QTest.h:19
unsigned minEntries_
Definition: QTest.h:157
virtual ~QCriterion(void)
Definition: QTest.h:72
tuple level
Definition: testEve_cfg.py:34
float runTest(const MonitorElement *me)
Definition: QTest.cc:1264
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Definition: QTest.h:370
const double epsilon
double chi2_
Definition: QTest.h:205
Comp2RefChi2(const std::string &name)
Definition: QTest.h:185
void setThreshold(double ymin)
set Ymin (inclusive) threshold for &quot;dead&quot; channel (default: 0)
Definition: QTest.h:288
void setMessage(void)
set status &amp; message after test has run
Definition: QTest.h:194
void set_S_fail(double S)
Definition: QTest.h:575
bool rangeInitialized_
Definition: QTest.h:296
void setAverage(float average)
Definition: QTest.h:662
~FixedFlatOccupancy1d(void)
Definition: QTest.h:532
virtual void setAllowedYRange(double ymin, double ymax)
Definition: QTest.h:261
float qtresult
Definition: DQMNet.h:89
void set_S_pass(double S)
Definition: QTest.h:576
unsigned int useEmptyBins_
Definition: QTest.h:270
float warningProb_
message attached to test
Definition: QTest.h:114
bool rangeInitialized_
Definition: QTest.h:344
float runTest(const MonitorElement *me)
Definition: QTest.h:565
double get_FailedBins(void)
Definition: QTest.h:549
virtual void setMessage(void)=0
set message after test has run
float _min
Definition: QTest.h:630
static std::string getAlgoName(void)
Definition: QTest.h:659
static const int ERROR
double ymax_
Definition: QTest.h:268
static std::string getAlgoName(void)
Definition: QTest.h:399
float runTest(const MonitorElement *me)
Definition: QTest.cc:477
void setMinMedian(float min)
Definition: QTest.h:618
static const float WARNING_PROB_THRESHOLD
default &quot;probability&quot; values for setting warnings &amp; errors when running tests
Definition: QTest.h:120
unsigned numNeighbors_
Definition: QTest.h:342
Comp2RefKolmogorov(const std::string &name)
Definition: QTest.h:213
void setMessage(void)
set status &amp; message after test has run
Definition: QTest.h:668