CMS 3D CMS Logo

HDQMInspectorConfigBase.h
Go to the documentation of this file.
1 #ifndef GUARD_HDQMInspectorConfigBase_h
2 #define GUARD_HDQMInspectorConfigBase_h
3 
4 #include <algorithm>
5 #include <cstdint>
6 #include <map>
7 #include <string>
8 #include <vector>
9 
32 public:
37  virtual bool valueErrorMap(std::vector<std::pair<std::string, std::string>> &valueErrorVector) const { return false; }
40  virtual bool computeIntegralList(const std::vector<std::string> &computeIntegralVector) {
41  fComputeIntegral = computeIntegralVector;
42  return true;
43  }
44  bool computeIntegral(const std::string &in) const {
45  if (std::find(fComputeIntegral.begin(), fComputeIntegral.end(), in) != fComputeIntegral.end()) {
46  return true;
47  }
48  return false;
49  }
50 
51  std::string getErrorForQuantity(const std::string &QuantityName) const {
52  // Return the error name for a quantity name given. This is designed to be
53  // used for the "user" input quantities
54 
55  for (std::map<std::string, std::string>::const_iterator It = fErrorMap.begin(); It != fErrorMap.end(); ++It) {
56  if (QuantityName.find(It->first) != std::string::npos) {
57  return It->second;
58  }
59  }
60 
61  return "";
62  }
63 
64 private:
65  std::map<std::string, std::string> fErrorMap;
66  std::vector<std::string> fComputeIntegral;
67 };
68 
69 /*
70  * valueErrorMap: don't I need a way to access what is input here in the HDQMI
71  * code?? map should be vlist=>error right?
72  *
73  * computeIntegralList: need a way to access that as well.
74  *
75  */
76 
77 #endif
std::string getErrorForQuantity(const std::string &QuantityName) const
virtual bool computeIntegralList(const std::vector< std::string > &computeIntegralVector)
virtual bool valueErrorMap(std::vector< std::pair< std::string, std::string >> &valueErrorVector) const
std::vector< std::string > fComputeIntegral
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
bool computeIntegral(const std::string &in) const
std::map< std::string, std::string > fErrorMap