16 const char *default_value)
const {
17 std::map<std::string, std::string>::const_iterator iter;
18 if ((iter = m.find(
std::string(item))) != m.end()) {
19 return (*iter).second.c_str();
21 LogDebug(
"QTestConfigure") <<
"Warning, using default value for parameter " << item
22 <<
" with default_value: " << default_value << std::endl;
29 std::map<std::string, std::map<std::string, std::string> >::const_iterator itr;
30 for (itr =
tests.begin(); itr !=
tests.end(); ++itr) {
31 const std::map<std::string, std::string> &
params = itr->second;
61 const std::map<std::string, std::string> &
params,
81 const std::map<std::string, std::string> &
params,
95 unsigned int useEmptyBins = (
unsigned int)atof(
findOrDefault(params,
"useEmptyBins",
"0"));
103 const std::map<std::string, std::string> &
params,
122 const std::map<std::string, std::string> &
params,
132 unsigned int neighbors = (
unsigned int)atof(
findOrDefault(params,
"neighbours",
"0"));
144 const std::map<std::string, std::string> &
params,
154 unsigned int Xblocks = (
unsigned int)atof(
findOrDefault(params,
"Xblocks",
"0"));
155 unsigned int Yblocks = (
unsigned int)atof(
findOrDefault(params,
"Yblocks",
"0"));
156 unsigned int neighborsX = (
unsigned int)atof(
findOrDefault(params,
"neighboursX",
"0"));
157 unsigned int neighborsY = (
unsigned int)atof(
findOrDefault(params,
"neighboursY",
"0"));
158 double toleranceNoisy = atof(
findOrDefault(params,
"toleranceNoisy",
"0"));
159 double toleranceDead = atof(
findOrDefault(params,
"toleranceDead",
"0"));
187 const std::map<std::string, std::string> &
params,
201 double useRMSVal = atof(
findOrDefault(params,
"useRMS",
"0"));
202 double useSigmaVal = atof(
findOrDefault(params,
"useSigma",
"0"));
203 double useRangeVal = atof(
findOrDefault(params,
"useRange",
"0"));
211 if (useRMSVal && useSigmaVal && useRangeVal)
233 const std::map<std::string, std::string> &
params,
284 const std::map<std::string, std::string> &
params,
294 unsigned int useEmptyBins = (
unsigned int)atof(
findOrDefault(params,
"useEmptyBins",
"0"));
297 double minMean = atof(
findOrDefault(params,
"minMean",
"0"));
298 double maxMean = atof(
findOrDefault(params,
"maxMean",
"0"));
307 if (minMean != 0 || maxMean != 0)
310 if (minRMS != 0 || maxRMS != 0)
313 if (toleranceMean != 0)
321 const std::map<std::string, std::string> &
params,
344 const std::map<std::string, std::string> &
params,
void setErrorProb(float prob)
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)
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
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.
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
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 * getQCriterion(std::string const &qtname) const
void setNumYblocks(unsigned ncy)
void setWarningProb(float prob)
set probability limit for warning and error (default: 90% and 50%)
static std::string getAlgoName()
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
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()