Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:17

0001 #ifndef ElectroWeakAnalysis_EWKTau_dqmAuxFunctions_h
0002 #define ElectroWeakAnalysis_EWKTau_dqmAuxFunctions_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 
0006 #include "DQMServices/Core/interface/DQMStore.h"
0007 
0008 #include <string>
0009 #include <vector>
0010 #include <map>
0011 
0012 const std::string parKeyword = "#PAR#";
0013 const std::string plotKeyword = "#PLOT#";
0014 const std::string rangeKeyword = "#RANGE";
0015 const std::string processDirKeyword = "#PROCESSDIR#";
0016 
0017 std::string replace_string(const std::string&, const std::string&, const std::string&, unsigned, unsigned, int&);
0018 
0019 std::string format_vstring(const std::vector<std::string>& vs);
0020 
0021 template <class T>
0022 void readCfgParameter(const edm::ParameterSet& cfgParSet, std::map<std::string, T>& def) {
0023   std::vector<std::string> cfgParNames = cfgParSet.getParameterNamesForType<edm::ParameterSet>();
0024   for (std::vector<std::string>::const_iterator cfgParName = cfgParNames.begin(); cfgParName != cfgParNames.end();
0025        ++cfgParName) {
0026     edm::ParameterSet cfgParDef = cfgParSet.getParameter<edm::ParameterSet>(*cfgParName);
0027 
0028     def.insert(std::pair<std::string, T>(*cfgParName, T(*cfgParName, cfgParDef)));
0029   }
0030 }
0031 
0032 std::string dqmDirectoryName(const std::string&);
0033 std::string dqmSubDirectoryName_merged(const std::string&, const std::string&);
0034 void dqmCopyRecursively(dqm::legacy::DQMStore&, const std::string&, const std::string&, double, int, bool);
0035 
0036 const std::string dqmSeparator = "/";
0037 //const std::string dqmRootDirectory = std::string(dqmSeparator).append("DQMData").append(dqmSeparator);
0038 const std::string dqmRootDirectory = "";
0039 
0040 void separateHistogramFromDirectoryName(const std::string&, std::string&, std::string&);
0041 
0042 #endif