17 const char * default_value)
const {
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();
22 LogDebug(
"QTestConfigure") <<
"Warning, using default value for parameter " 23 << item <<
" with default_value: " 24 << default_value << std::endl;
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> ¶ms= itr->second;
72 const std::map<std::string, std::string> & params,
89 const std::map<std::string, std::string> & params,
106 const std::map<std::string, std::string> & params,
116 double warning = atof(
findOrDefault(params,
"warning",
"0"));
118 int minEntries = atoi(
findOrDefault(params,
"minEntries",
"0"));
121 if ( minEntries != 0 )
126 const std::map<std::string, std::string> & params,
136 double warning = atof(
findOrDefault(params,
"warning",
"0"));
143 const std::map<std::string, std::string> & params,
155 double warning = atof(
findOrDefault(params,
"warning",
"0"));
163 const std::map<std::string, std::string> & params,
175 double warning = atof(
findOrDefault(params,
"warning",
"0"));
177 unsigned int useEmptyBins = (
unsigned int)atof(
findOrDefault(params,
"useEmptyBins",
"0"));
185 const std::map<std::string, std::string> & params,
196 double warning = atof(
findOrDefault(params,
"warning",
"0"));
204 const std::map<std::string, std::string> & params,
214 unsigned int neighbors = (
unsigned int) atof(
findOrDefault(params,
"neighbours",
"0"));
216 double warning = atof(
findOrDefault(params,
"warning",
"0"));
226 const std::map<std::string, std::string> & params,
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"));
248 double warning = atof(
findOrDefault(params,
"warning",
"0"));
269 const std::map<std::string, std::string> & params,
279 double warning = atof(
findOrDefault(params,
"warning",
"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"));
293 if (useRMSVal && useSigmaVal && useRangeVal)
315 const std::map<std::string, std::string> & params,
366 const std::map<std::string, std::string> & params,
376 unsigned int useEmptyBins = (
unsigned int) atof(
findOrDefault(params,
"useEmptyBins",
"0"));
377 double warning = atof(
findOrDefault(params,
"warning",
"0"));
379 double minMean = atof(
findOrDefault(params,
"minMean",
"0"));
380 double maxMean = atof(
findOrDefault(params,
"maxMean",
"0"));
383 double toleranceMean = atof(
findOrDefault(params,
"toleranceMean",
"0"));
384 int minEntries = atoi(
findOrDefault(params,
"minEntries",
"0"));
389 if ( minMean != 0 || maxMean != 0 )
392 if ( minRMS != 0 || maxRMS != 0 )
395 if ( toleranceMean != 0 )
398 if ( minEntries != 0 )
403 const std::map<std::string, std::string> & params,
414 double warning = atof(
findOrDefault(params,
"warning",
"0"));
426 const std::map<std::string, std::string>& params,
438 double warning = atof(
findOrDefault(params,
"warning",
"0"));
void setErrorProb(float prob)
static std::string getAlgoName()
test that histogram contents are above Ymin
void setUseEmptyBins(unsigned int useEmptyBins)
void setXMax(unsigned xMax)
virtual void setAllowedXRange(double xmin, double xmax)
set allowed range in X-axis (default values: histogram's X-range)
void setRMSRange(double xmin, double xmax)
set expected value for mean
void useSigma(double expectedSigma)
static std::string getAlgoName()
void setNumNeighbors(unsigned n)
Algorithm for testing if histogram's mean value is near expected value.
Check if any channels are noisy compared to neighboring ones.
static std::string getAlgoName()
void setYMax(unsigned yMax)
static std::string getAlgoName()
void setYMin(unsigned yMin)
static std::string getAlgoName()
void setTolerance(float percentage)
void setMinimumEntries(unsigned n)
set minimum # of entries needed
QCriterion * getQCriterion(std::string const &qtname) const
void setExpectedMean(double mean)
void setUseEmptyBins(unsigned int useEmptyBins)
void useRange(double xmin, double xmax)
void setNumNeighborsX(unsigned ncx)
void setToleranceNoisy(float factorNoisy)
Check the sigma of each bin against the rest of the chamber by a factor of tolerance/.
static std::string getAlgoName()
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
void setNumYblocks(unsigned ncy)
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
static std::string getAlgoName()
Comparison to reference using the Kolmogorov algorithm.
void setMeanRange(double xmin, double xmax)
set expected value for mean
static std::string getAlgoName()
get algorithm name
void setNoisy(bool noisy)
void setNumNeighborsY(unsigned ncy)
void setXMin(unsigned xMin)
static std::string getAlgoName()
void setMeanTolerance(float fracTolerance)
set (fractional) tolerance for mean
static std::string getAlgoName()
void setThreshold(double ymin)
set Ymin (inclusive) threshold for "dead" channel (default: 0)
void setNumXblocks(unsigned ncx)
void setAverage(float average)
void setToleranceDead(float factorDead)
virtual void setAllowedYRange(double ymin, double ymax)
static std::string getAlgoName()
static std::string getAlgoName()
static std::string getAlgoName()