CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CommissioningTask.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommissioningSources_CommissioningTask_H
2 #define DQM_SiStripCommissioningSources_CommissioningTask_H
3 
8 #include "boost/cstdint.hpp"
9 #include <vector>
10 #include <string>
11 #include <iomanip>
12 
13 class TAxis;
14 class DQMStore;
15 class MonitorElement;
16 namespace edm { class EventSetup; }
17 
22 
23  public:
24 
25  // ---------- Constructors, destructors ----------
26 
28  const FedChannelConnection&,
29  const std::string& my_name );
30 
31  virtual ~CommissioningTask();
32 
33  // ---------- Classes, structs ----------
34 
37  class HistoSet {
38  public:
39  HistoSet();
40  void histo( MonitorElement* );
42  uint32_t bin( float value );
43  std::vector<float> vNumOfEntries_;
44  std::vector<float> vSumOfContents_;
45  std::vector<double> vSumOfSquares_;
46  bool isProfile_;
48  private:
50  TAxis* axis_;
51  };
52 
54  public:
56  void histo( MonitorElement* );
58  std::vector<short> vNumOfEntries_;
60  private:
62  };
63 
64  // ---------- Public methods ----------
65 
67  void bookHistograms();
68 
70  void fillHistograms( const SiStripEventSummary&,
72 
74  void fillHistograms( const SiStripEventSummary&,
75  const uint16_t& fed_id,
76  const std::map<uint16_t,float>& fed_ch );
77 
79  void updateHistograms();
80 
82  inline const uint32_t& fillCntr() const;
83 
85  inline const uint32_t& updateFreq() const;
86 
88  inline void updateFreq( const uint32_t& );
89 
91  inline const std::string& myName() const;
92 
94  inline void eventSetup( const edm::EventSetup* );
95 
96  protected:
97 
98  // ---------- Protected methods ----------
99 
101  void updateHistoSet( HistoSet&, const uint32_t& bin, const float& value );
102  void updateHistoSet( CompactHistoSet&, const uint32_t& bin, const short& value );
103 
105  void updateHistoSet( HistoSet&, const uint32_t& bin );
106  void updateHistoSet( CompactHistoSet&, const uint32_t& bin );
107 
109  void updateHistoSet( HistoSet&, const float& value );
111 
113  void updateHistoSet( HistoSet& );
114 
116  inline DQMStore* const dqm() const;
117 
119  inline const FedChannelConnection& connection() const;
120 
122  inline const uint32_t& fecKey() const;
123 
125  inline const uint32_t& fedKey() const;
126 
128  inline const edm::EventSetup* const eventSetup() const;
129 
130  private:
131 
132  // ---------- Private methods ----------
133 
135 
136  virtual void book();
137 
138  virtual void fill( const SiStripEventSummary&,
140 
141  virtual void fill( const SiStripEventSummary&,
142  const uint16_t& fed_id,
143  const std::map<uint16_t,float>& fed_ch );
144 
145  virtual void update();
146 
147  // ---------- Private member data ----------
148 
150 
151  uint32_t updateFreq_;
152 
153  uint32_t fillCntr_;
154 
156 
157  uint32_t fedKey_;
158 
159  uint32_t fecKey_;
160 
161  bool booked_;
162 
163  std::string myName_;
164 
166 
167 };
168 
169 // ----- inline methods -----
170 
171 const uint32_t& CommissioningTask::fillCntr() const { return fillCntr_; }
172 const uint32_t& CommissioningTask::updateFreq() const { return updateFreq_; }
173 void CommissioningTask::updateFreq( const uint32_t& freq ) { updateFreq_ = freq; }
174 const std::string& CommissioningTask::myName() const { return myName_; }
175 
176 DQMStore* const CommissioningTask::dqm() const { return dqm_; }
178 
179 const uint32_t& CommissioningTask::fecKey() const { return fecKey_; }
180 const uint32_t& CommissioningTask::fedKey() const { return fedKey_; }
181 
184 
185 #endif // DQM_SiStripCommissioningSources_CommissioningTask_H
std::vector< float > vNumOfEntries_
std::vector< float > vSumOfContents_
const uint32_t & updateFreq() const
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Class containning control, module, detector and connection information, at the level of a FED channel...
virtual void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
const edm::EventSetup * eventSetup_
virtual ~CommissioningTask()
DQMStore *const dqm() const
virtual void update()
const uint32_t & fillCntr() const
const edm::EventSetup *const eventSetup() const
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
FedChannelConnection connection_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
const std::string & myName() const
const uint32_t & fecKey() const
void fillHistograms(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)