CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dqmAuxFunctions.h
Go to the documentation of this file.
1 #ifndef ElectroWeakAnalysis_EWKTau_dqmAuxFunctions_h
2 #define ElectroWeakAnalysis_EWKTau_dqmAuxFunctions_h
3 
5 
7 
8 #include <string>
9 #include <vector>
10 #include <map>
11 
12 const std::string parKeyword = "#PAR#";
13 const std::string plotKeyword = "#PLOT#";
14 const std::string rangeKeyword = "#RANGE";
15 const std::string processDirKeyword = "#PROCESSDIR#";
16 
17 std::string replace_string(const std::string&, const std::string&, const std::string&, unsigned, unsigned, int&);
18 
19 std::string format_vstring(const std::vector<std::string>& vs);
20 
21 template <class T>
22 void readCfgParameter(const edm::ParameterSet& cfgParSet, std::map<std::string, T>& def)
23 {
24  std::vector<std::string> cfgParNames = cfgParSet.getParameterNamesForType<edm::ParameterSet>();
25  for ( std::vector<std::string>::const_iterator cfgParName = cfgParNames.begin();
26  cfgParName != cfgParNames.end(); ++cfgParName ) {
27  edm::ParameterSet cfgParDef = cfgParSet.getParameter<edm::ParameterSet>(*cfgParName);
28 
29  def.insert(std::pair<std::string, T>(*cfgParName, T(*cfgParName, cfgParDef)));
30  }
31 }
32 
33 std::string dqmDirectoryName(const std::string&);
34 std::string dqmSubDirectoryName_merged(const std::string&, const std::string&);
35 void dqmCopyRecursively(DQMStore&, const std::string&, const std::string&, double, int, bool);
36 
37 const std::string dqmSeparator = "/";
38 //const std::string dqmRootDirectory = std::string(dqmSeparator).append("DQMData").append(dqmSeparator);
39 const std::string dqmRootDirectory = "";
40 
41 void separateHistogramFromDirectoryName(const std::string&, std::string&, std::string&);
42 
43 #endif
const std::string processDirKeyword
T getParameter(std::string const &) const
std::string replace_string(const std::string &src, const std::string &keyword, const std::string &parameter, unsigned minReplacements, unsigned maxReplacements, int &errorFlag)
void insert(bool ok_to_replace, char const *, Entry const &)
std::string dqmDirectoryName(const std::string &dqmRootDirectory, const std::string &dqmSubDirectory)
Definition: EwkTauDQM.cc:10
const std::string rangeKeyword
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:195
std::string dqmSubDirectoryName_merged(const std::string &directory, const std::string &subdirectory)
void separateHistogramFromDirectoryName(const std::string &histogramAndDirectoryName, std::string &histogramName, std::string &directoryName)
const std::string parKeyword
std::string format_vstring(const std::vector< std::string > &vs)
const std::string plotKeyword
void dqmCopyRecursively(DQMStore &dqmStore, const std::string &inputDirectory, const std::string &outputDirectory, double scaleFactor, int mode, bool rmInputDirectory)
const std::string dqmRootDirectory
const std::string dqmSeparator
Definition: EwkTauDQM.cc:8
void readCfgParameter(const edm::ParameterSet &cfgParSet, std::map< std::string, T > &def)
long double T
JetCorrectorParameters::Definitions def
Definition: classes.h:10