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
00016 using namespace std;
00017
00018 class Comp2RefChi2; typedef Comp2RefChi2 Comp2RefChi2ROOT;
00019 class Comp2RefKolmogorov; typedef Comp2RefKolmogorov Comp2RefKolmogorovROOT;
00020
00021 class Comp2RefEqualH; typedef Comp2RefEqualH Comp2RefEqualHROOT;
00022
00023
00024
00025
00026 class ContentsXRange; typedef ContentsXRange ContentsXRangeROOT;
00027 class ContentsYRange; typedef ContentsYRange ContentsYRangeROOT;
00028 class NoisyChannel; typedef NoisyChannel NoisyChannelROOT;
00029 class DeadChannel; typedef DeadChannel DeadChannelROOT;
00030
00031 class ContentsWithinExpected; typedef ContentsWithinExpected ContentsWithinExpectedROOT;
00032
00033
00034
00035
00036 class MeanWithinExpected; typedef MeanWithinExpected MeanWithinExpectedROOT;
00037
00038
00039 class AllContentWithinFixedRange; typedef AllContentWithinFixedRange RuleAllContentWithinFixedRange; typedef AllContentWithinFixedRange AllContentWithinFixedRangeROOT;
00040 class AllContentWithinFloatingRange; typedef AllContentWithinFloatingRange RuleAllContentWithinFloatingRange; typedef AllContentWithinFloatingRange AllContentWithinFloatingRangeROOT;
00041
00042 class FlatOccupancy1d; typedef FlatOccupancy1d RuleFlatOccupancy1d; typedef FlatOccupancy1d FlatOccupancy1dROOT;
00043 class FixedFlatOccupancy1d; typedef FixedFlatOccupancy1d RuleFixedFlatOccupancy1d; typedef FixedFlatOccupancy1d FixedFlatOccupancy1dROOT;
00044 class CSC01; typedef CSC01 RuleCSC01; typedef CSC01 CSC01ROOT;
00045
00046 class AllContentAlongDiagonal; typedef AllContentAlongDiagonal RuleAllContentAlongDiagonal; typedef AllContentAlongDiagonal AllContentAlongDiagonalROOT;
00047
00060 class QCriterion
00061 {
00063
00064 public:
00065
00067 bool wasModified(void) const { return wasModified_; }
00069 int getStatus(void) const { return status_; }
00071 std::string getMessage(void) const { return message_; }
00073 std::string getName(void) const { return qtname_; }
00075 std::string algoName(void) const { return algoName_; }
00077 void setWarningProb(float prob) { if (validProb(prob)) warningProb_ = prob; }
00079 void setErrorProb(float prob) { if (validProb(prob)) errorProb_ = prob; }
00082 virtual std::vector<DQMChannel> getBadChannels(void) const
00083 { return std::vector<DQMChannel>(); }
00084
00085 protected:
00086 QCriterion(std::string qtname) { qtname_ = qtname; init(); }
00088 void init(void);
00089
00090 virtual ~QCriterion(void) {}
00091
00092 virtual float runTest(const MonitorElement *me);
00094 void setAlgoName(std::string name) { algoName_ = name; }
00095
00096 float runTest(const MonitorElement *me, QReport &qr, DQMNet::QValue &qv) {
00097 assert(qr.qcriterion_ == this);
00098 assert(qv.qtname == qtname_);
00099
00100 prob_ = runTest(me);
00101 if (! validProb(prob_)) setInvalid();
00102 else if (prob_ < errorProb_) status_ = dqm::qstatus::ERROR;
00103 else if (prob_ < warningProb_) status_ = dqm::qstatus::WARNING;
00104 else status_ = dqm::qstatus::STATUS_OK;
00105 setMessage();
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115 qv.code = status_;
00116 qv.message = message_;
00117 qv.qtname = qtname_;
00118 qv.algorithm = algoName_;
00119 qv.qtresult = prob_;
00120 qr.badChannels_ = getBadChannels();
00121
00122 return prob_;
00123 }
00124
00126 void update(void) { wasModified_ = true; }
00128 bool validProb(float prob) const { return prob >= 0 && prob <= 1; }
00130 void setDisabled(void);
00132 void setInvalid(void);
00134 virtual void setMessage(void) = 0;
00135
00136 bool enabled_;
00137 int status_;
00138 std::string message_;
00139 std::string qtname_;
00140 bool wasModified_;
00141 std::string algoName_;
00142 float warningProb_, errorProb_;
00143
00144
00145
00146
00147
00148 float prob_;
00149
00150 private:
00152 static const float WARNING_PROB_THRESHOLD;
00153 static const float ERROR_PROB_THRESHOLD;
00154
00156 friend class DQMStore;
00158 friend class MonitorElement;
00159 };
00160
00164
00165 class SimpleTest : public QCriterion
00166 {
00167 public:
00168 SimpleTest(const std::string &name, bool keepBadChannels = false) : QCriterion(name),
00169 minEntries_ (0),
00170 keepBadChannels_ (keepBadChannels)
00171 {}
00172
00174 void setMinimumEntries(unsigned n)
00175 { minEntries_ = n; this->update(); }
00176
00178 virtual std::vector<DQMChannel> getBadChannels(void) const
00179 { return keepBadChannels_ ? badChannels_ : QCriterion::getBadChannels(); }
00180
00181
00182 protected:
00183
00185
00186 virtual void setMessage(void) {
00187 std::ostringstream message;
00188 message << " Test " << this->qtname_ << " (" << this->algoName_
00189 << "): prob = " << this->prob_;
00190 this->message_ = message.str();
00191 }
00192
00193 unsigned minEntries_;
00194 std::vector<DQMChannel> badChannels_;
00195 bool keepBadChannels_;
00196 };
00197
00198
00199
00200
00201
00202
00203
00204
00205 class Comp2RefEqualH : public SimpleTest
00206 {
00207 public:
00208 Comp2RefEqualH(const std::string &name) : SimpleTest(name)
00209 { setAlgoName( getAlgoName() ); }
00210
00211 static std::string getAlgoName(void)
00212 { return "Comp2RefEqualH"; }
00213
00214 public:
00215
00216 float runTest(const MonitorElement*me);
00217
00218 protected:
00219 TH1*h ;
00220 TH1*ref_ ;
00222 Int_t ncx1; Int_t ncx2;
00223 };
00224
00225
00226
00227 class Comp2RefChi2 : public SimpleTest
00228 {
00229 public:
00230 Comp2RefChi2(const std::string &name) :SimpleTest(name)
00231 { setAlgoName(getAlgoName()); }
00232
00233 float runTest(const MonitorElement*me);
00234 static std::string getAlgoName(void)
00235 { return "Comp2RefChi2"; }
00236
00237 protected:
00238
00239 void setMessage(void) {
00240 std::ostringstream message;
00241 message << " Test " << qtname_ << " (" << algoName_
00242 << "): chi2/Ndof = " << chi2_ << "/" << Ndof_
00243 << " prob = " << prob_
00244 << ", minimum needed statistics = " << minEntries_
00245 << " warning threshold = " << this->warningProb_
00246 << " error threshold = " << this->errorProb_;
00247 message_ = message.str();
00248 }
00249
00250 TH1*h ;
00251 TH1*ref_ ;
00252
00253
00254 int Ndof_; float chi2_;
00255
00256 Int_t ncx1; Int_t ncx2;
00257 };
00258
00259
00261 class Comp2RefKolmogorov : public SimpleTest
00262 {
00263 public:
00264 Comp2RefKolmogorov(const std::string &name) : SimpleTest(name)
00265 { setAlgoName(getAlgoName()); }
00266
00267 float runTest(const MonitorElement *me);
00268
00269 static std::string getAlgoName(void)
00270 { return "Comp2RefKolmogorov"; }
00271
00272 protected:
00273
00274 TH1*h ;
00275 TH1*ref_ ;
00276
00278 Int_t ncx1; Int_t ncx2;
00279 static const Double_t difprec;
00280 };
00281
00282
00283
00284
00285
00286
00287
00288 class ContentsXRange : public SimpleTest
00289 {
00290 public:
00291 ContentsXRange(const std::string &name) : SimpleTest(name)
00292 {
00293 rangeInitialized_ = false;
00294 setAlgoName(getAlgoName());
00295 }
00296
00298 virtual void setAllowedXRange(float xmin, float xmax)
00299 { xmin_ = xmin; xmax_ = xmax; rangeInitialized_ = true; }
00300
00301 float runTest(const MonitorElement *me) ;
00302
00303 static std::string getAlgoName(void)
00304 { return "ContentsXRange"; }
00305
00306 protected:
00307 void setMessage(void) {
00308 std::ostringstream message;
00309 message << " Test " << qtname_ << " (" << algoName_
00310 << "): Entry fraction within X range = " << prob_;
00311 message_ = message.str();
00312 }
00313
00315 float xmin_;float xmax_;
00317 bool rangeInitialized_;
00318 };
00319
00320
00321
00322 class ContentsYRange : public SimpleTest
00323 {
00324 public:
00325 ContentsYRange(const std::string &name) : SimpleTest(name,true)
00326 {
00327 rangeInitialized_ = false;
00328 setAlgoName(getAlgoName());
00329 }
00330
00331 float runTest(const MonitorElement *me);
00332
00333 void setUseEmptyBins(unsigned int useEmptyBins) { useEmptyBins_ = useEmptyBins; }
00334
00335 static std::string getAlgoName(void)
00336 { return "ContentsYRange"; }
00337
00339 virtual void setAllowedYRange(float ymin, float ymax)
00340 { ymin_ = ymin; ymax_ = ymax; rangeInitialized_ = true; }
00341
00342
00343 protected:
00344
00345 void setMessage(void) {
00346 std::ostringstream message;
00347 message << " Test " << qtname_ << " (" << algoName_
00348 << "): Bin fraction within Y range = " << prob_;
00349 message_ = message.str();
00350 }
00351
00353 float ymin_; float ymax_;
00355 bool rangeInitialized_;
00356
00357 unsigned int useEmptyBins_;
00358
00359 };
00360
00361
00363 class DeadChannel : public SimpleTest
00364 {
00365 public:
00366 DeadChannel(const std::string &name) : SimpleTest(name,true)
00367 {
00368 rangeInitialized_ = false;
00369 setAlgoName(getAlgoName());
00370 }
00371
00372 float runTest(const MonitorElement *me);
00373
00374 static std::string getAlgoName(void)
00375 { return "DeadChannel"; }
00376
00378 void setThreshold(float ymin)
00379 { ymin_ = ymin; rangeInitialized_ = true; }
00380
00381
00382 protected:
00383 void setMessage(void) {
00384 std::ostringstream message;
00385 message << " Test " << qtname_ << " (" << algoName_
00386 << "): Alive channel fraction = " << prob_;
00387 message_ = message.str();
00388 }
00389 TH1*h1;
00390 TH2*h2;
00391 float ymin_;
00392 bool rangeInitialized_;
00393 };
00394
00395
00396
00398 class NoisyChannel : public SimpleTest
00399 {
00400 public:
00401 NoisyChannel(const std::string &name) : SimpleTest(name,true)
00402 {
00403 rangeInitialized_ = false;
00404 numNeighbors_ = 1;
00405 setAlgoName(getAlgoName());
00406 }
00407
00409 float runTest(const MonitorElement*me);
00410
00411 static std::string getAlgoName(void)
00412 { return "NoisyChannel"; }
00413
00421 void setNumNeighbors(unsigned n) { if (n > 0) numNeighbors_ = n; }
00422
00427 void setTolerance(float percentage)
00428 {
00429 if (percentage >=0)
00430 {
00431 tolerance_ = percentage;
00432 rangeInitialized_ = true;
00433 }
00434 }
00435
00436
00437 protected:
00438
00439 void setMessage(void) {
00440 std::ostringstream message;
00441 message << " Test " << qtname_ << " (" << algoName_
00442 << "): Fraction of non-noisy channels = " << prob_;
00443 message_ = message.str();
00444 }
00445
00446 TH1*h ;
00447
00450 Double_t getAverage(int bin, const TH1 *h) const;
00451
00452 float tolerance_;
00453 unsigned numNeighbors_;
00454
00455 bool rangeInitialized_;
00456 };
00457
00458
00459
00460
00461
00462
00463 class ContentsWithinExpected : public SimpleTest
00464 {
00465 public:
00466 ContentsWithinExpected(const std::string &name) : SimpleTest(name,true)
00467 {
00468 checkMean_ = checkRMS_ = validMethod_ = false;
00469 minMean_ = maxMean_ = minRMS_ = maxRMS_ = 0.0;
00470 checkMeanTolerance_ = false;
00471 toleranceMean_ = -1.0;
00472 setAlgoName(getAlgoName());
00473 }
00474
00475 float runTest(const MonitorElement *me);
00476
00477 void setUseEmptyBins(unsigned int useEmptyBins) { useEmptyBins_ = useEmptyBins; }
00478
00479
00480 static std::string getAlgoName(void)
00481 { return "ContentsWithinExpected"; }
00482
00484 void setMeanRange(float xmin, float xmax)
00485 {
00486 checkRange(xmin, xmax);
00487 minMean_ = xmin;
00488 maxMean_ = xmax;
00489 checkMean_ = true;
00490 }
00491
00493 void setRMSRange(float xmin, float xmax)
00494 {
00495 checkRange(xmin, xmax);
00496 minRMS_ = xmin;
00497 maxRMS_ = xmax;
00498 checkRMS_ = true;
00499 }
00500
00502 void setMeanTolerance(float fracTolerance)
00503 {
00504 if (fracTolerance >= 0.0)
00505 {
00506 toleranceMean_ = fracTolerance;
00507 checkMeanTolerance_ = true;
00508 }
00509 }
00510
00511
00512
00513 protected:
00514
00515
00516 TH1*h ;
00517
00518 void setMessage(void) {
00519 std::ostringstream message;
00520 message << " Test " << qtname_ << " (" << algoName_
00521 << "): Entry fraction within range = " << prob_;
00522 message_ = message.str();
00523 }
00524
00526 void checkRange(const float xmin, const float xmax);
00527
00528 bool checkMean_;
00529 bool checkRMS_;
00530 bool checkMeanTolerance_;
00531 float toleranceMean_;
00532 float minMean_, maxMean_;
00533 float minRMS_, maxRMS_;
00534 bool validMethod_;
00535
00536 unsigned int useEmptyBins_;
00537
00538 };
00539
00540
00542 class MeanWithinExpected : public SimpleTest
00543 {
00544 public:
00545 MeanWithinExpected(const std::string &name) : SimpleTest(name)
00546 {
00547 validMethod_ = validExpMean_ = false;
00548 setAlgoName(getAlgoName());
00549 }
00550
00551 static std::string getAlgoName(void)
00552 { return "MeanWithinExpected"; }
00553
00555 void setExpectedMean(float expMean)
00556 {
00557 expMean_ = expMean;
00558 validExpMean_ = true;
00559 }
00560
00561 void useRMS(void)
00562 {
00563 useRMS_ = true;
00564 useSigma_ = useRange_ = false;
00565 validMethod_ = true;
00566 }
00567
00568 void useSigma(float expectedSigma)
00569 {
00570 useSigma_ = true;
00571 useRMS_ = useRange_ = false;
00572 sigma_ = expectedSigma;
00573 checkSigma();
00574 }
00575
00576 void useRange(float xmin, float xmax)
00577 {
00578 useRange_ = true;
00579 useSigma_ = useRMS_ = false;
00580 xmin_ = xmin; xmax_ = xmax;
00581 checkRange();
00582 }
00583
00584
00585
00598 float runTest(const MonitorElement*me);
00599
00600 protected:
00601 bool isInvalid(void);
00602
00603 void setMessage(void) {
00604 std::ostringstream message;
00605 message << " Test " << qtname_ << " (" << algoName_ << "): ";
00606 if(useRange_)
00607 {
00608 message << "Mean within allowed range? ";
00609 if(prob_)
00610 message << "Yes";
00611 else
00612 message << "No";
00613 }
00614 else
00615 message << "prob = " << prob_;
00616
00617 message_ = message.str();
00618 }
00619
00621 void checkSigma(void);
00622
00624 void checkRange(void);
00625
00627 float doRangeTest(const TH1 *h);
00628
00630 float doGaussTest(const TH1 *h, float sigma);
00631
00632
00633 TH1F*h;
00634 bool useRMS_;
00635 bool useSigma_;
00636 bool useRange_;
00637 float sigma_;
00638 float expMean_;
00639 float xmin_, xmax_;
00640 bool validMethod_;
00641 bool validExpMean_;
00642
00643 };
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796 class AllContentWithinFixedRange : public SimpleTest
00797 {
00798 public:
00799 AllContentWithinFixedRange(const std::string &name) : SimpleTest(name)
00800 { setAlgoName(getAlgoName()); }
00801
00802 static std::string getAlgoName(void)
00803 { return "RuleAllContentWithinFixedRange"; }
00804
00805 void set_x_min(double x) { x_min = x; }
00806 void set_x_max(double x) { x_max = x; }
00807 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00808 void set_S_fail(double S) { S_fail = S; }
00809 void set_S_pass(double S) { S_pass = S; }
00810 double get_epsilon_obs(void) { return epsilon_obs; }
00811 double get_S_fail_obs(void) { return S_fail_obs; }
00812 double get_S_pass_obs(void) { return S_pass_obs; }
00813 int get_result(void) { return result; }
00814
00815 float runTest(const MonitorElement *me);
00816
00817 protected:
00818 TH1F *histogram ;
00819 double x_min, x_max;
00820 double epsilon_max;
00821 double S_fail, S_pass;
00822 double epsilon_obs;
00823 double S_fail_obs, S_pass_obs;
00824 int result;
00825 };
00826
00827
00828
00829 class AllContentWithinFloatingRange : public SimpleTest
00830 {
00831 public:
00832 AllContentWithinFloatingRange(const std::string &name) : SimpleTest(name)
00833 { setAlgoName(getAlgoName()); }
00834
00835 static std::string getAlgoName(void)
00836 { return "RuleAllContentWithinFloatingRange"; }
00837
00838 void set_Nrange(int N) { Nrange = N; }
00839 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00840 void set_S_fail(double S) { S_fail = S; }
00841 void set_S_pass(double S) { S_pass = S; }
00842 double get_epsilon_obs(void) { return epsilon_obs; }
00843 double get_S_fail_obs(void) { return S_fail_obs; }
00844 double get_S_pass_obs(void) { return S_pass_obs; }
00845 int get_result(void) { return result; }
00846
00847 float runTest(const MonitorElement *me );
00848
00849 protected:
00850 TH1F *histogram ;
00851 int Nrange;
00852 double epsilon_max;
00853 double S_fail, S_pass;
00854 double epsilon_obs;
00855 double S_fail_obs, S_pass_obs;
00856 int result;
00857 };
00858
00859
00860
00861
00862
00863 #if 0 // FIXME: need to know what parameters to set before runTest!
00864 class FlatOccupancy1d : public SimpleTest
00865 {
00866 public:
00867 FlatOccupancy1d(const std::string &name) : SimpleTest(name)
00868 {
00869 Nbins = 0;
00870 FailedBins[0] = 0;
00871 FailedBins[1] = 0;
00872 setAlgoName(getAlgoName());
00873 }
00874
00875 ~FlatOccupancy1d(void)
00876 {
00877 delete [] FailedBins[0];
00878 delete [] FailedBins[1];
00879 }
00880
00881 static std::string getAlgoName(void)
00882 { return "RuleFlatOccupancy1d"; }
00883
00884 void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
00885 void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
00886 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00887 void set_S_fail(double S) { S_fail = S; }
00888 void set_S_pass(double S) { S_pass = S; }
00889 double get_FailedBins(void) { return *FailedBins[2]; }
00890 int get_result() { return result; }
00891
00892 float runTest(const MonitorElement*me);
00893
00894 protected:
00895 TH1F *histogram;
00896 double *ExclusionMask;
00897 double epsilon_min, epsilon_max;
00898 double S_fail, S_pass;
00899 double *FailedBins[2];
00900 int Nbins;
00901 int result;
00902 };
00903 #endif
00904
00905
00906 class FixedFlatOccupancy1d : public SimpleTest
00907 {
00908 public:
00909 FixedFlatOccupancy1d(const std::string &name) : SimpleTest(name)
00910 {
00911 Nbins = 0;
00912 FailedBins[0] = 0;
00913 FailedBins[1] = 0;
00914 setAlgoName(getAlgoName());
00915 }
00916
00917 ~FixedFlatOccupancy1d(void)
00918 {
00919 if( Nbins > 0 )
00920 {
00921 delete [] FailedBins[0];
00922 delete [] FailedBins[1];
00923 }
00924 }
00925
00926 static std::string getAlgoName(void)
00927 { return "RuleFixedFlatOccupancy1d"; }
00928
00929 void set_Occupancy(double level) { b = level; }
00930 void set_ExclusionMask(double *mask) { ExclusionMask = mask; }
00931 void set_epsilon_min(double epsilon) { epsilon_min = epsilon; }
00932 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00933 void set_S_fail(double S) { S_fail = S; }
00934 void set_S_pass(double S) { S_pass = S; }
00935 double get_FailedBins(void) { return *FailedBins[2]; }
00936 int get_result() { return result; }
00937
00938 float runTest(const MonitorElement*me);
00939
00940 protected:
00941 TH1F *histogram;
00942 double b;
00943 double *ExclusionMask;
00944 double epsilon_min, epsilon_max;
00945 double S_fail, S_pass;
00946 double *FailedBins[2];
00947 int Nbins;
00948 int result;
00949 };
00950
00951
00952 class CSC01 : public SimpleTest
00953 {
00954 public:
00955 CSC01(const std::string &name) : SimpleTest(name)
00956 { setAlgoName(getAlgoName()); }
00957
00958 static std::string getAlgoName(void)
00959 { return "RuleCSC01"; }
00960
00961 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00962 void set_S_fail(double S) { S_fail = S; }
00963 void set_S_pass(double S) { S_pass = S; }
00964 double get_epsilon_obs() { return epsilon_obs; }
00965 double get_S_fail_obs() { return S_fail_obs; }
00966 double get_S_pass_obs() { return S_pass_obs; }
00967 int get_result() { return result; }
00968
00969 float runTest(const MonitorElement*me);
00970
00971 protected:
00972 TH1F *histogram;
00973 double epsilon_max;
00974 double S_fail, S_pass;
00975 double epsilon_obs;
00976 double S_fail_obs, S_pass_obs;
00977 int result;
00978 };
00979
00980
00981 #if 0 // FIXME: need to know what parameters to set before runTest!
00982 class AllContentAlongDiagonal : public SimpleTest
00983
00984 public:
00985 AllContentAlongDiagonal(const std::string &name) : SimpleTest(name)
00986 { setAlgoName(getAlgoName()); }
00987
00988 static std::string getAlgoName(void)
00989 { return "RuleAllContentAlongDiagonal"; }
00990
00991 void set_epsilon_max(double epsilon) { epsilon_max = epsilon; }
00992 void set_S_fail(double S) { S_fail = S; }
00993 void set_S_pass(double S) { S_pass = S; }
00994 double get_epsilon_obs() { return epsilon_obs; }
00995 double get_S_fail_obs() { return S_fail_obs; }
00996 double get_S_pass_obs() { return S_pass_obs; }
00997 int get_result() { return result; }
00998
00999
01000
01001 float runTest(const MonitorElement*me);
01002
01003 protected:
01004 TH2F *histogram;
01005 double epsilon_max;
01006 double S_fail, S_pass;
01007 double epsilon_obs;
01008 double S_fail_obs, S_pass_obs;
01009 int result;
01010 };
01011 #endif
01012
01013
01014
01015 #endif // DQMSERVICES_CORE_Q_CRITERION_H