CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
QTestConfigure Class Reference

#include <QTestConfigure.h>

Public Member Functions

void disableTests (std::vector< std::string > testsOFFList, DQMStore *bei)
 Disables the Quality Tests in the string list. More...
 
bool enableTests (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 EnableComp2RefChi2Test (std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
 Creates Comp2RefChi2 test. More...
 
void EnableComp2RefEqualHTest (std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
 Creates Comp2RefEqualH test. More...
 
void EnableComp2RefKolmogorovTest (std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
 Creates EnableComp2RefKolmogorov test. More...
 
void EnableCompareLastFilledBinTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates EnableCompareLastFilledBinTest test. More...
 
void EnableCompareToMedianTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates ContentsWithinRangeROOT test. More...
 
void EnableContentsWithinExpectedTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates ContentsWithinRangeROOT test. More...
 
void EnableDeadChannelTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates ContentsYRangeASROOT test. More...
 
void EnableMeanWithinExpectedTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates MeanWithinExpectedROOT test. More...
 
void EnableNoisyChannelTest (std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
 Creates NoisyChannelROOT test. More...
 
void EnableXRangeTest (std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
 Creates ContentsXRangeROOT test. More...
 
void EnableYRangeTest (std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
 Creates ContentsXRangeASROOT test. More...
 

Private Attributes

std::vector< std::string > testsConfigured
 

Detailed Description

Definition at line 22 of file QTestConfigure.h.

Constructor & Destructor Documentation

QTestConfigure::QTestConfigure ( )
inline

Constructor.

Definition at line 27 of file QTestConfigure.h.

27 {}
QTestConfigure::~QTestConfigure ( )
inline

Destructor.

Definition at line 29 of file QTestConfigure.h.

29 {}

Member Function Documentation

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

Disables the Quality Tests in the string list.

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

Creates Comp2RefChi2 test.

Definition at line 75 of file QTestConfigure.cc.

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

Referenced by enableTests().

75  {
76  QCriterion * qc1;
77  if(! bei->getQCriterion(testName) ){
78  testsConfigured.push_back(testName);
79  qc1 = bei->createQTest(Comp2RefChi2::getAlgoName(),testName);
80  }else{
81  qc1 = bei->getQCriterion(testName);
82 
83  }
84  Comp2RefChi2 * me_qc1 = (Comp2RefChi2 *) qc1;
85 
86  double warning=atof(params["warning"].c_str());
87  double error=atof(params["error"].c_str());
88  me_qc1->setWarningProb(warning);
89  me_qc1->setErrorProb(error);
90 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
std::vector< std::string > testsConfigured
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
static std::string getAlgoName(void)
Definition: QTest.h:189
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void QTestConfigure::EnableComp2RefEqualHTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates Comp2RefEqualH test.

Definition at line 56 of file QTestConfigure.cc.

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

Referenced by enableTests().

56  {
57  QCriterion * qc1;
58  if(! bei->getQCriterion(testName) ){
59  testsConfigured.push_back(testName);
60  qc1 = bei->createQTest(Comp2RefEqualH::getAlgoName(),testName);
61  }else{
62  qc1 = bei->getQCriterion(testName);
63 
64  }
65  Comp2RefEqualH * me_qc1 = (Comp2RefEqualH *) qc1;
66 
67  double warning=atof(params["warning"].c_str());
68  double error=atof(params["error"].c_str());
69  me_qc1->setWarningProb(warning);
70  me_qc1->setErrorProb(error);
71 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
std::vector< std::string > testsConfigured
static std::string getAlgoName(void)
Definition: QTest.h:176
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void QTestConfigure::EnableComp2RefKolmogorovTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates EnableComp2RefKolmogorov test.

Definition at line 93 of file QTestConfigure.cc.

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

Referenced by enableTests().

93  {
94  QCriterion * qc1;
95  if(! bei->getQCriterion(testName) ){
96  testsConfigured.push_back(testName);
97  qc1 = bei->createQTest(Comp2RefKolmogorov::getAlgoName(),testName);
98  }else{
99  qc1 = bei->getQCriterion(testName);
100 
101  }
102  Comp2RefKolmogorov * me_qc1 = (Comp2RefKolmogorov *) qc1;
103 
104  double warning=atof(params["warning"].c_str());
105  double error=atof(params["error"].c_str());
106  me_qc1->setWarningProb(warning);
107  me_qc1->setErrorProb(error);
108 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
std::vector< std::string > testsConfigured
static std::string getAlgoName(void)
Definition: QTest.h:217
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
Comparison to reference using the Kolmogorov algorithm.
Definition: QTest.h:210
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void QTestConfigure::EnableCompareLastFilledBinTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates EnableCompareLastFilledBinTest test.

Definition at line 335 of file QTestConfigure.cc.

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

Referenced by enableTests().

335  {
336 
337  QCriterion * qc1;
338  if(! bei->getQCriterion(testName) ){
339  testsConfigured.push_back(testName);
340  qc1 = bei->createQTest(CompareLastFilledBin::getAlgoName(),testName);
341  }else{
342  qc1 = bei->getQCriterion(testName);
343  }
344  CompareLastFilledBin * me_qc1 = (CompareLastFilledBin *) qc1;
345 
346  double warning=atof(params["warning"].c_str());
347  double error=atof(params["error"].c_str());
348  me_qc1->setWarningProb(warning);
349  me_qc1->setErrorProb(error);
350 
351  double avVal=atof(params["AvVal"].c_str());
352  me_qc1->setAverage(avVal);
353 
354  double minVal=atof(params["MinVal"].c_str());
355  me_qc1->setMin(minVal);
356 
357  double maxVal=atof(params["MaxVal"].c_str());
358  me_qc1->setMax(maxVal);
359 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
void setMin(float min)
Definition: QTest.h:663
std::vector< std::string > testsConfigured
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
void setMax(float max)
Definition: QTest.h:664
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void setAverage(float average)
Definition: QTest.h:662
static std::string getAlgoName(void)
Definition: QTest.h:659
void QTestConfigure::EnableCompareToMedianTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsWithinRangeROOT test.

Creates CompareToMedian test

Definition at line 250 of file QTestConfigure.cc.

References DQMStore::createQTest(), 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().

251 {
252  QCriterion *qc1;
253  if(! bei->getQCriterion(testName)) {
254  testsConfigured.push_back(testName);
255  qc1 = bei->createQTest(CompareToMedian::getAlgoName(),testName);
256  } else {
257  qc1 = bei->getQCriterion(testName);
258  }
259  CompareToMedian* vtm = (CompareToMedian*) qc1;
260  vtm->setMin((double)atof(params["MinRel"].c_str()));
261  vtm->setMax((double)atof(params["MaxRel"].c_str()));
262  vtm->setEmptyBins((int)atoi(params["UseEmptyBins"].c_str()));
263  vtm->setMinMedian((double)atof(params["MinAbs"].c_str()));
264  vtm->setMaxMedian((double)atof(params["MaxAbs"].c_str()));
265  vtm->setWarningProb((double)atof(params["warning"].c_str()));
266  vtm->setErrorProb((double)atof(params["error"].c_str()));
267  vtm->setStatCut((double)atof(params["StatCut"].c_str()));
268 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
void setStatCut(float cut)
Definition: QTest.h:619
void setMin(float min)
Definition: QTest.h:614
void setMax(float max)
Definition: QTest.h:615
static std::string getAlgoName(void)
Definition: QTest.h:611
void setEmptyBins(int eB)
Definition: QTest.h:616
std::vector< std::string > testsConfigured
void setMaxMedian(float max)
Definition: QTest.h:617
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void setMinMedian(float min)
Definition: QTest.h:618
void QTestConfigure::EnableContentsWithinExpectedTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsWithinRangeROOT test.

Definition at line 300 of file QTestConfigure.cc.

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

Referenced by enableTests().

300  {
301 
302  QCriterion * qc1;
303  if(! bei->getQCriterion(testName) ){
304  testsConfigured.push_back(testName);
305  qc1 = bei->createQTest(ContentsWithinExpected::getAlgoName(),testName);
306  }else{
307  qc1 = bei->getQCriterion(testName);
308  }
310 
311 
312  //do a Normal test or AS ?
313  unsigned int useEmptyBins=(unsigned int)atof(params["useEmptyBins"].c_str());
314  me_qc1->setUseEmptyBins(useEmptyBins);
315 
316  double warning=atof(params["warning"].c_str());
317  double error=atof(params["error"].c_str());
318  me_qc1->setWarningProb(warning);
319  me_qc1->setErrorProb(error);
320 
321  double minMean=atof(params["minMean"].c_str());
322  double maxMean=atof(params["maxMean"].c_str());
323  if ( minMean != 0 || maxMean != 0 ) me_qc1->setMeanRange(minMean, maxMean);
324 
325  double minRMS=atof(params["minRMS"].c_str());
326  double maxRMS=atof(params["maxRMS"].c_str());
327  if ( minRMS != 0 || maxRMS != 0 ) me_qc1->setRMSRange(minRMS, maxRMS);
328 
329  double toleranceMean=atof(params["toleranceMean"].c_str());
330  if ( toleranceMean != 0 ) me_qc1->setMeanTolerance(toleranceMean);
331 
332  int minEntries=atoi(params["minEntries"].c_str());
333  if ( minEntries != 0 ) me_qc1->setMinimumEntries(minEntries);
334 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
static std::string getAlgoName(void)
Definition: QTest.h:360
void setRMSRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1123
std::vector< std::string > testsConfigured
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:142
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:363
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
void setMeanRange(double xmin, double xmax)
set expected value for mean
Definition: QTest.cc:1111
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Definition: QTest.h:370
void QTestConfigure::EnableDeadChannelTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsYRangeASROOT test.

Creates DeadChannelROOT test

Definition at line 157 of file QTestConfigure.cc.

References DQMStore::createQTest(), error, DeadChannel::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), DeadChannel::setThreshold(), QCriterion::setWarningProb(), testsConfigured, dtDQMClient_cfg::threshold, and warning.

Referenced by enableTests().

157  {
158  QCriterion * qc1;
159  if(! bei->getQCriterion(testName) ){
160  testsConfigured.push_back(testName);
161  qc1 = bei->createQTest(DeadChannel::getAlgoName(),testName);
162  }else{
163  qc1 = bei->getQCriterion(testName);
164 
165  }
166  DeadChannel * me_qc1 = ( DeadChannel *) qc1;
167 
168  unsigned int threshold=(unsigned int)atof(params["threshold"].c_str());
169  me_qc1->setThreshold(threshold);
170 
171  // Include/Exclude empty bins ?
172  //unsigned int useEmptyBins=(unsigned int)atof(params["useEmptyBins"].c_str());
173  //me_qc1->setUseEmptyBins(useEmptyBins);
174 
175  double warning=atof(params["warning"].c_str());
176  double error=atof(params["error"].c_str());
177  me_qc1->setWarningProb(warning);
178  me_qc1->setErrorProb(error);
179 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
test that histogram contents are above Ymin
Definition: QTest.h:276
static std::string getAlgoName(void)
Definition: QTest.h:284
std::vector< std::string > testsConfigured
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void setThreshold(double ymin)
set Ymin (inclusive) threshold for &quot;dead&quot; channel (default: 0)
Definition: QTest.h:288
void QTestConfigure::EnableMeanWithinExpectedTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates MeanWithinExpectedROOT test.

Definition at line 203 of file QTestConfigure.cc.

References DQMStore::createQTest(), error, MeanWithinExpected::getAlgoName(), DQMStore::getQCriterion(), timingPdfMaker::mean, QCriterion::setErrorProb(), MeanWithinExpected::setExpectedMean(), SimpleTest::setMinimumEntries(), QCriterion::setWarningProb(), testsConfigured, MeanWithinExpected::useRange(), MeanWithinExpected::useRMS(), MeanWithinExpected::useSigma(), and warning.

Referenced by enableTests().

203  {
204 
205  QCriterion * qc1;
206  if(! bei->getQCriterion(testName) ){
207  testsConfigured.push_back(testName);
208  qc1 = bei->createQTest(MeanWithinExpected::getAlgoName(),testName);
209  }else{
210  qc1 = bei->getQCriterion(testName);
211  }
212  MeanWithinExpected * me_qc1 = (MeanWithinExpected *) qc1;
213 
214  double warning=atof(params["warning"].c_str());
215  double error=atof(params["error"].c_str());
216  me_qc1->setWarningProb(warning);
217  me_qc1->setErrorProb(error);
218 
219  double mean=atof(params["mean"].c_str());
220  me_qc1->setExpectedMean(mean);
221 
222  int minEntries=atoi(params["minEntries"].c_str());
223  if ( minEntries != 0 ) me_qc1->setMinimumEntries(minEntries);
224 
225  double useRMSVal=atof(params["useRMS"].c_str());
226  double useSigmaVal=atof(params["useSigma"].c_str());
227  double useRangeVal=atof(params["useRange"].c_str());
228  if( useRMSVal&&useSigmaVal&&useRangeVal){
229  return;
230  }
231 
232  if(useRMSVal) {
233  me_qc1->useRMS();
234  return;
235  }
236  if(useSigmaVal) {
237  me_qc1->useSigma(useSigmaVal);
238  return;
239  }
240  if(useRangeVal) {
241  float xmin=atof(params["xmin"].c_str());
242  float xmax=atof(params["xmax"].c_str());
243  me_qc1->useRange(xmin,xmax);
244  return;
245  }
246 
247 
248 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
void useRMS(void)
Definition: QTest.cc:1247
void useSigma(double expectedSigma)
Definition: QTest.cc:1236
Algorithm for testing if histogram&#39;s mean value is near expected value.
Definition: QTest.h:392
std::vector< std::string > testsConfigured
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:142
void setExpectedMean(double mean)
Definition: QTest.h:402
void useRange(double xmin, double xmax)
Definition: QTest.cc:1226
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
static std::string getAlgoName(void)
Definition: QTest.h:399
void QTestConfigure::EnableNoisyChannelTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates NoisyChannelROOT test.

Definition at line 181 of file QTestConfigure.cc.

References DQMStore::createQTest(), error, NoisyChannel::getAlgoName(), DQMStore::getQCriterion(), QCriterion::setErrorProb(), NoisyChannel::setNumNeighbors(), NoisyChannel::setTolerance(), QCriterion::setWarningProb(), testsConfigured, and warning.

Referenced by enableTests().

181  {
182 
183  QCriterion * qc1;
184  if(! bei->getQCriterion(testName) ){
185  testsConfigured.push_back(testName);
186  qc1 = bei->createQTest(NoisyChannel::getAlgoName(),testName);
187  }else{
188  qc1 = bei->getQCriterion(testName);
189  }
190  NoisyChannel * me_qc1 = ( NoisyChannel *) qc1;
191 
192  unsigned int neighbors=(unsigned int)atof(params["neighbours"].c_str());
193  double tolerance=atof(params["tolerance"].c_str());
194  me_qc1->setNumNeighbors (neighbors);
195  me_qc1->setTolerance (tolerance);
196 
197  double warning=atof(params["warning"].c_str());
198  double error=atof(params["error"].c_str());
199  me_qc1->setWarningProb(warning);
200  me_qc1->setErrorProb(error);
201 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
static std::string getAlgoName(void)
Definition: QTest.h:311
void setNumNeighbors(unsigned n)
Definition: QTest.h:321
Check if any channels are noisy compared to neighboring ones.
Definition: QTest.h:302
std::vector< std::string > testsConfigured
void setTolerance(float percentage)
Definition: QTest.h:327
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
bool QTestConfigure::enableTests ( std::map< std::string, std::map< std::string, std::string > >  tests,
DQMStore bei 
)

Creates and defines quality tests.

Definition at line 15 of file QTestConfigure.cc.

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

Referenced by QTestHandle::configureTests().

15  {
16 
17  testsConfigured.clear();
18 
19  std::map<std::string, std::map<std::string, std::string> >::iterator itr;
20  for(itr= tests.begin(); itr!= tests.end();++itr){
21 
22  std::map<std::string, std::string> params= itr->second;
23 
24  std::string testName = itr->first;
25  std::string testType = params["type"];
26 
27  if(!std::strcmp(testType.c_str(),ContentsXRange::getAlgoName().c_str())) this->EnableXRangeTest(testName, params,bei);
28  if(!std::strcmp(testType.c_str(),ContentsYRange::getAlgoName().c_str())) this->EnableYRangeTest(testName, params,bei);
29  if(!std::strcmp(testType.c_str(),DeadChannel::getAlgoName().c_str())) this->EnableDeadChannelTest(testName, params,bei);
30  if(!std::strcmp(testType.c_str(),NoisyChannel::getAlgoName().c_str())) this->EnableNoisyChannelTest(testName, params,bei);
31  if(!std::strcmp(testType.c_str(),MeanWithinExpected::getAlgoName().c_str())) this->EnableMeanWithinExpectedTest(testName, params,bei);
32 
33  //================================== new qtests in the parser =============================================================//
34  if(!std::strcmp(testType.c_str(),Comp2RefEqualH::getAlgoName().c_str())) this->EnableComp2RefEqualHTest(testName, params,bei);
35  if(!std::strcmp(testType.c_str(), Comp2RefChi2::getAlgoName().c_str())) this->EnableComp2RefChi2Test(testName, params,bei);
36  if(!std::strcmp(testType.c_str(),Comp2RefKolmogorov::getAlgoName().c_str())) this->EnableComp2RefKolmogorovTest(testName, params,bei);
37 
38 
39 /*
40  if(!std::strcmp(testType.c_str(),MostProbableLandau::getAlgoName().c_str())) this->EnableMostProbableLandauTest(testName, params, bei);
41 */
42 
43  if(!std::strcmp(testType.c_str(),ContentsWithinExpected::getAlgoName().c_str())) this->EnableContentsWithinExpectedTest(testName, params, bei);
44 // if(!std::strcmp(testType.c_str(),ContentsWithinExpectedAS::getAlgoName().c_str())) this->EnableContentsWithinExpectedASTest(testName, params, bei);
45 
46  if(!std::strcmp(testType.c_str(),CompareToMedian::getAlgoName().c_str())) this->EnableCompareToMedianTest(testName, params, bei);
47  if(!std::strcmp(testType.c_str(),CompareLastFilledBin::getAlgoName().c_str())) this->EnableCompareLastFilledBinTest(testName, params, bei);
48 
49  }
50 
51  return false;
52 }
void EnableComp2RefKolmogorovTest(std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
Creates EnableComp2RefKolmogorov test.
static std::string getAlgoName(void)
Definition: QTest.h:311
dictionary tests
Definition: utils_v2.py:385
static std::string getAlgoName(void)
Definition: QTest.h:360
static std::string getAlgoName(void)
Definition: QTest.h:232
void EnableNoisyChannelTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates NoisyChannelROOT test.
static std::string getAlgoName(void)
Definition: QTest.h:284
static std::string getAlgoName(void)
Definition: QTest.h:611
void EnableDeadChannelTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates ContentsYRangeASROOT test.
void EnableComp2RefEqualHTest(std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
Creates Comp2RefEqualH test.
void EnableCompareToMedianTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates ContentsWithinRangeROOT test.
std::vector< std::string > testsConfigured
static std::string getAlgoName(void)
Definition: QTest.h:217
static std::string getAlgoName(void)
Definition: QTest.h:257
void EnableCompareLastFilledBinTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates EnableCompareLastFilledBinTest test.
void EnableComp2RefChi2Test(std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
Creates Comp2RefChi2 test.
static std::string getAlgoName(void)
Definition: QTest.h:176
void EnableYRangeTest(std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
Creates ContentsXRangeASROOT test.
static std::string getAlgoName(void)
Definition: QTest.h:189
void EnableMeanWithinExpectedTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates MeanWithinExpectedROOT test.
void EnableXRangeTest(std::string testName, std::map< std::string, std::string >params, DQMStore *bei)
Creates ContentsXRangeROOT test.
static std::string getAlgoName(void)
Definition: QTest.h:659
void EnableContentsWithinExpectedTest(std::string testName, std::map< std::string, std::string > params, DQMStore *bei)
Creates ContentsWithinRangeROOT test.
static std::string getAlgoName(void)
Definition: QTest.h:399
void QTestConfigure::EnableXRangeTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsXRangeROOT test.

Definition at line 110 of file QTestConfigure.cc.

References DQMStore::createQTest(), error, ContentsXRange::getAlgoName(), DQMStore::getQCriterion(), ContentsXRange::setAllowedXRange(), QCriterion::setErrorProb(), QCriterion::setWarningProb(), testsConfigured, and warning.

Referenced by enableTests().

110  {
111  QCriterion * qc1;
112  if(! bei->getQCriterion(testName) ){
113  testsConfigured.push_back(testName);
114  qc1 = bei->createQTest(ContentsXRange::getAlgoName(),testName);
115  }else{
116  qc1 = bei->getQCriterion(testName);
117 
118  }
119  ContentsXRange * me_qc1 = (ContentsXRange *) qc1;
120 
121  double xmin=atof(params["xmin"].c_str());
122  double xmax=atof(params["xmax"].c_str());
123 
124  me_qc1->setAllowedXRange(xmin,xmax);
125 
126  double warning=atof(params["warning"].c_str());
127  double error=atof(params["error"].c_str());
128  me_qc1->setWarningProb(warning);
129  me_qc1->setErrorProb(error);
130 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram&#39;s X-range)
Definition: QTest.h:236
static std::string getAlgoName(void)
Definition: QTest.h:232
std::vector< std::string > testsConfigured
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
void QTestConfigure::EnableYRangeTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsXRangeASROOT test.

Creates ContentsYRangeROOT test

Definition at line 133 of file QTestConfigure.cc.

References DQMStore::createQTest(), error, ContentsYRange::getAlgoName(), DQMStore::getQCriterion(), ContentsYRange::setAllowedYRange(), QCriterion::setErrorProb(), ContentsYRange::setUseEmptyBins(), QCriterion::setWarningProb(), testsConfigured, and warning.

Referenced by enableTests().

133  {
134  QCriterion * qc1;
135  if(! bei->getQCriterion(testName) ){
136  testsConfigured.push_back(testName);
137  qc1 = bei->createQTest(ContentsYRange::getAlgoName(),testName);
138  }else{
139  qc1 = bei->getQCriterion(testName);
140  }
141  ContentsYRange * me_qc1 = (ContentsYRange *) qc1;
142 
143  double ymin=atof(params["ymin"].c_str());
144  double ymax=atof(params["ymax"].c_str());
145  me_qc1->setAllowedYRange(ymin,ymax);
146 
147  //do a Normal test or AS ?
148  unsigned int useEmptyBins=(unsigned int)atof(params["useEmptyBins"].c_str());
149  me_qc1->setUseEmptyBins(useEmptyBins);
150 
151  double warning=atof(params["warning"].c_str());
152  double error=atof(params["error"].c_str());
153  me_qc1->setWarningProb(warning);
154  me_qc1->setErrorProb(error);
155 }
void setErrorProb(float prob)
Definition: QTest.h:61
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2597
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:260
std::vector< std::string > testsConfigured
static std::string getAlgoName(void)
Definition: QTest.h:257
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:60
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2608
virtual void setAllowedYRange(double ymin, double ymax)
Definition: QTest.h:261
std::vector<std::string> QTestConfigure::testsReady ( )
inline

Returns the vector containing the names of the quality tests that have been created.

Definition at line 35 of file QTestConfigure.h.

References testsConfigured.

35 {return testsConfigured;}
std::vector< std::string > testsConfigured

Member Data Documentation

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