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 <string>
6 #include <vector>
7 #include <map>
8 #include <cstdint>
9 
33 {
34  public:
36  virtual ~HDQMInspectorConfigBase () {};
38  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  {
42  fComputeIntegral = computeIntegralVector;
43  return true;
44  }
45  bool computeIntegral(const std::string & in) const
46  {
47  if (std::find(fComputeIntegral.begin(), fComputeIntegral.end(), in) != fComputeIntegral.end()) {
48  return true;
49  }
50  return false;
51  }
52 
53  std::string getErrorForQuantity(const std::string & QuantityName) const
54  {
55  // Return the error name for a quantity name given. This is designed to be used for the
56  // "user" input quantities
57 
58  for (std::map<std::string, std::string>::const_iterator It = fErrorMap.begin(); It != fErrorMap.end(); ++It) {
59  if (QuantityName.find( It->first ) != std::string::npos) {
60  return It->second;
61  }
62  }
63 
64  return "";
65  }
66 
67  private:
68  std::map<std::string, std::string> fErrorMap;
69  std::vector<std::string> fComputeIntegral;
70 };
71 
72 
73 /*
74  * valueErrorMap: don't I need a way to access what is input here in the HDQMI code??
75  * map should be vlist=>error right?
76  *
77  * computeIntegralList: need a way to access that as well.
78  *
79  */
80 
81 
82 
83 #endif
std::string getErrorForQuantity(const std::string &QuantityName) const
virtual bool computeIntegralList(const std::vector< std::string > &computeIntegralVector)
fills the list of names of quantities for which a summation over the runs is required ...
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
virtual bool valueErrorMap(std::vector< std::pair< std::string, std::string > > &valueErrorVector) const
fills a vector<pair<string, string> > associating values with the corresponding errors ...
bool computeIntegral(const std::string &in) const
std::map< std::string, std::string > fErrorMap