00001
00010 #include <iostream>
00011 #include <cstring>
00012 #include "DQMServices/ClientConfig/interface/QTestParameterNames.h"
00013 #include "DQMServices/Core/interface/QTest.h"
00014
00015 QTestParameterNames::QTestParameterNames(){
00016
00017 this->constructMap(ContentsXRangeROOT::getAlgoName(), "xmin", "xmax");
00018 this->constructMap(ContentsYRangeROOT::getAlgoName(), "ymin", "ymax","useEmptyBins");
00019 this->constructMap(DeadChannelROOT::getAlgoName(), "threshold");
00020 this->constructMap(NoisyChannelROOT::getAlgoName(), "tolerance", "neighbours");
00021 this->constructMap(MeanWithinExpectedROOT::getAlgoName(), "mean","useRMS","useSigma","useRange","xmin","xmax");
00022
00023
00024 this->constructMap(Comp2RefEqualHROOT::getAlgoName(), "testparam");
00025 this->constructMap(Comp2RefChi2ROOT::getAlgoName(), "testparam");
00026 this->constructMap(Comp2RefKolmogorovROOT::getAlgoName(), "testparam");
00027
00028
00029 this->constructMap(ContentsWithinExpectedROOT::getAlgoName(), "minMean", "maxMean", "minRMS", "maxRMS", "toleranceMean", "minEntries", "useEmptyBins");
00030
00031
00032 }
00033
00034
00035
00036
00037 void QTestParameterNames::constructMap(std::string testType, std::string param1,std::string param2,std::string param3,
00038 std::string param4,std::string param5,std::string param6,std::string param7,std::string param8){
00039
00040
00041 std::vector<std::string> paramNames;
00042 if(std::strcmp(param1.c_str(),"undefined")) paramNames.push_back(param1);
00043 if(std::strcmp(param2.c_str(),"undefined")) paramNames.push_back(param2);
00044 if(std::strcmp(param3.c_str(),"undefined")) paramNames.push_back(param3);
00045 if(std::strcmp(param4.c_str(),"undefined")) paramNames.push_back(param4);
00046 if(std::strcmp(param5.c_str(),"undefined")) paramNames.push_back(param5);
00047 if(std::strcmp(param6.c_str(),"undefined")) paramNames.push_back(param6);
00048 if(std::strcmp(param7.c_str(),"undefined")) paramNames.push_back(param7);
00049 if(std::strcmp(param8.c_str(),"undefined")) paramNames.push_back(param8);
00050
00051 configurationMap[testType]=paramNames;
00052
00053 }
00054
00055
00056
00057 std::vector<std::string> QTestParameterNames::getTestParamNames(std::string theTestType){
00058
00059 if(configurationMap.find(theTestType) != configurationMap.end()) {
00060 return configurationMap[theTestType];
00061 }else{
00062 std::vector<std::string> empty;
00063 return empty;
00064 }
00065 }