CMS 3D CMS Logo

CSCDQM_MonitorObjectProvider.h
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: CSCDQM_MonitorObjectProviderIf.h
5  *
6  * Description: Histo Provider Interface
7  *
8  * Version: 1.0
9  * Created: 10/03/2008 10:26:04 AM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius, valdas.rapsevicius@cern.ch
14  * Company: CERN, CH
15  *
16  * =====================================================================================
17  */
18 
19 #ifndef CSCDQM_MonitorObjectProviderIf_H
20 #define CSCDQM_MonitorObjectProviderIf_H
21 
23 
24 #include "CSCDQM_HistoDef.h"
25 #include "CSCDQM_MonitorObject.h"
26 
27 namespace cscdqm {
28 
30 
32  const HistoDef* hdef;
37 
38  int nchX;
39  double lowX;
40  double highX;
41 
42  int nchY;
43  double lowY;
44  double highY;
45 
46  int nchZ;
47  double lowZ;
48  double highZ;
49 
53 
55 
56  HistoBookRequest(const HistoDef& p_hdef,
57  const HistoType& p_htype,
58  const std::string& p_ctype,
59  const std::string& p_folder,
60  const std::string& p_title,
61  const int p_nchX = 0,
62  const double p_lowX = 0,
63  const double p_highX = 0,
64  const int p_nchY = 0,
65  const double p_lowY = 0,
66  const double p_highY = 0,
67  const int p_nchZ = 0,
68  const double p_lowZ = 0,
69  const double p_highZ = 0,
70  const std::string& p_option = "s") {
71  hdef = &p_hdef;
72  htype = p_htype;
73  ctype = p_ctype;
74  folder = p_folder;
75  title = p_title;
76  nchX = p_nchX;
77  lowX = p_lowX;
78  highX = p_highX;
79  nchY = p_nchY;
80  lowY = p_lowY;
81  highY = p_highY;
82  nchZ = p_nchZ;
83  lowZ = p_lowZ;
84  highZ = p_highZ;
85  option = p_option;
86  }
87 
88  HistoBookRequest(const HistoDef& p_hdef, const std::string& p_folder, const int p_value) {
89  hdef = &p_hdef;
90  htype = INT;
91  ctype = "INT";
92  folder = p_folder;
93  title = p_hdef.getHistoName();
94  default_int = p_value;
95  }
96 
97  HistoBookRequest(const HistoDef& p_hdef, const std::string& p_folder, const float p_value) {
98  hdef = &p_hdef;
99  htype = FLOAT;
100  ctype = "FLOAT";
101  folder = p_folder;
102  title = p_hdef.getHistoName();
103  default_float = p_value;
104  }
105 
106  HistoBookRequest(const HistoDef& p_hdef,
107  const std::string& p_folder,
108  const std::string& p_title,
109  const std::string& p_value) {
110  hdef = &p_hdef;
111  htype = STRING;
112  ctype = "STRING";
113  folder = p_folder;
114  title = p_title;
115  default_string = p_value;
116  }
117  };
118 
125  public:
126  virtual ~MonitorObjectProvider() noexcept(false) {}
127  virtual bool getCSCDetId(const unsigned int crateId, const unsigned int dmbId, CSCDetId& detId) const = 0;
128  virtual MonitorObject* bookMonitorObject(const HistoBookRequest& p_req) = 0;
129  };
130 
131 } // namespace cscdqm
132 
133 #endif
HistoBookRequest(const HistoDef &p_hdef, const HistoType &p_htype, const std::string &p_ctype, const std::string &p_folder, const std::string &p_title, const int p_nchX=0, const double p_lowX=0, const double p_highX=0, const int p_nchY=0, const double p_lowY=0, const double p_highY=0, const int p_nchZ=0, const double p_lowZ=0, const double p_highZ=0, const std::string &p_option="s")
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
Abstract Base Histogram Definition.
HistoBookRequest(const HistoDef &p_hdef, const std::string &p_folder, const std::string &p_title, const std::string &p_value)
virtual MonitorObject * bookMonitorObject(const HistoBookRequest &p_req)=0
virtual bool getCSCDetId(const unsigned int crateId, const unsigned int dmbId, CSCDetId &detId) const =0
virtual ~MonitorObjectProvider() noexcept(false)
HistoBookRequest(const HistoDef &p_hdef, const std::string &p_folder, const float p_value)
const HistoName & getHistoName() const
Get raw histogram name.
Interface for Histogram providing objects. Used by Event Processor to retrieve MonitorObject 's and b...
HistoBookRequest(const HistoDef &p_hdef, const std::string &p_folder, const int p_value)