CMS 3D CMS Logo

CommissioningTask.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommissioningSources_CommissioningTask_H
2 #define DQM_SiStripCommissioningSources_CommissioningTask_H
3 
10 #include "boost/cstdint.hpp"
11 #include <vector>
12 #include <string>
13 #include <iomanip>
14 
15 class TAxis;
16 class DQMStore;
17 class MonitorElement;
18 namespace edm { class EventSetup; }
19 
24 
25  public:
26 
27  // ---------- Constructors, destructors ----------
28 
30  const FedChannelConnection&,
31  const std::string& my_name );
32 
33  virtual ~CommissioningTask();
34 
35  // ---------- Classes, structs ----------
36 
39  class HistoSet {
40  public:
41  HistoSet();
42  void histo( MonitorElement* );
44  uint32_t bin( float value );
45  std::vector<float> vNumOfEntries_;
46  std::vector<float> vSumOfContents_;
47  std::vector<double> vSumOfSquares_;
48  bool isProfile_;
50  private:
52  TAxis* axis_;
53  };
54 
56  public:
58  void histo( MonitorElement* );
60  std::vector<short> vNumOfEntries_;
62  private:
64  };
65 
66  // ---------- Public methods ----------
67 
69  void bookHistograms();
70 
72  void fillHistograms( const SiStripEventSummary&,
74 
76  void fillHistograms( const SiStripEventSummary&,
79 
81  void fillHistograms( const SiStripEventSummary&,
84  const std::vector<uint16_t>&);
85 
87  void fillHistograms( const SiStripEventSummary&,
88  const uint16_t& fed_id,
89  const std::map<uint16_t,float>& fed_ch );
90 
92  void updateHistograms();
93 
95  inline const uint32_t& fillCntr() const;
96 
98  inline const uint32_t& updateFreq() const;
99 
101  inline void updateFreq( const uint32_t& );
102 
104  inline const std::string& myName() const;
105 
107  inline void eventSetup( const edm::EventSetup* );
108 
109  protected:
110 
111  // ---------- Protected methods ----------
112 
114  void updateHistoSet( HistoSet&, const uint32_t& bin, const float& value );
115  void updateHistoSet( CompactHistoSet&, const uint32_t& bin, const short& value );
116 
118  void updateHistoSet( HistoSet&, const uint32_t& bin );
119  void updateHistoSet( CompactHistoSet&, const uint32_t& bin );
120 
122  void updateHistoSet( HistoSet&, const float& value );
123  void updateHistoSet( CompactHistoSet& );
124 
126  void updateHistoSet( HistoSet& );
127 
129  inline DQMStore* const dqm() const;
130 
132  inline const FedChannelConnection& connection() const;
133 
135  inline const uint32_t& fecKey() const;
136 
138  inline const uint32_t& fedKey() const;
139 
141  inline const edm::EventSetup* const eventSetup() const;
142 
143  private:
144 
145  // ---------- Private methods ----------
146 
148 
149  virtual void book();
150 
151  virtual void fill( const SiStripEventSummary&,
153 
154 
155  virtual void fill( const SiStripEventSummary&,
158 
159  virtual void fill( const SiStripEventSummary&,
162  const std::vector<uint16_t>&);
163 
164  virtual void fill( const SiStripEventSummary&,
165  const uint16_t& fed_id,
166  const std::map<uint16_t,float>& fed_ch );
167 
168  virtual void update();
169 
170  // ---------- Private member data ----------
171 
173 
174  uint32_t updateFreq_;
175 
176  uint32_t fillCntr_;
177 
179 
180  uint32_t fedKey_;
181 
182  uint32_t fecKey_;
183 
184  bool booked_;
185 
187 
189 
190 };
191 
192 // ----- inline methods -----
193 
194 const uint32_t& CommissioningTask::fillCntr() const { return fillCntr_; }
195 const uint32_t& CommissioningTask::updateFreq() const { return updateFreq_; }
196 void CommissioningTask::updateFreq( const uint32_t& freq ) { updateFreq_ = freq; }
197 const std::string& CommissioningTask::myName() const { return myName_; }
198 
199 DQMStore* const CommissioningTask::dqm() const { return dqm_; }
200 const FedChannelConnection& CommissioningTask::connection() const { return connection_; }
201 
202 const uint32_t& CommissioningTask::fecKey() const { return fecKey_; }
203 const uint32_t& CommissioningTask::fedKey() const { return fedKey_; }
204 
205 void CommissioningTask::eventSetup( const edm::EventSetup* setup ) { eventSetup_ = setup; }
206 const edm::EventSetup* const CommissioningTask::eventSetup() const { return eventSetup_; }
207 
208 #endif // DQM_SiStripCommissioningSources_CommissioningTask_H
std::vector< float > vNumOfEntries_
static const char fedKey_[]
std::vector< float > vSumOfContents_
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
const uint32_t & updateFreq() const
Class containning control, module, detector and connection information, at the level of a FED channel...
static const char fecKey_[]
Definition: value.py:1
const edm::EventSetup * eventSetup_
bin
set the eta bin as selection string.
DQMStore *const dqm() const
const uint32_t & fillCntr() const
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
HLT enums.
#define update(a, b)
const edm::EventSetup *const eventSetup() const
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
FedChannelConnection connection_
const std::string & myName() const
const uint32_t & fecKey() const