CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/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 
00034 }
00035   
00036 
00037 
00038 
00039 void QTestParameterNames::constructMap(std::string testType, std::string param1,std::string param2,std::string param3,
00040              std::string param4,std::string param5,std::string param6,std::string param7,std::string param8){
00041         
00042         
00043         std::vector<std::string> paramNames;
00044         if(std::strcmp(param1.c_str(),"undefined")) paramNames.push_back(param1);       
00045         if(std::strcmp(param2.c_str(),"undefined")) paramNames.push_back(param2);       
00046         if(std::strcmp(param3.c_str(),"undefined")) paramNames.push_back(param3);       
00047         if(std::strcmp(param4.c_str(),"undefined")) paramNames.push_back(param4);       
00048         if(std::strcmp(param5.c_str(),"undefined")) paramNames.push_back(param5);       
00049         if(std::strcmp(param6.c_str(),"undefined")) paramNames.push_back(param6);       
00050         if(std::strcmp(param7.c_str(),"undefined")) paramNames.push_back(param7);       
00051         if(std::strcmp(param8.c_str(),"undefined")) paramNames.push_back(param8);       
00052         
00053         configurationMap[testType]=paramNames;
00054         
00055 }
00056 
00057 
00058 
00059 std::vector<std::string> QTestParameterNames::getTestParamNames(std::string theTestType){
00060         
00061         if(configurationMap.find(theTestType) != configurationMap.end()) {
00062                 return configurationMap[theTestType];
00063         }else{
00064                 std::vector<std::string> empty;
00065                 return empty;   
00066         }
00067 }