CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DQMServices/ClientConfig/src/QTestParameterNames.cc

Go to the documentation of this file.
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         //======================== new quality tests in the parser =====================//
00024         this->constructMap(Comp2RefEqualHROOT::getAlgoName(), "testparam");
00025         this->constructMap(Comp2RefChi2ROOT::getAlgoName(), "testparam");
00026         this->constructMap(Comp2RefKolmogorovROOT::getAlgoName(), "testparam");
00027 
00028 //        this->constructMap(MostProbableLandauROOT::getAlgoName(), "xmin", "xmax","normalization", "mostprobable", "sigma");
00029         this->constructMap(ContentsWithinExpectedROOT::getAlgoName(), "minMean", "maxMean", "minRMS", "maxRMS", "toleranceMean", "minEntries", "useEmptyBins");
00030         //this->constructMap(ContentsWithinExpectedASROOT::getAlgoName(), "minCont", "maxCont"); 
00031 
00032         this->constructMap(CompareToMedianROOT::getAlgoName(), "MinRel", "MaxRel", "UseEmptyBins", "MinAbs", "MaxAbs");
00033         this->constructMap(CompareLastFilledBinROOT::getAlgoName(), "AvVal", "MinVal", "MaxVal");
00034 
00035 }
00036   
00037 
00038 
00039 
00040 void QTestParameterNames::constructMap(std::string testType, std::string param1,std::string param2,std::string param3,
00041              std::string param4,std::string param5,std::string param6,std::string param7,std::string param8){
00042         
00043         
00044         std::vector<std::string> paramNames;
00045         if(std::strcmp(param1.c_str(),"undefined")) paramNames.push_back(param1);       
00046         if(std::strcmp(param2.c_str(),"undefined")) paramNames.push_back(param2);       
00047         if(std::strcmp(param3.c_str(),"undefined")) paramNames.push_back(param3);       
00048         if(std::strcmp(param4.c_str(),"undefined")) paramNames.push_back(param4);       
00049         if(std::strcmp(param5.c_str(),"undefined")) paramNames.push_back(param5);       
00050         if(std::strcmp(param6.c_str(),"undefined")) paramNames.push_back(param6);       
00051         if(std::strcmp(param7.c_str(),"undefined")) paramNames.push_back(param7);       
00052         if(std::strcmp(param8.c_str(),"undefined")) paramNames.push_back(param8);       
00053         
00054         configurationMap[testType]=paramNames;
00055         
00056 }
00057 
00058 
00059 
00060 std::vector<std::string> QTestParameterNames::getTestParamNames(std::string theTestType){
00061         
00062         if(configurationMap.find(theTestType) != configurationMap.end()) {
00063                 return configurationMap[theTestType];
00064         }else{
00065                 std::vector<std::string> empty;
00066                 return empty;   
00067         }
00068 }