CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
QTestConfigure Class Reference

#include <QTestConfigure.h>

Public Member Functions

void disableTests (const std::vector< std::string > &testsOFFList, DQMStore *bei)
 Disables the Quality Tests in the string list. More...
 
bool enableTests (const std::map< std::string, std::map< std::string, std::string > > &tests, DQMStore *bei)
 Creates and defines quality tests. More...
 
 QTestConfigure ()
 Constructor. More...
 
std::vector< std::string > testsReady ()
 Returns the vector containing the names of the quality tests that have been created. More...
 
 ~QTestConfigure ()
 Destructor. More...
 

Private Member Functions

void EnableCheckVarianceTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates CheckVariance test. More...
 
void EnableComp2Ref2DChi2Test (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates Comp2Ref2DChi2 test. More...
 
void EnableComp2RefChi2Test (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates Comp2RefChi2 test. More...
 
void EnableComp2RefEqualHTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates Comp2RefEqualH test. More...
 
void EnableComp2RefKolmogorovTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates EnableComp2RefKolmogorov test. More...
 
void EnableCompareLastFilledBinTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates EnableCompareLastFilledBinTest test. More...
 
void EnableCompareToMedianTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentsWithinRangeROOT test. More...
 
void EnableContentSigmaTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentSigmaROOT test. More...
 
void EnableContentsWithinExpectedTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentsWithinRangeROOT test. More...
 
void EnableDeadChannelTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentsYRangeASROOT test. More...
 
void EnableMeanWithinExpectedTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates MeanWithinExpectedROOT test. More...
 
void EnableNoisyChannelTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates NoisyChannelROOT test. More...
 
void EnableXRangeTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentsXRangeROOT test. More...
 
void EnableYRangeTest (std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
 Creates ContentsXRangeASROOT test. More...
 
const char * findOrDefault (const std::map< std::string, std::string > &, const char *, const char *) const
 

Private Attributes

std::vector< std::string > testsConfigured
 

Detailed Description

Definition at line 20 of file QTestConfigure.h.

Constructor & Destructor Documentation

QTestConfigure::QTestConfigure ( )
inline

Constructor.

Definition at line 25 of file QTestConfigure.h.

25 {}
QTestConfigure::~QTestConfigure ( )
inline

Member Function Documentation

void QTestConfigure::disableTests ( const std::vector< std::string > &  testsOFFList,
DQMStore bei 
)

Disables the Quality Tests in the string list.

Referenced by ~QTestConfigure().

void QTestConfigure::EnableCheckVarianceTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates CheckVariance test.

Definition at line 425 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), CheckVariance::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

427  {
428  QCriterion * qc1;
429  if(! bei->getQCriterion(testName) ){
430  testsConfigured.push_back(testName);
431  qc1 = bei->createQTest(CheckVariance::getAlgoName(),testName);
432  }else{
433  qc1 = bei->getQCriterion(testName);
434 
435  }
436  CheckVariance * me_qc1 = (CheckVariance *) qc1;
437 
438  double warning = atof(findOrDefault(params, "warning", "0"));
439  double error = atof(findOrDefault(params, "error", "0"));
440  me_qc1->setWarningProb(warning);
441  me_qc1->setErrorProb(error);
442 }
void setErrorProb(float prob)
Definition: QTest.h:65
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
static std::string getAlgoName()
get algorithm name
Definition: QTest.h:845
void QTestConfigure::EnableComp2Ref2DChi2Test ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates Comp2Ref2DChi2 test.

Definition at line 105 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), Comp2Ref2DChi2::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), SimpleTest::setMinimumEntries(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

107  {
108  QCriterion * qc1;
109  if (! bei->getQCriterion(testName)) {
110  testsConfigured.push_back(testName);
111  qc1 = bei->createQTest(Comp2Ref2DChi2::getAlgoName(), testName);
112  } else {
113  qc1 = bei->getQCriterion(testName);
114  }
115  Comp2Ref2DChi2 * me_qc1 = (Comp2Ref2DChi2 *) qc1;
116  double warning = atof(findOrDefault(params, "warning", "0"));
117  double error = atof(findOrDefault(params, "error", "0"));
118  int minEntries = atoi(findOrDefault(params, "minEntries", "0"));
119  me_qc1->setWarningProb(warning);
120  me_qc1->setErrorProb(error);
121  if ( minEntries != 0 )
122  me_qc1->setMinimumEntries(minEntries);
123 }
void setErrorProb(float prob)
Definition: QTest.h:65
static std::string getAlgoName()
Definition: QTest.h:221
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:146
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void QTestConfigure::EnableComp2RefChi2Test ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates Comp2RefChi2 test.

Definition at line 88 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), Comp2RefChi2::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

90  {
91  QCriterion * qc1;
92  if (! bei->getQCriterion(testName)) {
93  testsConfigured.push_back(testName);
94  qc1 = bei->createQTest(Comp2RefChi2::getAlgoName(), testName);
95  } else {
96  qc1 = bei->getQCriterion(testName);
97  }
98  Comp2RefChi2 * me_qc1 = (Comp2RefChi2 *) qc1;
99  double warning = atof(findOrDefault(params, "warning", "0"));
100  double error = atof(findOrDefault(params, "error", "0"));
101  me_qc1->setWarningProb(warning);
102  me_qc1->setErrorProb(error);
103 }
void setErrorProb(float prob)
Definition: QTest.h:65
static std::string getAlgoName()
Definition: QTest.h:193
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void QTestConfigure::EnableComp2RefEqualHTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates Comp2RefEqualH test.

Definition at line 71 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), Comp2RefEqualH::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

73  {
74  QCriterion * qc1;
75  if (! bei->getQCriterion(testName)) {
76  testsConfigured.push_back(testName);
77  qc1 = bei->createQTest(Comp2RefEqualH::getAlgoName(), testName);
78  } else {
79  qc1 = bei->getQCriterion(testName);
80  }
81  Comp2RefEqualH * me_qc1 = (Comp2RefEqualH *) qc1;
82  double warning = atof(findOrDefault(params, "warning", "0"));
83  double error = atof(findOrDefault(params, "error", "0"));
84  me_qc1->setWarningProb(warning);
85  me_qc1->setErrorProb(error);
86 }
void setErrorProb(float prob)
Definition: QTest.h:65
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
static std::string getAlgoName()
Definition: QTest.h:180
void QTestConfigure::EnableComp2RefKolmogorovTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates EnableComp2RefKolmogorov test.

Definition at line 125 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), Comp2RefKolmogorov::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

127  {
128  QCriterion * qc1;
129  if (! bei->getQCriterion(testName)) {
130  testsConfigured.push_back(testName);
131  qc1 = bei->createQTest(Comp2RefKolmogorov::getAlgoName(), testName);
132  } else {
133  qc1 = bei->getQCriterion(testName);
134  }
135  Comp2RefKolmogorov * me_qc1 = (Comp2RefKolmogorov *) qc1;
136  double warning = atof(findOrDefault(params, "warning", "0"));
137  double error = atof(findOrDefault(params, "error", "0"));
138  me_qc1->setWarningProb(warning);
139  me_qc1->setErrorProb(error);
140 }
void setErrorProb(float prob)
Definition: QTest.h:65
static std::string getAlgoName()
Definition: QTest.h:249
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
Comparison to reference using the Kolmogorov algorithm.
Definition: QTest.h:242
void QTestConfigure::EnableCompareLastFilledBinTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates EnableCompareLastFilledBinTest test.

Definition at line 402 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), CompareLastFilledBin::getAlgoName(), DQMStore::getQCriterion(), CompareLastFilledBin::setAverage(), QCriterion::setErrorProb(), CompareLastFilledBin::setMax(), CompareLastFilledBin::setMin(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

404  {
405  QCriterion * qc1;
406  if (! bei->getQCriterion(testName)) {
407  testsConfigured.push_back(testName);
408  qc1 = bei->createQTest(CompareLastFilledBin::getAlgoName(), testName);
409  } else {
410  qc1 = bei->getQCriterion(testName);
411  }
412  CompareLastFilledBin * me_qc1 = (CompareLastFilledBin *) qc1;
413 
414  double warning = atof(findOrDefault(params, "warning", "0"));
415  double error = atof(findOrDefault(params, "error", "0"));
416  double avVal = atof(findOrDefault(params, "AvVal", "0"));
417  double minVal = atof(findOrDefault(params, "MinVal", "0"));
418  double maxVal = atof(findOrDefault(params, "MaxVal", "0"));
419  me_qc1->setWarningProb(warning);
420  me_qc1->setErrorProb(error);
421  me_qc1->setAverage(avVal);
422  me_qc1->setMin(minVal);
423  me_qc1->setMax(maxVal);
424 }
void setErrorProb(float prob)
Definition: QTest.h:65
void setMin(float min)
Definition: QTest.h:787
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void setMax(float max)
Definition: QTest.h:788
void setAverage(float average)
Definition: QTest.h:786
static std::string getAlgoName()
Definition: QTest.h:783
void QTestConfigure::EnableCompareToMedianTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentsWithinRangeROOT test.

Creates CompareToMedian test

Definition at line 314 of file QTestConfigure.cc.

References DQMStore::createQTest(), findOrDefault(), CompareToMedian::getAlgoName(), DQMStore::getQCriterion(), CompareToMedian::setEmptyBins(), QCriterion::setErrorProb(), CompareToMedian::setMax(), CompareToMedian::setMaxMedian(), CompareToMedian::setMin(), CompareToMedian::setMinMedian(), CompareToMedian::setStatCut(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

316  {
317  QCriterion *qc1;
318  if (! bei->getQCriterion(testName)) {
319  testsConfigured.push_back(testName);
320  qc1 = bei->createQTest(CompareToMedian::getAlgoName(), testName);
321  } else {
322  qc1 = bei->getQCriterion(testName);
323  }
324  CompareToMedian* vtm = (CompareToMedian*) qc1;
325  vtm->setMin( (double) atof(findOrDefault(params, "MinRel", "0")));
326  vtm->setMax( (double) atof(findOrDefault(params, "MaxRel", "0")));
327  vtm->setEmptyBins( (int) atoi(findOrDefault(params, "UseEmptyBins", "0")));
328  vtm->setMinMedian( (double) atof(findOrDefault(params, "MinAbs", "0")));
329  vtm->setMaxMedian( (double) atof(findOrDefault(params, "MaxAbs", "0")));
330  vtm->setWarningProb( (double) atof(findOrDefault(params, "warning", "0")));
331  vtm->setErrorProb( (double) atof(findOrDefault(params, "error", "0")));
332  vtm->setStatCut( (double) atof(findOrDefault(params, "StatCut", "0")));
333 }
void setErrorProb(float prob)
Definition: QTest.h:65
void setStatCut(float cut)
Definition: QTest.h:743
void setMin(float min)
Definition: QTest.h:738
void setMax(float max)
Definition: QTest.h:739
static std::string getAlgoName()
Definition: QTest.h:735
void setEmptyBins(int eB)
Definition: QTest.h:740
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
void setMaxMedian(float max)
Definition: QTest.h:741
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void setMinMedian(float min)
Definition: QTest.h:742
void QTestConfigure::EnableContentSigmaTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentSigmaROOT test.

Definition at line 225 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), ContentSigma::getAlgoName(), DQMStore::getQCriterion(), createfilelist::int, ContentSigma::setDead(), QCriterion::setErrorProb(), ContentSigma::setNoisy(), ContentSigma::setNumNeighborsX(), ContentSigma::setNumNeighborsY(), ContentSigma::setNumXblocks(), ContentSigma::setNumYblocks(), ContentSigma::setToleranceDead(), ContentSigma::setToleranceNoisy(), QCriterion::setWarningProb(), ContentSigma::setXMax(), ContentSigma::setXMin(), ContentSigma::setYMax(), ContentSigma::setYMin(), testsConfigured, anotherprimaryvertexanalyzer_cfi::xMax, anotherprimaryvertexanalyzer_cfi::xMin, CMSBoostedTauSeedingParameters_cfi::yMax, and CMSBoostedTauSeedingParameters_cfi::yMin.

Referenced by enableTests(), and testsReady().

227  {
228  QCriterion * qc1;
229  if (! bei->getQCriterion(testName)) {
230  testsConfigured.push_back(testName);
231  qc1 = bei->createQTest(ContentSigma::getAlgoName(), testName);
232  } else {
233  qc1 = bei->getQCriterion(testName);
234  }
235  ContentSigma * me_qc1 = (ContentSigma *) qc1;
236  unsigned int Xblocks = (unsigned int) atof(findOrDefault(params, "Xblocks", "0"));
237  unsigned int Yblocks = (unsigned int) atof(findOrDefault(params, "Yblocks", "0"));
238  unsigned int neighborsX = (unsigned int) atof(findOrDefault(params, "neighboursX", "0"));
239  unsigned int neighborsY = (unsigned int) atof(findOrDefault(params, "neighboursY", "0"));
240  double toleranceNoisy = atof(findOrDefault(params, "toleranceNoisy", "0"));
241  double toleranceDead = atof(findOrDefault(params, "toleranceDead", "0"));
242  int noisy = atoi(findOrDefault(params, "noisy", "0"));
243  int dead = atoi(findOrDefault(params, "dead", "0"));
244  unsigned int xMin = (unsigned int) atof(findOrDefault(params, "xMin", "1"));
245  unsigned int xMax = (unsigned int) atof(findOrDefault(params, "xMax", "500"));
246  unsigned int yMin = (unsigned int) atof(findOrDefault(params, "yMin", "1"));
247  unsigned int yMax = (unsigned int) atof(findOrDefault(params, "yMax", "500"));
248  double warning = atof(findOrDefault(params, "warning", "0"));
249  double error = atof(findOrDefault(params, "error", "0"));
250  me_qc1->setNumXblocks (Xblocks);
251  me_qc1->setNumYblocks (Yblocks);
252  me_qc1->setNumNeighborsX (neighborsX);
253  me_qc1->setNumNeighborsY (neighborsY);
254  me_qc1->setToleranceNoisy (toleranceNoisy);
255  me_qc1->setToleranceDead (toleranceDead);
256  me_qc1->setNoisy (noisy);
257  me_qc1->setDead (dead);
258  me_qc1->setXMin (xMin);
259  me_qc1->setXMax (xMax);
260  me_qc1->setYMin (yMin);
261  me_qc1->setYMax (yMax);
262  me_qc1->setWarningProb(warning);
263  me_qc1->setErrorProb(error);
264 }
void setErrorProb(float prob)
Definition: QTest.h:65
void setDead(bool dead)
Definition: QTest.h:431
void setXMax(unsigned xMax)
Definition: QTest.h:438
void setYMax(unsigned yMax)
Definition: QTest.h:444
void setYMin(unsigned yMin)
Definition: QTest.h:441
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
void setNumNeighborsX(unsigned ncx)
Definition: QTest.h:406
void setToleranceNoisy(float factorNoisy)
Definition: QTest.h:412
Check the sigma of each bin against the rest of the chamber by a factor of tolerance/.
Definition: QTest.h:382
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setNumYblocks(unsigned ncy)
Definition: QTest.h:405
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void setNoisy(bool noisy)
Definition: QTest.h:428
void setNumNeighborsY(unsigned ncy)
Definition: QTest.h:407
void setXMin(unsigned xMin)
Definition: QTest.h:435
static std::string getAlgoName()
Definition: QTest.h:394
void setNumXblocks(unsigned ncx)
Definition: QTest.h:404
void setToleranceDead(float factorDead)
Definition: QTest.h:420
void QTestConfigure::EnableContentsWithinExpectedTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentsWithinRangeROOT test.

Definition at line 365 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), ContentsWithinExpected::getAlgoName(), DQMStore::getQCriterion(), createfilelist::int, QCriterion::setErrorProb(), ContentsWithinExpected::setMeanRange(), ContentsWithinExpected::setMeanTolerance(), SimpleTest::setMinimumEntries(), ContentsWithinExpected::setRMSRange(), ContentsWithinExpected::setUseEmptyBins(), QCriterion::setWarningProb(), and testsConfigured.

Referenced by enableTests(), and testsReady().

367  {
368  QCriterion * qc1;
369  if (! bei->getQCriterion(testName)) {
370  testsConfigured.push_back(testName);
371  qc1 = bei->createQTest(ContentsWithinExpected::getAlgoName(), testName);
372  } else {
373  qc1 = bei->getQCriterion(testName);
374  }
376  unsigned int useEmptyBins = (unsigned int) atof(findOrDefault(params, "useEmptyBins", "0"));
377  double warning = atof(findOrDefault(params, "warning", "0"));
378  double error = atof(findOrDefault(params, "error", "0"));
379  double minMean = atof(findOrDefault(params, "minMean", "0"));
380  double maxMean = atof(findOrDefault(params, "maxMean", "0"));
381  double minRMS = atof(findOrDefault(params, "minRMS", "0"));
382  double maxRMS = atof(findOrDefault(params, "maxRMS", "0"));
383  double toleranceMean = atof(findOrDefault(params, "toleranceMean", "0"));
384  int minEntries = atoi(findOrDefault(params, "minEntries", "0"));
385  me_qc1->setUseEmptyBins(useEmptyBins);
386  me_qc1->setWarningProb(warning);
387  me_qc1->setErrorProb(error);
388 
389  if ( minMean != 0 || maxMean != 0 )
390  me_qc1->setMeanRange(minMean, maxMean);
391 
392  if ( minRMS != 0 || maxRMS != 0 )
393  me_qc1->setRMSRange(minRMS, maxRMS);
394 
395  if ( toleranceMean != 0 )
396  me_qc1->setMeanTolerance(toleranceMean);
397 
398  if ( minEntries != 0 )
399  me_qc1->setMinimumEntries(minEntries);
400 }
void setErrorProb(float prob)
Definition: QTest.h:65
void setRMSRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1711
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:146
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:487
static std::string getAlgoName()
Definition: QTest.h:484
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void setMeanRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1699
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Definition: QTest.h:494
void QTestConfigure::EnableDeadChannelTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentsYRangeASROOT test.

Creates DeadChannelROOT test

Definition at line 184 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), DeadChannel::getAlgoName(), DQMStore::getQCriterion(), createfilelist::int, QCriterion::setErrorProb(), DeadChannel::setThreshold(), QCriterion::setWarningProb(), testsConfigured, and electronIdCutBased_cfi::threshold.

Referenced by enableTests(), and testsReady().

186  {
187  QCriterion * qc1;
188  if (! bei->getQCriterion(testName)) {
189  testsConfigured.push_back(testName);
190  qc1 = bei->createQTest(DeadChannel::getAlgoName(), testName);
191  } else {
192  qc1 = bei->getQCriterion(testName);
193  }
194  DeadChannel * me_qc1 = ( DeadChannel *) qc1;
195  unsigned int threshold =(unsigned int) atof(findOrDefault(params, "threshold", "0"));
196  double warning = atof(findOrDefault(params, "warning", "0"));
197  double error = atof(findOrDefault(params, "error", "0"));
198  me_qc1->setThreshold(threshold);
199  me_qc1->setWarningProb(warning);
200  me_qc1->setErrorProb(error);
201 }
void setErrorProb(float prob)
Definition: QTest.h:65
test that histogram contents are above Ymin
Definition: QTest.h:308
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
static std::string getAlgoName()
Definition: QTest.h:316
void setThreshold(double ymin)
set Ymin (inclusive) threshold for "dead" channel (default: 0)
Definition: QTest.h:320
void QTestConfigure::EnableMeanWithinExpectedTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates MeanWithinExpectedROOT test.

Definition at line 268 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), MeanWithinExpected::getAlgoName(), DQMStore::getQCriterion(), SiStripPI::mean, QCriterion::setErrorProb(), MeanWithinExpected::setExpectedMean(), SimpleTest::setMinimumEntries(), QCriterion::setWarningProb(), testsConfigured, MeanWithinExpected::useRange(), MeanWithinExpected::useRMS(), MeanWithinExpected::useSigma(), TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

Referenced by enableTests(), and testsReady().

270  {
271  QCriterion * qc1;
272  if (! bei->getQCriterion(testName)) {
273  testsConfigured.push_back(testName);
274  qc1 = bei->createQTest(MeanWithinExpected::getAlgoName(), testName);
275  } else {
276  qc1 = bei->getQCriterion(testName);
277  }
278  MeanWithinExpected * me_qc1 = (MeanWithinExpected *) qc1;
279  double warning = atof(findOrDefault(params, "warning", "0"));
280  double error = atof(findOrDefault(params, "error", "0"));
281  double mean = atof(findOrDefault(params, "mean", "0"));
282  int minEntries = atoi(findOrDefault(params, "minEntries", "0"));
283  double useRMSVal = atof(findOrDefault(params, "useRMS", "0"));
284  double useSigmaVal = atof(findOrDefault(params, "useSigma", "0"));
285  double useRangeVal = atof(findOrDefault(params, "useRange", "0"));
286  me_qc1->setWarningProb(warning);
287  me_qc1->setErrorProb(error);
288  me_qc1->setExpectedMean(mean);
289 
290  if (minEntries != 0)
291  me_qc1->setMinimumEntries(minEntries);
292 
293  if (useRMSVal && useSigmaVal && useRangeVal)
294  return;
295 
296  if (useRMSVal) {
297  me_qc1->useRMS();
298  return;
299  }
300 
301  if (useSigmaVal) {
302  me_qc1->useSigma(useSigmaVal);
303  return;
304  }
305 
306  if(useRangeVal) {
307  float xmin = atof(findOrDefault(params, "xmin", "0"));
308  float xmax = atof(findOrDefault(params, "xmax", "0"));
309  me_qc1->useRange(xmin,xmax);
310  return;
311  }
312 }
void setErrorProb(float prob)
Definition: QTest.h:65
void useSigma(double expectedSigma)
Definition: QTest.cc:1824
Algorithm for testing if histogram&#39;s mean value is near expected value.
Definition: QTest.h:516
static std::string getAlgoName()
Definition: QTest.h:523
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:146
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
void setExpectedMean(double mean)
Definition: QTest.h:526
void useRange(double xmin, double xmax)
Definition: QTest.cc:1814
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void QTestConfigure::EnableNoisyChannelTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates NoisyChannelROOT test.

Definition at line 203 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), NoisyChannel::getAlgoName(), DQMStore::getQCriterion(), createfilelist::int, QCriterion::setErrorProb(), NoisyChannel::setNumNeighbors(), NoisyChannel::setTolerance(), QCriterion::setWarningProb(), testsConfigured, and tolerance.

Referenced by enableTests(), and testsReady().

205  {
206  QCriterion * qc1;
207  if (! bei->getQCriterion(testName)) {
208  testsConfigured.push_back(testName);
209  qc1 = bei->createQTest(NoisyChannel::getAlgoName(), testName);
210  } else {
211  qc1 = bei->getQCriterion(testName);
212  }
213  NoisyChannel * me_qc1 = (NoisyChannel *) qc1;
214  unsigned int neighbors = (unsigned int) atof(findOrDefault(params, "neighbours", "0"));
215  double tolerance = atof(findOrDefault(params, "tolerance", "0"));
216  double warning = atof(findOrDefault(params, "warning", "0"));
217  double error = atof(findOrDefault(params, "error", "0"));
218  me_qc1->setNumNeighbors (neighbors);
219  me_qc1->setTolerance (tolerance);
220  me_qc1->setWarningProb(warning);
221  me_qc1->setErrorProb(error);
222 }
void setErrorProb(float prob)
Definition: QTest.h:65
const double tolerance
void setNumNeighbors(unsigned n)
Definition: QTest.h:353
Check if any channels are noisy compared to neighboring ones.
Definition: QTest.h:334
std::vector< std::string > testsConfigured
void setTolerance(float percentage)
Definition: QTest.h:359
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
static std::string getAlgoName()
Definition: QTest.h:343
bool QTestConfigure::enableTests ( const std::map< std::string, std::map< std::string, std::string > > &  tests,
DQMStore bei 
)

Creates and defines quality tests.

Definition at line 28 of file QTestConfigure.cc.

References EnableCheckVarianceTest(), EnableComp2Ref2DChi2Test(), EnableComp2RefChi2Test(), EnableComp2RefEqualHTest(), EnableComp2RefKolmogorovTest(), EnableCompareLastFilledBinTest(), EnableCompareToMedianTest(), EnableContentSigmaTest(), EnableContentsWithinExpectedTest(), EnableDeadChannelTest(), EnableMeanWithinExpectedTest(), EnableNoisyChannelTest(), EnableXRangeTest(), EnableYRangeTest(), Comp2RefEqualH::getAlgoName(), Comp2RefChi2::getAlgoName(), Comp2Ref2DChi2::getAlgoName(), Comp2RefKolmogorov::getAlgoName(), ContentsXRange::getAlgoName(), ContentsYRange::getAlgoName(), DeadChannel::getAlgoName(), NoisyChannel::getAlgoName(), ContentSigma::getAlgoName(), ContentsWithinExpected::getAlgoName(), MeanWithinExpected::getAlgoName(), CompareToMedian::getAlgoName(), CompareLastFilledBin::getAlgoName(), CheckVariance::getAlgoName(), AlCaHLTBitMon_QueryRunRegistry::string, utils_v2::tests, and testsConfigured.

Referenced by QTestHandle::configureTests(), and ~QTestConfigure().

30  {
31  testsConfigured.clear();
32  std::map<std::string, std::map<std::string, std::string> >::const_iterator itr;
33  for (itr = tests.begin(); itr!= tests.end();++itr) {
34  const std::map<std::string, std::string> &params= itr->second;
35 
36  std::string testName = itr->first;
37  std::string testType = params.at("type");
38 
39  if(!std::strcmp(testType.c_str(),ContentsXRange::getAlgoName().c_str()))
40  this->EnableXRangeTest(testName, params,bei);
41  if(!std::strcmp(testType.c_str(),ContentsYRange::getAlgoName().c_str()))
42  this->EnableYRangeTest(testName, params,bei);
43  if(!std::strcmp(testType.c_str(),DeadChannel::getAlgoName().c_str()))
44  this->EnableDeadChannelTest(testName, params,bei);
45  if(!std::strcmp(testType.c_str(),NoisyChannel::getAlgoName().c_str()))
46  this->EnableNoisyChannelTest(testName, params,bei);
47  if(!std::strcmp(testType.c_str(),ContentSigma::getAlgoName().c_str()))
48  this->EnableContentSigmaTest(testName, params,bei);
49  if(!std::strcmp(testType.c_str(),MeanWithinExpected::getAlgoName().c_str()))
50  this->EnableMeanWithinExpectedTest(testName, params,bei);
51  if(!std::strcmp(testType.c_str(),Comp2RefEqualH::getAlgoName().c_str()))
52  this->EnableComp2RefEqualHTest(testName, params,bei);
53  if(!std::strcmp(testType.c_str(), Comp2RefChi2::getAlgoName().c_str()))
54  this->EnableComp2RefChi2Test(testName, params,bei);
55  if(!std::strcmp(testType.c_str(), Comp2Ref2DChi2::getAlgoName().c_str()))
56  this->EnableComp2Ref2DChi2Test(testName, params,bei);
57  if(!std::strcmp(testType.c_str(),Comp2RefKolmogorov::getAlgoName().c_str()))
58  this->EnableComp2RefKolmogorovTest(testName, params,bei);
59  if(!std::strcmp(testType.c_str(),ContentsWithinExpected::getAlgoName().c_str()))
60  this->EnableContentsWithinExpectedTest(testName, params, bei);
61  if(!std::strcmp(testType.c_str(),CompareToMedian::getAlgoName().c_str()))
62  this->EnableCompareToMedianTest(testName, params, bei);
63  if(!std::strcmp(testType.c_str(),CompareLastFilledBin::getAlgoName().c_str()))
64  this->EnableCompareLastFilledBinTest(testName, params, bei);
65  if(!std::strcmp(testType.c_str(),CheckVariance::getAlgoName().c_str()))
66  this->EnableCheckVarianceTest(testName, params, bei);
67  }
68  return false;
69 }
static std::string getAlgoName()
Definition: QTest.h:193
void EnableContentSigmaTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentSigmaROOT test.
void EnableNoisyChannelTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates NoisyChannelROOT test.
void EnableYRangeTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentsXRangeASROOT test.
void EnableComp2Ref2DChi2Test(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates Comp2Ref2DChi2 test.
void EnableCompareToMedianTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentsWithinRangeROOT test.
static std::string getAlgoName()
Definition: QTest.h:249
void EnableCheckVarianceTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates CheckVariance test.
static std::string getAlgoName()
Definition: QTest.h:221
static std::string getAlgoName()
Definition: QTest.h:735
static std::string getAlgoName()
Definition: QTest.h:523
void EnableComp2RefEqualHTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates Comp2RefEqualH test.
std::vector< std::string > testsConfigured
void EnableXRangeTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentsXRangeROOT test.
void EnableMeanWithinExpectedTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates MeanWithinExpectedROOT test.
static std::string getAlgoName()
Definition: QTest.h:264
static std::string getAlgoName()
Definition: QTest.h:484
static std::string getAlgoName()
Definition: QTest.h:316
static std::string getAlgoName()
get algorithm name
Definition: QTest.h:845
void EnableDeadChannelTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentsYRangeASROOT test.
void EnableComp2RefKolmogorovTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates EnableComp2RefKolmogorov test.
static std::string getAlgoName()
Definition: QTest.h:394
static std::string getAlgoName()
Definition: QTest.h:180
void EnableContentsWithinExpectedTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates ContentsWithinRangeROOT test.
void EnableCompareLastFilledBinTest(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates EnableCompareLastFilledBinTest test.
static std::string getAlgoName()
Definition: QTest.h:343
static std::string getAlgoName()
Definition: QTest.h:289
void EnableComp2RefChi2Test(std::string testName, const std::map< std::string, std::string > &params, DQMStore *bei)
Creates Comp2RefChi2 test.
static std::string getAlgoName()
Definition: QTest.h:783
void QTestConfigure::EnableXRangeTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentsXRangeROOT test.

Definition at line 142 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), ContentsXRange::getAlgoName(), DQMStore::getQCriterion(), ContentsXRange::setAllowedXRange(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), testsConfigured, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

Referenced by enableTests(), and testsReady().

144  {
145  QCriterion * qc1;
146  if (! bei->getQCriterion(testName)) {
147  testsConfigured.push_back(testName);
148  qc1 = bei->createQTest(ContentsXRange::getAlgoName(),testName);
149  } else {
150  qc1 = bei->getQCriterion(testName);
151  }
152  ContentsXRange * me_qc1 = (ContentsXRange *) qc1;
153  double xmin = atof(findOrDefault(params, "xmin", "0"));
154  double xmax = atof(findOrDefault(params, "xmax", "0"));
155  double warning = atof(findOrDefault(params, "warning", "0"));
156  double error = atof(findOrDefault(params, "error", "0"));
157  me_qc1->setAllowedXRange(xmin, xmax);
158  me_qc1->setWarningProb(warning);
159  me_qc1->setErrorProb(error);
160 }
void setErrorProb(float prob)
Definition: QTest.h:65
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram&#39;s X-range)
Definition: QTest.h:268
std::vector< std::string > testsConfigured
static std::string getAlgoName()
Definition: QTest.h:264
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
void QTestConfigure::EnableYRangeTest ( std::string  testName,
const std::map< std::string, std::string > &  params,
DQMStore bei 
)
private

Creates ContentsXRangeASROOT test.

Creates ContentsYRangeROOT test

Definition at line 162 of file QTestConfigure.cc.

References DQMStore::createQTest(), relativeConstraints::error, findOrDefault(), ContentsYRange::getAlgoName(), DQMStore::getQCriterion(), createfilelist::int, ContentsYRange::setAllowedYRange(), QCriterion::setErrorProb(), ContentsYRange::setUseEmptyBins(), QCriterion::setWarningProb(), testsConfigured, Phase2TrackerMonitorDigi_cff::ymax, and Phase2TrackerMonitorDigi_cff::ymin.

Referenced by enableTests(), and testsReady().

164  {
165  QCriterion * qc1;
166  if (! bei->getQCriterion(testName)) {
167  testsConfigured.push_back(testName);
168  qc1 = bei->createQTest(ContentsYRange::getAlgoName(), testName);
169  } else {
170  qc1 = bei->getQCriterion(testName);
171  }
172  ContentsYRange * me_qc1 = (ContentsYRange *) qc1;
173  double ymin = atof(findOrDefault(params, "ymin", "0"));
174  double ymax = atof(findOrDefault(params, "ymax", "0"));
175  double warning = atof(findOrDefault(params, "warning", "0"));
176  double error = atof(findOrDefault(params, "error", "0"));
177  unsigned int useEmptyBins = (unsigned int)atof(findOrDefault(params, "useEmptyBins", "0"));
178  me_qc1->setAllowedYRange(ymin, ymax);
179  me_qc1->setWarningProb(warning);
180  me_qc1->setErrorProb(error);
181  me_qc1->setUseEmptyBins(useEmptyBins);
182 }
void setErrorProb(float prob)
Definition: QTest.h:65
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:292
std::vector< std::string > testsConfigured
const char * findOrDefault(const std::map< std::string, std::string > &, const char *, const char *) const
QCriterion * getQCriterion(std::string const &qtname) const
Definition: DQMStore.cc:3152
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
Definition: DQMStore.cc:3163
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:64
virtual void setAllowedYRange(double ymin, double ymax)
Definition: QTest.h:293
static std::string getAlgoName()
Definition: QTest.h:289
const char * QTestConfigure::findOrDefault ( const std::map< std::string, std::string > &  m,
const char *  item,
const char *  default_value 
) const
private

Definition at line 15 of file QTestConfigure.cc.

References LogDebug, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EnableCheckVarianceTest(), EnableComp2Ref2DChi2Test(), EnableComp2RefChi2Test(), EnableComp2RefEqualHTest(), EnableComp2RefKolmogorovTest(), EnableCompareLastFilledBinTest(), EnableCompareToMedianTest(), EnableContentSigmaTest(), EnableContentsWithinExpectedTest(), EnableDeadChannelTest(), EnableMeanWithinExpectedTest(), EnableNoisyChannelTest(), EnableXRangeTest(), EnableYRangeTest(), and testsReady().

17  {
18  std::map<std::string, std::string>::const_iterator iter;
19  if (( iter = m.find(std::string(item))) != m.end()) {
20  return (*iter).second.c_str();
21  }
22  LogDebug("QTestConfigure") << "Warning, using default value for parameter "
23  << item << " with default_value: "
24  << default_value << std::endl;
25  return default_value;
26 }
#define LogDebug(id)
std::vector<std::string> QTestConfigure::testsReady ( )
inline

Member Data Documentation

std::vector<std::string> QTestConfigure::testsConfigured
private