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 
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&,
77 
79  void fillHistograms( const SiStripEventSummary&,
80  const uint16_t& fed_id,
81  const std::map<uint16_t,float>& fed_ch );
82 
84  void updateHistograms();
85 
87  inline const uint32_t& fillCntr() const;
88 
90  inline const uint32_t& updateFreq() const;
91 
93  inline void updateFreq( const uint32_t& );
94 
96  inline const std::string& myName() const;
97 
99  inline void eventSetup( const edm::EventSetup* );
100 
101  protected:
102 
103  // ---------- Protected methods ----------
104 
106  void updateHistoSet( HistoSet&, const uint32_t& bin, const float& value );
107  void updateHistoSet( CompactHistoSet&, const uint32_t& bin, const short& value );
108 
110  void updateHistoSet( HistoSet&, const uint32_t& bin );
111  void updateHistoSet( CompactHistoSet&, const uint32_t& bin );
112 
114  void updateHistoSet( HistoSet&, const float& value );
115  void updateHistoSet( CompactHistoSet& );
116 
118  void updateHistoSet( HistoSet& );
119 
121  inline DQMStore* const dqm() const;
122 
124  inline const FedChannelConnection& connection() const;
125 
127  inline const uint32_t& fecKey() const;
128 
130  inline const uint32_t& fedKey() const;
131 
133  inline const edm::EventSetup* const eventSetup() const;
134 
135  private:
136 
137  // ---------- Private methods ----------
138 
140 
141  virtual void book();
142 
143  virtual void fill( const SiStripEventSummary&,
145 
146  virtual void fill( const SiStripEventSummary&,
149 
150  virtual void fill( const SiStripEventSummary&,
151  const uint16_t& fed_id,
152  const std::map<uint16_t,float>& fed_ch );
153 
154  virtual void update();
155 
156  // ---------- Private member data ----------
157 
159 
160  uint32_t updateFreq_;
161 
162  uint32_t fillCntr_;
163 
165 
166  uint32_t fedKey_;
167 
168  uint32_t fecKey_;
169 
170  bool booked_;
171 
173 
175 
176 };
177 
178 // ----- inline methods -----
179 
180 const uint32_t& CommissioningTask::fillCntr() const { return fillCntr_; }
181 const uint32_t& CommissioningTask::updateFreq() const { return updateFreq_; }
182 void CommissioningTask::updateFreq( const uint32_t& freq ) { updateFreq_ = freq; }
183 const std::string& CommissioningTask::myName() const { return myName_; }
184 
185 DQMStore* const CommissioningTask::dqm() const { return dqm_; }
186 const FedChannelConnection& CommissioningTask::connection() const { return connection_; }
187 
188 const uint32_t& CommissioningTask::fecKey() const { return fecKey_; }
189 const uint32_t& CommissioningTask::fedKey() const { return fedKey_; }
190 
191 void CommissioningTask::eventSetup( const edm::EventSetup* setup ) { eventSetup_ = setup; }
192 const edm::EventSetup* const CommissioningTask::eventSetup() const { return eventSetup_; }
193 
194 #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:1
const uint32_t & updateFreq() const
Class containning control, module, detector and connection information, at the level of a FED channel...
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
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
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