CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NormDML.h
Go to the documentation of this file.
1 #ifndef RecoLuminosity_LumiProducer_NormDML_H
2 #define RecoLuminosity_LumiProducer_NormDML_H
3 // -*- C++ -*-
4 //
5 // Package: LumiProducer
6 // Class: NormDML
7 //
15 //
16 // Original Author: Zhen Xie
17 //
18 #include <string>
19 #include <vector>
20 #include <map>
21 namespace coral {
22  class ISchema;
23 }
24 namespace lumi {
25  class NormDML {
26  public:
27  struct normData {
30  std::map<unsigned int, float> afterglows;
31  std::map<std::string, float> coefficientmap;
33  unsigned int beamegev;
34  };
35  enum LumiType { HF, PIXEL };
36  NormDML();
37  ~NormDML() {}
38  /*
39  find the most recent id for the given norm tag
40  */
41  unsigned long long normIdByName(const coral::ISchema& schema, const std::string& normtagname);
42  /*
43  find the most recent normid for the given norm type
44  */
45  void normIdByType(const coral::ISchema& schema,
46  std::map<std::string, unsigned long long>& resultMap,
47  LumiType = HF,
48  bool defaultonly = true);
49  /*
50  retrieve norm data by normid
51  */
52  void normById(const coral::ISchema& schema, unsigned long long normid, std::map<unsigned int, normData>& result);
53 
54  /*
55  parse corrector functions
56  */
57  void parseLumiCorrector(const std::string& correctorStr, std::vector<std::string>& correctorParams);
58  void parseAfterglows(const std::string& afterglowStr, std::map<unsigned int, float>& afterglowmap);
59  };
60 } // namespace lumi
61 #endif
unsigned int beamegev
Definition: NormDML.h:33
void parseAfterglows(const std::string &afterglowStr, std::map< unsigned int, float > &afterglowmap)
Definition: NormDML.cc:147
tuple result
Definition: mps_fire.py:311
void parseLumiCorrector(const std::string &correctorStr, std::vector< std::string > &correctorParams)
Definition: NormDML.cc:142
std::map< unsigned int, float > afterglows
Definition: NormDML.h:30
list lumi
Definition: dqmdumpme.py:53
void normById(const coral::ISchema &schema, unsigned long long normid, std::map< unsigned int, normData > &result)
Definition: NormDML.cc:97
std::string normtag
Definition: NormDML.h:28
std::string corrfunc
Definition: NormDML.h:29
std::string amodetag
Definition: NormDML.h:32
std::map< std::string, float > coefficientmap
Definition: NormDML.h:31
void normIdByType(const coral::ISchema &schema, std::map< std::string, unsigned long long > &resultMap, LumiType=HF, bool defaultonly=true)
Definition: NormDML.cc:47
unsigned long long normIdByName(const coral::ISchema &schema, const std::string &normtagname)
Definition: NormDML.cc:16