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 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 74 of file QTestConfigure.cc.

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

Referenced by enableTests().

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

Creates Comp2RefEqualH test.

Definition at line 55 of file QTestConfigure.cc.

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

Referenced by enableTests().

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

Creates EnableComp2RefKolmogorov test.

Definition at line 92 of file QTestConfigure.cc.

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

Referenced by enableTests().

92  {
93  QCriterion * qc1;
94  if(! bei->getQCriterion(testName) ){
95  testsConfigured.push_back(testName);
96  qc1 = bei->createQTest(Comp2RefKolmogorov::getAlgoName(),testName);
97  }else{
98  qc1 = bei->getQCriterion(testName);
99 
100  }
101  Comp2RefKolmogorov * me_qc1 = (Comp2RefKolmogorov *) qc1;
102 
103  double warning=atof(params["warning"].c_str());
104  double error=atof(params["error"].c_str());
105  me_qc1->setWarningProb(warning);
106  me_qc1->setErrorProb(error);
107 }
void setErrorProb(float prob)
Definition: QTest.h:60
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2378
std::vector< std::string > testsConfigured
static std::string getAlgoName(void)
Definition: QTest.h:216
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:59
Comparison to reference using the Kolmogorov algorithm.
Definition: QTest.h:209
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2389
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 249 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().

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

Creates ContentsWithinRangeROOT test.

Definition at line 299 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().

299  {
300 
301  QCriterion * qc1;
302  if(! bei->getQCriterion(testName) ){
303  testsConfigured.push_back(testName);
304  qc1 = bei->createQTest(ContentsWithinExpected::getAlgoName(),testName);
305  }else{
306  qc1 = bei->getQCriterion(testName);
307  }
309 
310 
311  //do a Normal test or AS ?
312  unsigned int useEmptyBins=(unsigned int)atof(params["useEmptyBins"].c_str());
313  me_qc1->setUseEmptyBins(useEmptyBins);
314 
315  double warning=atof(params["warning"].c_str());
316  double error=atof(params["error"].c_str());
317  me_qc1->setWarningProb(warning);
318  me_qc1->setErrorProb(error);
319 
320  double minMean=atof(params["minMean"].c_str());
321  double maxMean=atof(params["maxMean"].c_str());
322  if ( minMean != 0 || maxMean != 0 ) me_qc1->setMeanRange(minMean, maxMean);
323 
324  double minRMS=atof(params["minRMS"].c_str());
325  double maxRMS=atof(params["maxRMS"].c_str());
326  if ( minRMS != 0 || maxRMS != 0 ) me_qc1->setRMSRange(minRMS, maxRMS);
327 
328  double toleranceMean=atof(params["toleranceMean"].c_str());
329  if ( toleranceMean != 0 ) me_qc1->setMeanTolerance(toleranceMean);
330 
331  int minEntries=atoi(params["minEntries"].c_str());
332  if ( minEntries != 0 ) me_qc1->setMinimumEntries(minEntries);
333 }
void setErrorProb(float prob)
Definition: QTest.h:60
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2378
static std::string getAlgoName(void)
Definition: QTest.h:359
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:141
void setUseEmptyBins(unsigned int useEmptyBins)
Definition: QTest.h:362
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:59
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:2389
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
Definition: QTest.h:369
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 156 of file QTestConfigure.cc.

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

Referenced by enableTests().

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

Creates MeanWithinExpectedROOT test.

Definition at line 202 of file QTestConfigure.cc.

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

Referenced by enableTests().

202  {
203 
204  QCriterion * qc1;
205  if(! bei->getQCriterion(testName) ){
206  testsConfigured.push_back(testName);
207  qc1 = bei->createQTest(MeanWithinExpected::getAlgoName(),testName);
208  }else{
209  qc1 = bei->getQCriterion(testName);
210  }
211  MeanWithinExpected * me_qc1 = (MeanWithinExpected *) qc1;
212 
213  double warning=atof(params["warning"].c_str());
214  double error=atof(params["error"].c_str());
215  me_qc1->setWarningProb(warning);
216  me_qc1->setErrorProb(error);
217 
218  double mean=atof(params["mean"].c_str());
219  me_qc1->setExpectedMean(mean);
220 
221  int minEntries=atoi(params["minEntries"].c_str());
222  if ( minEntries != 0 ) me_qc1->setMinimumEntries(minEntries);
223 
224  double useRMSVal=atof(params["useRMS"].c_str());
225  double useSigmaVal=atof(params["useSigma"].c_str());
226  double useRangeVal=atof(params["useRange"].c_str());
227  if( useRMSVal&&useSigmaVal&&useRangeVal){
228  return;
229  }
230 
231  if(useRMSVal) {
232  me_qc1->useRMS();
233  return;
234  }
235  if(useSigmaVal) {
236  me_qc1->useSigma(useSigmaVal);
237  return;
238  }
239  if(useRangeVal) {
240  float xmin=atof(params["xmin"].c_str());
241  float xmax=atof(params["xmax"].c_str());
242  me_qc1->useRange(xmin,xmax);
243  return;
244  }
245 
246 
247 }
void setErrorProb(float prob)
Definition: QTest.h:60
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2378
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:391
std::vector< std::string > testsConfigured
void setMinimumEntries(unsigned n)
set minimum # of entries needed
Definition: QTest.h:141
void setExpectedMean(double mean)
Definition: QTest.h:401
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:59
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2389
static std::string getAlgoName(void)
Definition: QTest.h:398
void QTestConfigure::EnableNoisyChannelTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates NoisyChannelROOT test.

Definition at line 180 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().

180  {
181 
182  QCriterion * qc1;
183  if(! bei->getQCriterion(testName) ){
184  testsConfigured.push_back(testName);
185  qc1 = bei->createQTest(NoisyChannel::getAlgoName(),testName);
186  }else{
187  qc1 = bei->getQCriterion(testName);
188  }
189  NoisyChannel * me_qc1 = ( NoisyChannel *) qc1;
190 
191  unsigned int neighbors=(unsigned int)atof(params["neighbours"].c_str());
192  double tolerance=atof(params["tolerance"].c_str());
193  me_qc1->setNumNeighbors (neighbors);
194  me_qc1->setTolerance (tolerance);
195 
196  double warning=atof(params["warning"].c_str());
197  double error=atof(params["error"].c_str());
198  me_qc1->setWarningProb(warning);
199  me_qc1->setErrorProb(error);
200 }
void setErrorProb(float prob)
Definition: QTest.h:60
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2378
static std::string getAlgoName(void)
Definition: QTest.h:310
void setNumNeighbors(unsigned n)
Definition: QTest.h:320
Check if any channels are noisy compared to neighboring ones.
Definition: QTest.h:301
std::vector< std::string > testsConfigured
void setTolerance(float percentage)
Definition: QTest.h:326
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
Definition: QTest.h:59
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2389
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(), 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(), 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 
48  }
49 
50  return false;
51 }
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:310
static std::string getAlgoName(void)
Definition: QTest.h:359
static std::string getAlgoName(void)
Definition: QTest.h:231
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:283
static std::string getAlgoName(void)
Definition: QTest.h:610
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:216
static std::string getAlgoName(void)
Definition: QTest.h:256
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:175
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:188
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.
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:398
void QTestConfigure::EnableXRangeTest ( std::string  testName,
std::map< std::string, std::string >  params,
DQMStore bei 
)
private

Creates ContentsXRangeROOT test.

Definition at line 109 of file QTestConfigure.cc.

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

Referenced by enableTests().

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

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