CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DQMServices/Core/interface/QTest.h

Go to the documentation of this file.
00001 #ifndef DQMSERVICES_CORE_Q_CRITERION_H
00002 # define DQMSERVICES_CORE_Q_CRITERION_H
00003 
00004 # include "DQMServices/Core/interface/MonitorElement.h"
00005 # include "TProfile2D.h"
00006 # include "TProfile.h"
00007 # include "TH2F.h"
00008 # include "TH1F.h"
00009 # include <sstream>
00010 # include <string>
00011 # include <map>
00012 
00013 //#include "DQMServices/Core/interface/DQMStore.h"
00014 
00015 class Comp2RefChi2;                     typedef Comp2RefChi2 Comp2RefChi2ROOT;
00016 class Comp2RefKolmogorov;               typedef Comp2RefKolmogorov Comp2RefKolmogorovROOT;
00017 class Comp2RefEqualH;                   typedef Comp2RefEqualH Comp2RefEqualHROOT;
00018 class ContentsXRange;                   typedef ContentsXRange ContentsXRangeROOT;
00019 class ContentsYRange;                   typedef ContentsYRange ContentsYRangeROOT;
00020 class NoisyChannel;                     typedef NoisyChannel NoisyChannelROOT;
00021 class DeadChannel;                      typedef DeadChannel DeadChannelROOT;
00022 class ContentsWithinExpected;           typedef ContentsWithinExpected ContentsWithinExpectedROOT;
00023 class MeanWithinExpected;               typedef MeanWithinExpected MeanWithinExpectedROOT;
00024 //class AllContentWithinFixedRange;     typedef AllContentWithinFixedRange RuleAllContentWithinFixedRange; typedef AllContentWithinFixedRange AllContentWithinFixedRangeROOT;
00025 //class AllContentWithinFloatingRange;  typedef AllContentWithinFloatingRange RuleAllContentWithinFloatingRange;        typedef AllContentWithinFloatingRange AllContentWithinFloatingRangeROOT;
00026 class FlatOccupancy1d;                  typedef FlatOccupancy1d RuleFlatOccupancy1d; typedef FlatOccupancy1d FlatOccupancy1dROOT;
00027 class FixedFlatOccupancy1d;             typedef FixedFlatOccupancy1d RuleFixedFlatOccupancy1d; typedef FixedFlatOccupancy1d FixedFlatOccupancy1dROOT;
00028 class CSC01;                            typedef CSC01 RuleCSC01; typedef CSC01 CSC01ROOT;
00029 class AllContentAlongDiagonal;          typedef AllContentAlongDiagonal RuleAllContentAlongDiagonal; typedef AllContentAlongDiagonal AllContentAlongDiagonalROOT;
00030 class CompareToMedian;                  typedef CompareToMedian CompareToMedianROOT;
00031 class CompareLastFilledBin;             typedef CompareLastFilledBin CompareLastFilledBinROOT;
00032 
00045 class QCriterion
00046 {
00048 
00049 public:
00050 
00052   int getStatus(void) const             { return status_; }
00054   std::string getMessage(void) const    { return message_; }
00056   std::string getName(void) const       { return qtname_; }
00058   std::string algoName(void) const      { return algoName_; }
00060   void setWarningProb(float prob)       { warningProb_ = prob; }
00061   void setErrorProb(float prob)         { errorProb_ = prob; }
00064   virtual std::vector<DQMChannel> getBadChannels(void) const
00065                                         { return std::vector<DQMChannel>(); }
00066 
00067 protected:
00068   QCriterion(std::string qtname)        { qtname_ = qtname; init(); }
00070   void init(void);
00071 
00072   virtual ~QCriterion(void)             {}
00073 
00074   virtual float runTest(const MonitorElement *me);
00076   void setAlgoName(std::string name)    { algoName_ = name; }
00077 
00078   float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv)   {
00079       assert(qr.qcriterion_ == this);
00080       assert(qv.qtname == qtname_);
00081 
00082       prob_ = runTest(me); // this runTest goes to SimpleTest derivates
00083 
00084       if (prob_ < errorProb_) status_ = dqm::qstatus::ERROR;
00085       else if (prob_ < warningProb_) status_ = dqm::qstatus::WARNING;
00086       else status_ = dqm::qstatus::STATUS_OK;
00087 
00088       setMessage(); // this goes to SimpleTest derivates
00089      
00090       if (verbose_==2) std::cout << " Message = " << message_ << std::endl;
00091       if (verbose_==2) std::cout << " Name = " << qtname_ << 
00092               " / Algorithm = " << algoName_ << 
00093               " / Status = " << status_ << 
00094               " / Prob = " << prob_ << std::endl;
00095 
00096       qv.code = status_;
00097       qv.message = message_;
00098       qv.qtname = qtname_;
00099       qv.algorithm = algoName_;
00100       qv.qtresult = prob_;
00101       qr.badChannels_ = getBadChannels();
00102 
00103       return prob_;
00104     }
00105 
00107   virtual void setMessage(void) = 0;
00108 
00109   std::string qtname_;  
00110   std::string algoName_;  
00111   float prob_;
00112   int status_;  
00113   std::string message_;  
00114   float warningProb_, errorProb_;  
00115   void setVerbose(int verbose)          { verbose_ = verbose; }
00116   int verbose_;  
00117 
00118 private:
00120   static const float WARNING_PROB_THRESHOLD;
00121   static const float ERROR_PROB_THRESHOLD;
00122 
00124   friend class DQMStore;
00126   friend class MonitorElement;
00127 };
00128 
00132 
00133 class SimpleTest : public QCriterion
00134 {
00135 public:
00136   SimpleTest(const std::string &name, bool keepBadChannels = false) : QCriterion(name),
00137   minEntries_ (0),
00138   keepBadChannels_ (keepBadChannels) 
00139   {}
00140 
00142   void setMinimumEntries(unsigned n) { minEntries_ = n; }
00144   virtual std::vector<DQMChannel> getBadChannels(void) const
00145   { 
00146     return keepBadChannels_ ? badChannels_ : QCriterion::getBadChannels(); 
00147   }
00148 
00149 protected:
00150 
00152   virtual void setMessage(void) 
00153   {
00154     message_.clear();
00155   }
00156 
00157   unsigned minEntries_;  //< minimum # of entries needed
00158   std::vector<DQMChannel> badChannels_;
00159   bool keepBadChannels_;
00160  };
00161 
00162 
00163 //===============================================================//
00164 //========= Classes for particular QUALITY TESTS ================//
00165 //===============================================================//
00166 
00167 //===================== Comp2RefEqualH ===================//
00168 //== Algorithm for comparing equality of histograms ==//
00169 class Comp2RefEqualH : public SimpleTest
00170 {
00171 public:
00172   Comp2RefEqualH(const std::string &name) : SimpleTest(name,true)
00173   { 
00174     setAlgoName( getAlgoName() ); 
00175   }
00176   static std::string getAlgoName(void) { return "Comp2RefEqualH"; }
00177   float runTest(const MonitorElement*me);
00178 };
00179 
00180 //===================== Comp2RefChi2 ===================//
00181 // comparison to reference using the  chi^2 algorithm
00182 class Comp2RefChi2 : public SimpleTest
00183 {
00184 public:
00185   Comp2RefChi2(const std::string &name) :SimpleTest(name)
00186   { 
00187     setAlgoName(getAlgoName()); 
00188   }
00189   static std::string getAlgoName(void) { return "Comp2RefChi2"; }
00190   float runTest(const MonitorElement*me);
00191   
00192 protected:
00193 
00194   void setMessage(void) 
00195   {
00196     std::ostringstream message;
00197     message << "chi2/Ndof = " << chi2_ << "/" << Ndof_
00198             << ", minimum needed statistics = " << minEntries_
00199             << " warning threshold = " << this->warningProb_
00200             << " error threshold = " << this->errorProb_;
00201     message_ = message.str();
00202   }
00203 
00204   // # of degrees of freedom and chi^2 for test
00205   int Ndof_; double chi2_;
00206 };
00207 
00208 //===================== Comp2RefKolmogorov ===================//
00210 class Comp2RefKolmogorov : public SimpleTest
00211 {
00212 public:
00213   Comp2RefKolmogorov(const std::string &name) : SimpleTest(name)
00214   { 
00215     setAlgoName(getAlgoName()); 
00216   }
00217   static std::string getAlgoName(void) { return "Comp2RefKolmogorov"; }
00218 
00219   float runTest(const MonitorElement *me);
00220 };
00221 
00222 //==================== ContentsXRange =========================//
00223 //== Check that histogram contents are between [Xmin, Xmax] ==//
00224 class ContentsXRange : public SimpleTest
00225 {
00226 public:
00227   ContentsXRange(const std::string &name) : SimpleTest(name)
00228   {
00229     rangeInitialized_ = false;
00230     setAlgoName(getAlgoName());
00231   }
00232   static std::string getAlgoName(void) { return "ContentsXRange"; }
00233   float runTest(const MonitorElement *me) ;
00234 
00236   virtual void setAllowedXRange(double xmin, double xmax)
00237   { 
00238     xmin_ = xmin; xmax_ = xmax; 
00239     rangeInitialized_ = true; 
00240   }
00241 
00242 protected: 
00243   double xmin_;double xmax_;
00244   bool rangeInitialized_;
00245 };
00246 
00247 //==================== ContentsYRange =========================//
00248 //== Check that histogram contents are between [Ymin, Ymax] ==//
00249 class ContentsYRange : public SimpleTest
00250 {
00251 public:
00252   ContentsYRange(const std::string &name) : SimpleTest(name,true)
00253   {
00254    rangeInitialized_ = false;
00255    setAlgoName(getAlgoName());
00256   }
00257   static std::string getAlgoName(void) { return "ContentsYRange"; }
00258   float runTest(const MonitorElement *me);
00259 
00260   void setUseEmptyBins(unsigned int useEmptyBins) { useEmptyBins_ = useEmptyBins; }
00261   virtual void setAllowedYRange(double ymin, double ymax)
00262   { 
00263     ymin_ = ymin; ymax_ = ymax; 
00264     rangeInitialized_ = true; 
00265   }
00266 
00267 protected:
00268   double ymin_; double ymax_;
00269   bool rangeInitialized_;
00270   unsigned int useEmptyBins_;
00271 
00272 };
00273 
00274 //============================== DeadChannel =================================//
00276 class DeadChannel : public SimpleTest
00277 {
00278 public:
00279   DeadChannel(const std::string &name) : SimpleTest(name,true)
00280   {
00281    rangeInitialized_ = false;
00282    setAlgoName(getAlgoName());
00283   }
00284   static std::string getAlgoName(void) { return "DeadChannel"; }
00285   float runTest(const MonitorElement *me);
00286 
00288   void setThreshold(double ymin)
00289   { 
00290     ymin_ = ymin;  
00291     rangeInitialized_ = true; 
00292   } 
00293 
00294 protected:
00295   double ymin_;
00296   bool rangeInitialized_;
00297 };
00298 
00299 
00300 //==================== NoisyChannel =========================//
00302 class NoisyChannel : public SimpleTest
00303 {
00304 public:
00305   NoisyChannel(const std::string &name) : SimpleTest(name,true)
00306   {
00307     rangeInitialized_ = false;
00308     numNeighbors_ = 1;
00309     setAlgoName(getAlgoName());
00310   }
00311   static std::string getAlgoName(void) { return "NoisyChannel"; }
00312   float runTest(const MonitorElement*me);
00313 
00321   void setNumNeighbors(unsigned n) { if (n > 0) numNeighbors_ = n; }
00322 
00327   void setTolerance(float percentage)
00328   {
00329     if (percentage >=0)
00330     {
00331       tolerance_ = percentage;
00332       rangeInitialized_ = true;
00333     }
00334   }
00335 
00336 protected:
00339   double getAverage(int bin, const TH1 *h) const;
00340 
00341   float tolerance_;        /*< tolerance for considering a channel noisy */
00342   unsigned numNeighbors_;  /*< # of neighboring channels for calculating average to be used
00343                              for comparison with channel under consideration */
00344   bool rangeInitialized_;  /*< init-flag for tolerance */
00345 };
00346 
00347 //==================== ContentsWithinExpected  =========================//
00348 // Check that every TH2 channel has mean, RMS within allowed range.
00349 class ContentsWithinExpected : public SimpleTest
00350 {
00351 public:
00352   ContentsWithinExpected(const std::string &name) : SimpleTest(name,true)
00353   {
00354     checkMean_ = checkRMS_ = false;
00355     minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
00356     checkMeanTolerance_ = false;
00357     toleranceMean_ = -1.0;
00358     setAlgoName(getAlgoName());
00359   }
00360   static std::string getAlgoName(void) { return "ContentsWithinExpected"; }
00361   float runTest(const MonitorElement *me);
00362 
00363   void setUseEmptyBins(unsigned int useEmptyBins) { 
00364     useEmptyBins_ = useEmptyBins; 
00365   }
00366   void setMeanRange(double xmin, double xmax);
00367   void setRMSRange(double xmin, double xmax);
00368 
00370   void setMeanTolerance(float fracTolerance)
00371   {
00372     if (fracTolerance >= 0.0)
00373     {
00374       toleranceMean_ = fracTolerance;
00375       checkMeanTolerance_ = true;
00376     }
00377   }
00378 
00379 protected:
00380   bool checkMean_;          //< if true, check the mean value
00381   bool checkRMS_;           //< if true, check the RMS value
00382   bool checkMeanTolerance_; //< if true, check mean tolerance
00383   float toleranceMean_;     //< fractional tolerance on mean (use only if checkMeanTolerance_ = true)
00384   float minMean_, maxMean_; //< allowed range for mean (use only if checkMean_ = true)
00385   float minRMS_, maxRMS_;   //< allowed range for mean (use only if checkRMS_ = true)
00386   unsigned int useEmptyBins_;
00387 
00388 };
00389 
00390 //==================== MeanWithinExpected  =========================//
00392 class MeanWithinExpected : public SimpleTest
00393 {
00394 public:
00395   MeanWithinExpected(const std::string &name) : SimpleTest(name)
00396   {
00397     setAlgoName(getAlgoName());
00398   }
00399   static std::string getAlgoName(void) { return "MeanWithinExpected"; }
00400   float runTest(const MonitorElement*me);
00401 
00402   void setExpectedMean(double mean) { expMean_ = mean; }
00403   void useRange(double xmin, double xmax);
00404   void useSigma(double expectedSigma);
00405   void useRMS(void) ;
00406 
00407 protected:
00408   bool useRMS_;       //< if true, will use RMS of distribution
00409   bool useSigma_;     //< if true, will use expected_sigma
00410   bool useRange_;     //< if true, will use allowed range
00411   double sigma_;       //< sigma to be used in probability calculation (use only if useSigma_ = true)
00412   double expMean_;     //< expected mean value (used only if useSigma_ = true or useRMS_ = true)
00413   double xmin_, xmax_; //< allowed range for mean (use only if useRange_ = true)
00414 
00415 };
00416 
00417 //==================== AllContentWithinFixedRange   =========================//
00418 /*class AllContentWithinFixedRange : public SimpleTest
00419 {
00420 public:
00421   AllContentWithinFixedRange(const std::string &name) : SimpleTest(name)
00422   { 
00423     setAlgoName(getAlgoName()); 
00424   }
00425   static std::string getAlgoName(void) { return "RuleAllContentWithinFixedRange"; }
00426   float runTest(const MonitorElement *me);
00427 
00428   void set_x_min(double x)             { x_min  = x; }
00429   void set_x_max(double x)             { x_max  = x; }
00430   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00431   void set_S_fail(double S)            { S_fail = S; }
00432   void set_S_pass(double S)            { S_pass = S; }
00433   double get_epsilon_obs(void)         { return epsilon_obs; }
00434   double get_S_fail_obs(void)          { return S_fail_obs;  }
00435   double get_S_pass_obs(void)          { return S_pass_obs;  }
00436   int get_result(void)                 { return result; }
00437 
00438 protected:
00439   TH1F *histogram ; //define Test histo
00440   double x_min, x_max;
00441   double epsilon_max;
00442   double S_fail, S_pass;
00443   double epsilon_obs;
00444   double S_fail_obs, S_pass_obs;
00445   int result;
00446 };
00447 */
00448 //==================== AllContentWithinFloatingRange  =========================//
00449 /*class AllContentWithinFloatingRange : public SimpleTest
00450 {
00451 public:
00452   AllContentWithinFloatingRange(const std::string &name) : SimpleTest(name)
00453   { 
00454     setAlgoName(getAlgoName()); 
00455   }
00456   static std::string getAlgoName(void) { return "RuleAllContentWithinFloatingRange"; }
00457 
00458   void set_Nrange(int N)               { Nrange = N; }
00459   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00460   void set_S_fail(double S)            { S_fail = S; }
00461   void set_S_pass(double S)            { S_pass = S; }
00462   double get_epsilon_obs(void)         { return epsilon_obs; }
00463   double get_S_fail_obs(void)          { return S_fail_obs;  }
00464   double get_S_pass_obs(void)          { return S_pass_obs;  }
00465   int get_result(void)                 { return result; }
00466 
00467   float runTest(const MonitorElement *me );
00468 
00469 protected:
00470   TH1F *histogram ; //define Test histo
00471   int Nrange;
00472   double epsilon_max;
00473   double S_fail, S_pass;
00474   double epsilon_obs;
00475   double S_fail_obs, S_pass_obs;
00476   int result;
00477 };*/
00478 
00479 //==================== FlatOccupancy1d   =========================//
00480 #if 0 // FIXME: need to know what parameters to set before runTest!
00481 class FlatOccupancy1d : public SimpleTest
00482 {
00483 public:
00484   FlatOccupancy1d(const std::string &name) : SimpleTest(name)
00485   {
00486     Nbins = 0;
00487     FailedBins[0] = 0;
00488     FailedBins[1] = 0;
00489     setAlgoName(getAlgoName());
00490   }
00491 
00492   ~FlatOccupancy1d(void)
00493   {
00494     delete [] FailedBins[0];
00495     delete [] FailedBins[1];
00496   }
00497 
00498   static std::string getAlgoName(void) { return "RuleFlatOccupancy1d"; }
00499 
00500   void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
00501   void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
00502   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00503   void set_S_fail(double S)            { S_fail = S; }
00504   void set_S_pass(double S)            { S_pass = S; }
00505   double get_FailedBins(void)          { return *FailedBins[1]; } // FIXME: WRONG! OFF BY ONE!?
00506   int get_result()                     { return result; }
00507 
00508   float runTest(const MonitorElement*me);
00509 
00510 protected:
00511   double *ExclusionMask;
00512   double epsilon_min, epsilon_max;
00513   double S_fail, S_pass;
00514   double *FailedBins[2];
00515   int    Nbins;
00516   int    result;
00517 };
00518 #endif
00519 
00520 //==================== FixedFlatOccupancy1d   =========================//
00521 class FixedFlatOccupancy1d : public SimpleTest
00522 {
00523 public:
00524   FixedFlatOccupancy1d(const std::string &name) : SimpleTest(name)
00525   {
00526     Nbins = 0;
00527     FailedBins[0] = 0;
00528     FailedBins[1] = 0;
00529     setAlgoName(getAlgoName());
00530   }
00531 
00532   ~FixedFlatOccupancy1d(void)
00533   {
00534     if( Nbins > 0 )
00535     {
00536       delete [] FailedBins[0];
00537       delete [] FailedBins[1];
00538     }
00539   }
00540 
00541   static std::string getAlgoName(void) { return "RuleFixedFlatOccupancy1d"; }
00542 
00543   void set_Occupancy(double level)     { b = level; }
00544   void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
00545   void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
00546   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00547   void set_S_fail(double S)            { S_fail = S; }
00548   void set_S_pass(double S)            { S_pass = S; }
00549   double get_FailedBins(void)          { return *FailedBins[1]; } // FIXME: WRONG! OFF BY ONE!?
00550   int get_result()                     { return result; }
00551 
00552   float runTest(const MonitorElement*me);
00553 
00554 protected:
00555   double b;
00556   double *ExclusionMask;
00557   double epsilon_min, epsilon_max;
00558   double S_fail, S_pass;
00559   double *FailedBins[2];
00560   int    Nbins;
00561   int    result;
00562 };
00563 
00564 //==================== CSC01   =========================//
00565 class CSC01 : public SimpleTest
00566 {
00567 public:
00568   CSC01(const std::string &name) : SimpleTest(name)
00569   { 
00570     setAlgoName(getAlgoName()); 
00571   }
00572   static std::string getAlgoName(void) { return "RuleCSC01"; }
00573 
00574   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00575   void set_S_fail(double S)            { S_fail = S; }
00576   void set_S_pass(double S)            { S_pass = S; }
00577   double get_epsilon_obs()             { return epsilon_obs; }
00578   double get_S_fail_obs()              { return S_fail_obs;  }
00579   double get_S_pass_obs()              { return S_pass_obs;  }
00580   int get_result()                     { return result; }
00581 
00582   float runTest(const MonitorElement*me);
00583 
00584 protected:
00585   double epsilon_max;
00586   double S_fail, S_pass;
00587   double epsilon_obs;
00588   double S_fail_obs, S_pass_obs;
00589   int result;
00590 };
00591 
00592 //======================== CompareToMedian ====================//
00593 class CompareToMedian : public SimpleTest
00594 {
00595 public:
00596   //Initialize for TProfile, colRings
00597   CompareToMedian(const std::string &name) : SimpleTest(name,true){
00598     this->_min = 0.2;
00599     this->_max = 3.0;
00600     this->_emptyBins = 0;
00601     this->_maxMed = 10;
00602     this->_minMed = 0;
00603     this->nBins = 0;
00604     this->_statCut = 0;
00605     reset();
00606     setAlgoName( getAlgoName() );
00607   };
00608 
00609   ~CompareToMedian(){};
00610 
00611   static std::string getAlgoName(void) { return "CompareToMedian"; }
00612 
00613   float runTest(const MonitorElement *me);
00614   void setMin(float min){_min = min;};
00615   void setMax(float max){_max = max;};
00616   void setEmptyBins(int eB){eB > 0 ? _emptyBins = 1 : _emptyBins = 0;};
00617   void setMaxMedian(float max){_maxMed = max;};
00618   void setMinMedian(float min){_minMed = min;};
00619   void setStatCut(float cut){_statCut = (cut > 0) ? cut : 0;};
00620 
00621 protected :
00622   void setMessage(void){
00623     std::ostringstream message;
00624     message << "Test " << qtname_ << " (" << algoName_
00625             << "): Entry fraction within range = " << prob_;
00626     message_ = message.str();
00627   }
00628 
00629 private :
00630   float _min, _max;      //Test values
00631   int _emptyBins;        //use empty bins
00632   float _maxMed,_minMed; //Global max for median&mean
00633   float _statCut;        //Minimal number of non zero entries needed for the quality test 
00634 
00635   int nBinsX, nBinsY; //Dimensions of hystogram
00636 
00637   int nBins; //Number of (non empty) bins
00638 
00639   //Vector contain bin values
00640   std::vector<float> binValues;
00641 
00642   void reset(){binValues.clear();};
00643 
00644 };
00645 //======================== CompareLastFilledBin ====================//
00646 class CompareLastFilledBin : public SimpleTest
00647 {
00648 public:
00649   //Initialize for TProfile, colRings
00650   CompareLastFilledBin(const std::string &name) : SimpleTest(name,true){
00651     this->_min = 0.0;
00652     this->_max = 1.0;
00653     this->_average = 0.0;
00654     setAlgoName( getAlgoName() );
00655   };
00656 
00657   ~CompareLastFilledBin(){};
00658 
00659   static std::string getAlgoName(void) { return "CompareLastFilledBin"; }
00660 
00661   float runTest(const MonitorElement *me);
00662   void setAverage(float average){_average = average;};
00663   void setMin(float min){_min = min;};
00664   void setMax(float max){_max = max;};
00665 
00666 
00667 protected :
00668   void setMessage(void){
00669     std::ostringstream message;
00670     message << "Test " << qtname_ << " (" << algoName_
00671             << "): Last Bin filled with desired value = " << prob_;
00672     message_ = message.str();
00673   }
00674 
00675 private :
00676   float _min, _max;      //Test values
00677   float _average;
00678 };
00679 
00680 //==================== AllContentAlongDiagonal   =========================//
00681 #if 0 // FIXME: need to know what parameters to set before runTest!
00682 class AllContentAlongDiagonal : public SimpleTest
00683 
00684 public:
00685   AllContentAlongDiagonal(const std::string &name) : SimpleTest(name)
00686   { 
00687     setAlgoName(getAlgoName()); 
00688   }
00689   static std::string getAlgoName(void) { return "RuleAllContentAlongDiagonal"; }
00690 
00691   void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00692   void set_S_fail(double S)            { S_fail = S; }
00693   void set_S_pass(double S)            { S_pass = S; } 
00694   double get_epsilon_obs()             { return epsilon_obs; }
00695   double get_S_fail_obs()              { return S_fail_obs;  }
00696   double get_S_pass_obs()              { return S_pass_obs;  }
00697   int get_result()                     { return result; }
00698 
00699   //public:
00700   //using SimpleTest::runTest;
00701   float runTest(const MonitorElement*me); 
00702 
00703 protected:
00704   double epsilon_max;
00705   double S_fail, S_pass;
00706   double epsilon_obs;
00707   double S_fail_obs, S_pass_obs;
00708   int result;
00709 };
00710 #endif
00711 
00712 #endif // DQMSERVICES_CORE_Q_CRITERION_H