CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
CommissioningTask Class Reference

#include <CommissioningTask.h>

Inheritance diagram for CommissioningTask:
ApvTimingTask CalibrationScanTask CalibrationTask DaqScopeModeTask FastFedCablingTask FedCablingTask FedTimingTask FineDelayTask LatencyTask NoiseTask OptoScanTask PedestalsTask PedsFullNoiseTask PedsOnlyTask VpspScanTask

Classes

class  CompactHistoSet
 
class  HistoSet
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void bookHistograms ()
 
 CommissioningTask (DQMStore *, const FedChannelConnection &, const std::string &my_name)
 
void eventSetup (const edm::EventSetup *)
 
const uint32_t & fillCntr () const
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &)
 
void fillHistograms (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &, const std::vector< uint16_t > &)
 
void fillHistograms (const SiStripEventSummary &, const uint16_t &fed_id, const std::map< uint16_t, float > &fed_ch)
 
const std::string & myName () const
 
const uint32_t & updateFreq () const
 
void updateFreq (const uint32_t &)
 
void updateHistograms ()
 
virtual ~CommissioningTask ()
 

Protected Member Functions

const FedChannelConnectionconnection () const
 
DQMStore *const dqm () const
 
const edm::EventSetup *const eventSetup () const
 
const uint32_t & fecKey () const
 
const uint32_t & fedKey () const
 
void updateHistoSet (HistoSet &, const uint32_t &bin, const float &value)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin, const short &value)
 
void updateHistoSet (HistoSet &, const uint32_t &bin)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin)
 
void updateHistoSet (HistoSet &, const float &value)
 
void updateHistoSet (CompactHistoSet &)
 
void updateHistoSet (HistoSet &)
 

Private Member Functions

virtual void book ()
 
 CommissioningTask ()
 
virtual void fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
 
virtual void fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &)
 
virtual void fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &, const edm::DetSet< SiStripRawDigi > &, const std::vector< uint16_t > &)
 
virtual void fill (const SiStripEventSummary &, const uint16_t &fed_id, const std::map< uint16_t, float > &fed_ch)
 
virtual void update ()
 

Private Attributes

bool booked_
 
FedChannelConnection connection_
 
DQMStoredqm_
 
const edm::EventSetupeventSetup_
 
uint32_t fecKey_
 
uint32_t fedKey_
 
uint32_t fillCntr_
 
std::string myName_
 
uint32_t updateFreq_
 

Detailed Description

Definition at line 24 of file CommissioningTask.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 26 of file CommissioningTask.h.

◆ MonitorElement

Definition at line 27 of file CommissioningTask.h.

Constructor & Destructor Documentation

◆ CommissioningTask() [1/2]

CommissioningTask::CommissioningTask ( DQMStore dqm,
const FedChannelConnection conn,
const std::string &  my_name 
)

Definition at line 17 of file CommissioningTask.cc.

References FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), connection_, TauDecayModes::dec, FedChannelConnection::fecCrate(), SiStripFedKey::feChan(), fecKey_, FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), FedChannelConnection::fedId(), fedKey_, SiStripFedKey::feUnit(), crabWrapper::key, FedChannelConnection::lldChannel(), LogTrace, sistrip::mlDqmSource_, and myName_.

18  : dqm_(dqm),
19  updateFreq_(0),
20  fillCntr_(0),
22  fedKey_(0),
23  fecKey_(0),
24  booked_(false),
25  myName_(my_name),
26  eventSetup_(nullptr) {
27  uint16_t fed_ch = connection_.fedCh();
35  .key();
36 
37  LogTrace(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
38  << " Constructing '" << myName_ << "' object for FecKey/FedKey: "
39  << "0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey_ << std::dec << "/"
40  << "0x" << std::hex << std::setw(8) << std::setfill('0') << fedKey_ << std::dec
41  << " and Crate/FEC/ring/CCU/module/LLDchan: " << connection_.fecCrate() << "/"
42  << connection_.fecSlot() << "/" << connection_.fecRing() << "/" << connection_.ccuAddr() << "/"
43  << connection_.ccuChan() << "/" << connection_.lldChannel()
44  << " and FedId/Ch: " << connection_.fedId() << "/" << connection_.fedCh();
45 }
const uint16_t & fecCrate() const
const uint16_t & ccuAddr() const
const uint16_t & feChan() const
const uint16_t & feUnit() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
static const char mlDqmSource_[]
const uint16_t & fecSlot() const
#define LogTrace(id)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint16_t & ccuChan() const
const uint16_t & fedId() const
const uint16_t & fecRing() const
const edm::EventSetup * eventSetup_
conn
Definition: getInfo.py:9
const uint16_t & fedCh() const
FedChannelConnection connection_
Definition: DQMStore.h:18

◆ ~CommissioningTask()

CommissioningTask::~CommissioningTask ( )
virtual

Definition at line 49 of file CommissioningTask.cc.

References FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), connection_, TauDecayModes::dec, FedChannelConnection::fecCrate(), fecKey_, FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), FedChannelConnection::fedId(), fedKey_, FedChannelConnection::lldChannel(), LogTrace, sistrip::mlDqmSource_, and myName_.

49  {
50  LogTrace(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
51  << " Destructing object for FED id/ch "
52  << " Constructing '" << myName_ << "' object for FecKey/FedKey: "
53  << "0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey_ << std::dec << "/"
54  << "0x" << std::hex << std::setw(8) << std::setfill('0') << fedKey_ << std::dec
55  << " and Crate/FEC/ring/CCU/module/LLDchan: " << connection_.fecCrate() << "/"
56  << connection_.fecSlot() << "/" << connection_.fecRing() << "/" << connection_.ccuAddr() << "/"
57  << connection_.ccuChan() << "/" << connection_.lldChannel()
58  << " and FedId/Ch: " << connection_.fedId() << "/" << connection_.fedCh();
59  //@@ do not delete EventSetup pointer!
60 }
const uint16_t & fecCrate() const
const uint16_t & ccuAddr() const
static const char mlDqmSource_[]
const uint16_t & fecSlot() const
#define LogTrace(id)
const uint16_t & ccuChan() const
const uint16_t & fedId() const
const uint16_t & fecRing() const
const uint16_t & fedCh() const
FedChannelConnection connection_

◆ CommissioningTask() [2/2]

CommissioningTask::CommissioningTask ( )
inlineprivate

Definition at line 143 of file CommissioningTask.h.

143 { ; }

Member Function Documentation

◆ book()

void CommissioningTask::book ( )
privatevirtual

Reimplemented in NoiseTask, PedsFullNoiseTask, PedsOnlyTask, CalibrationScanTask, CalibrationTask, FedCablingTask, DaqScopeModeTask, FineDelayTask, LatencyTask, OptoScanTask, PedestalsTask, ApvTimingTask, FedTimingTask, VpspScanTask, and FastFedCablingTask.

Definition at line 126 of file CommissioningTask.cc.

References sistrip::mlDqmSource_.

Referenced by bookHistograms().

126  {
127  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
128  << " No derived implementation exists!";
129 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ bookHistograms()

void CommissioningTask::bookHistograms ( )

Books histograms and constructs HistoSet cache.

Definition at line 175 of file CommissioningTask.cc.

References book(), and booked_.

175  {
176  book();
177  booked_ = true;
178 }

◆ connection()

const FedChannelConnection & CommissioningTask::connection ( ) const
inlineprotected

◆ dqm()

CommissioningTask::DQMStore *const CommissioningTask::dqm ( ) const
inlineprotected

◆ eventSetup() [1/2]

void CommissioningTask::eventSetup ( const edm::EventSetup setup)
inline

Define access to the EventSetup.

Definition at line 194 of file CommissioningTask.h.

References eventSetup_, and singleTopDQM_cfi::setup.

194 { eventSetup_ = setup; }
const edm::EventSetup * eventSetup_

◆ eventSetup() [2/2]

const edm::EventSetup *const CommissioningTask::eventSetup ( ) const
inlineprotected

Access to the EventSetup.

Definition at line 195 of file CommissioningTask.h.

References eventSetup_.

Referenced by NoiseTask::book().

195 { return eventSetup_; }
const edm::EventSetup * eventSetup_

◆ fecKey()

const uint32_t & CommissioningTask::fecKey ( ) const
inlineprotected

Returns FEC key.

Definition at line 191 of file CommissioningTask.h.

References fecKey_.

Referenced by VpspScanTask::fill().

191 { return fecKey_; }

◆ fedKey()

const uint32_t & CommissioningTask::fedKey ( ) const
inlineprotected

◆ fill() [1/4]

void CommissioningTask::fill ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis 
)
privatevirtual

Reimplemented in NoiseTask, PedsFullNoiseTask, PedsOnlyTask, CalibrationScanTask, CalibrationTask, DaqScopeModeTask, FineDelayTask, LatencyTask, OptoScanTask, PedestalsTask, ApvTimingTask, FedTimingTask, VpspScanTask, and FastFedCablingTask.

Definition at line 133 of file CommissioningTask.cc.

References sistrip::mlDqmSource_.

Referenced by fillHistograms().

133  {
134  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
135  << " No derived implementation exists!";
136 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ fill() [2/4]

void CommissioningTask::fill ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis,
const edm::DetSet< SiStripRawDigi > &  digisAlt 
)
privatevirtual

Reimplemented in DaqScopeModeTask.

Definition at line 140 of file CommissioningTask.cc.

References sistrip::mlDqmSource_.

142  {
143  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
144  << " No derived implementation exists!";
145 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ fill() [3/4]

void CommissioningTask::fill ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis,
const edm::DetSet< SiStripRawDigi > &  digisAlt,
const std::vector< uint16_t > &  stripOnCluster 
)
privatevirtual

Reimplemented in DaqScopeModeTask.

Definition at line 149 of file CommissioningTask.cc.

References sistrip::mlDqmSource_.

152  {
153  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
154  << " No derived implementation exists!";
155 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ fill() [4/4]

void CommissioningTask::fill ( const SiStripEventSummary summary,
const uint16_t &  fed_id,
const std::map< uint16_t, float > &  fed_ch 
)
privatevirtual

Reimplemented in FedCablingTask.

Definition at line 159 of file CommissioningTask.cc.

References sistrip::mlDqmSource_.

161  {
162  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
163  << " No derived implementation exists!";
164 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ fillCntr()

const uint32_t & CommissioningTask::fillCntr ( ) const
inline

Get histogram filled counter.

Definition at line 183 of file CommissioningTask.h.

References fillCntr_.

Referenced by DaqScopeModeTask::fill().

183 { return fillCntr_; }

◆ fillHistograms() [1/4]

void CommissioningTask::fillHistograms ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis 
)

Fills HistoSet cache.

Definition at line 182 of file CommissioningTask.cc.

References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, edmLumisInFiles::summary, update(), and updateFreq_.

182  {
183  if (!booked_) {
184  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
185  << " Attempting to fill histos that haven't been booked yet!";
186  return;
187  }
188  fillCntr_++;
189  fill(summary, digis);
190  if (updateFreq_ && !(fillCntr_ % updateFreq_)) {
191  update();
192  }
193 }
static const char mlDqmSource_[]
virtual void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
virtual void update()
Log< level::Warning, false > LogWarning

◆ fillHistograms() [2/4]

void CommissioningTask::fillHistograms ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis,
const edm::DetSet< SiStripRawDigi > &  digisAlt 
)

Fills HistoSet cache.

Definition at line 197 of file CommissioningTask.cc.

References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, edmLumisInFiles::summary, update(), and updateFreq_.

199  {
200  if (!booked_) {
201  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
202  << " Attempting to fill histos that haven't been booked yet!";
203  return;
204  }
205  fillCntr_++;
206  fill(summary, digis, digisAlt);
207  if (updateFreq_ && !(fillCntr_ % updateFreq_)) {
208  update();
209  }
210 }
static const char mlDqmSource_[]
virtual void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
virtual void update()
Log< level::Warning, false > LogWarning

◆ fillHistograms() [3/4]

void CommissioningTask::fillHistograms ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis,
const edm::DetSet< SiStripRawDigi > &  digisAlt,
const std::vector< uint16_t > &  stripOnCluster 
)

Fills HistoSet cache.

Definition at line 214 of file CommissioningTask.cc.

References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, edmLumisInFiles::summary, update(), and updateFreq_.

217  {
218  if (!booked_) {
219  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
220  << " Attempting to fill histos that haven't been booked yet!";
221  return;
222  }
223  fillCntr_++;
224  fill(summary, digis, digisAlt, stripOnCluster);
225  if (updateFreq_ && !(fillCntr_ % updateFreq_)) {
226  update();
227  }
228 }
static const char mlDqmSource_[]
virtual void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
virtual void update()
Log< level::Warning, false > LogWarning

◆ fillHistograms() [4/4]

void CommissioningTask::fillHistograms ( const SiStripEventSummary summary,
const uint16_t &  fed_id,
const std::map< uint16_t, float > &  fed_ch 
)

Fill HistoSet cache for FED cabling (special case).

Definition at line 232 of file CommissioningTask.cc.

References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, edmLumisInFiles::summary, update(), and updateFreq_.

234  {
235  if (!booked_) {
236  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
237  << " Attempting to fill histos that haven't been booked yet!";
238  return;
239  }
240  fillCntr_++;
241  fill(summary, fed_id, fed_ch);
242  if (updateFreq_ && !(fillCntr_ % updateFreq_)) {
243  update();
244  }
245 }
static const char mlDqmSource_[]
virtual void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &)
virtual void update()
Log< level::Warning, false > LogWarning

◆ myName()

const std::string & CommissioningTask::myName ( void  ) const
inline

Returns the name of this commissioning task.

Definition at line 186 of file CommissioningTask.h.

References myName_.

186 { return myName_; }

◆ update()

void CommissioningTask::update ( )
privatevirtual

◆ updateFreq() [1/2]

const uint32_t & CommissioningTask::updateFreq ( ) const
inline

Get histogram update frequency.

Definition at line 184 of file CommissioningTask.h.

References updateFreq_.

Referenced by DaqScopeModeTask::fill().

184 { return updateFreq_; }

◆ updateFreq() [2/2]

void CommissioningTask::updateFreq ( const uint32_t &  freq)
inline

Set histogram update frequency.

Definition at line 185 of file CommissioningTask.h.

References updateFreq_.

185 { updateFreq_ = freq; }

◆ updateHistograms()

void CommissioningTask::updateHistograms ( )

Updates histograms using HistoSet cache.

Definition at line 249 of file CommissioningTask.cc.

References update().

249 { update(); }
virtual void update()

◆ updateHistoSet() [1/7]

void CommissioningTask::updateHistoSet ( HistoSet histo_set,
const uint32_t &  bin,
const float &  value 
)
protected

Updates the vectors of HistoSet.

Definition at line 274 of file CommissioningTask.cc.

References newFWLiteAna::bin, CommissioningTask::HistoSet::explicitFill_, CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, sistrip::mlDqmSource_, relativeConstraints::value, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.

Referenced by FastFedCablingTask::fill(), ApvTimingTask::fill(), FedTimingTask::fill(), VpspScanTask::fill(), OptoScanTask::fill(), PedestalsTask::fill(), FineDelayTask::fill(), LatencyTask::fill(), DaqScopeModeTask::fill(), FedCablingTask::fill(), CalibrationTask::fill(), CalibrationScanTask::fill(), PedsFullNoiseTask::fill(), FastFedCablingTask::update(), ApvTimingTask::update(), VpspScanTask::update(), FedTimingTask::update(), PedestalsTask::update(), OptoScanTask::update(), FineDelayTask::update(), LatencyTask::update(), FedCablingTask::update(), CalibrationScanTask::update(), CalibrationTask::update(), PedsFullNoiseTask::update(), DaqScopeModeTask::update(), NoiseTask::update(), and updateHistoSet().

274  {
275  // Check bin number
276  if (bin >= histo_set.vNumOfEntries_.size() && !histo_set.explicitFill_) {
277  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
278  << " Unexpected bin number " << bin << " when filling histogram of size "
279  << histo_set.vNumOfEntries_.size();
280  return;
281  }
282 
283  // Check if histo is TProfile or not
284  if (!histo_set.isProfile_) {
285  // Set entries
286  if (histo_set.explicitFill_) {
287  float origVal = histo_set.histo()->getBinContent(bin + 1);
288  histo_set.histo()->setBinContent(bin + 1, origVal + value);
289  } else {
290  histo_set.vNumOfEntries_[bin] += value;
291  }
292  } else {
293  // Set entries
294  histo_set.vNumOfEntries_[bin]++;
295 
296  // Check bin number
297  if (bin >= histo_set.vSumOfContents_.size() || bin >= histo_set.vSumOfSquares_.size()) {
298  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
299  << " Unexpected bin when filling histogram: " << bin;
300  return;
301  }
302 
303  // Set sum of contents and squares
304  histo_set.vSumOfContents_[bin] += value;
305  histo_set.vSumOfSquares_[bin] += value * value;
306  }
307 }
static const char mlDqmSource_[]
Definition: value.py:1
Log< level::Warning, false > LogWarning

◆ updateHistoSet() [2/7]

void CommissioningTask::updateHistoSet ( CompactHistoSet histo_set,
const uint32_t &  bin,
const short &  value 
)
protected

Definition at line 311 of file CommissioningTask.cc.

References newFWLiteAna::bin, CommissioningTask::CompactHistoSet::explicitFill_, CommissioningTask::CompactHistoSet::histo(), sistrip::mlDqmSource_, relativeConstraints::value, and CommissioningTask::CompactHistoSet::vNumOfEntries_.

311  {
312  // Check bin number
313  if (bin >= histo_set.vNumOfEntries_.size() && !histo_set.explicitFill_) {
314  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
315  << " Unexpected bin number " << bin << " when filling histogram of size "
316  << histo_set.vNumOfEntries_.size();
317  return;
318  }
319 
320  if (histo_set.explicitFill_) {
321  float origVal = histo_set.histo()->getBinContent(bin + 1);
322  histo_set.histo()->setBinContent(bin + 1, origVal + value);
323  } else {
324  // Set entries
325  histo_set.vNumOfEntries_[bin] += value;
326  }
327 }
static const char mlDqmSource_[]
Definition: value.py:1
Log< level::Warning, false > LogWarning

◆ updateHistoSet() [3/7]

void CommissioningTask::updateHistoSet ( HistoSet histo_set,
const uint32_t &  bin 
)
protected

Updates the vectors of HistoSet.

Definition at line 253 of file CommissioningTask.cc.

References newFWLiteAna::bin, and updateHistoSet().

253  {
254  float value = 1.;
255  updateHistoSet(histo_set, bin, value);
256 }
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: value.py:1

◆ updateHistoSet() [4/7]

void CommissioningTask::updateHistoSet ( CompactHistoSet histo_set,
const uint32_t &  bin 
)
protected

Definition at line 260 of file CommissioningTask.cc.

References newFWLiteAna::bin, and updateHistoSet().

260  {
261  short value = 1;
262  updateHistoSet(histo_set, bin, value);
263 }
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: value.py:1

◆ updateHistoSet() [5/7]

void CommissioningTask::updateHistoSet ( HistoSet histo_set,
const float &  value 
)
protected

Updates the vectors of HistoSet.

Definition at line 267 of file CommissioningTask.cc.

References CommissioningTask::HistoSet::bin(), updateHistoSet(), and mps_merge::weight.

267  {
268  float weight = 1.;
269  updateHistoSet(histo_set, histo_set.bin(value), weight);
270 }
Definition: weight.py:1
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: value.py:1

◆ updateHistoSet() [6/7]

void CommissioningTask::updateHistoSet ( CompactHistoSet histo_set)
protected

Definition at line 362 of file CommissioningTask.cc.

References CommissioningTask::CompactHistoSet::explicitFill_, CommissioningTask::CompactHistoSet::histo(), sistrip::mlDqmSource_, and CommissioningTask::CompactHistoSet::vNumOfEntries_.

362  {
363  // Check if histo exists
364  if (!histo_set.histo()) {
365  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
366  << " NULL pointer to MonitorElement!";
367  return;
368  }
369 
370  if (!histo_set.explicitFill_) {
371  for (uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++) {
372  histo_set.histo()->setBinContent(ibin + 1, histo_set.vNumOfEntries_[ibin]);
373  }
374  }
375 }
static const char mlDqmSource_[]
Log< level::Warning, false > LogWarning

◆ updateHistoSet() [7/7]

void CommissioningTask::updateHistoSet ( HistoSet histo_set)
protected

Updates the MonitorElements of HistoSet.

Definition at line 331 of file CommissioningTask.cc.

References CommissioningTask::HistoSet::explicitFill_, extract(), CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, sistrip::mlDqmSource_, PostProcessor_cff::profile, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.

331  {
332  // Check if histo exists
333  if (!histo_set.histo()) {
334  edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]"
335  << " NULL pointer to MonitorElement!";
336  return;
337  }
338 
339  if (!histo_set.explicitFill_) {
340  if (histo_set.isProfile_) {
341  TProfile* prof = ExtractTObject<TProfile>().extract(histo_set.histo());
342  // if ( prof ) { prof->SetErrorOption("s"); } //@@ necessary?
343  const static UpdateTProfile profile;
344  for (uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++) {
345  profile.setBinContents(prof,
346  ibin + 1,
347  histo_set.vNumOfEntries_[ibin],
348  histo_set.vSumOfContents_[ibin],
349  histo_set.vSumOfSquares_[ibin]);
350  }
351 
352  } else {
353  for (uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++) {
354  histo_set.histo()->setBinContent(ibin + 1, histo_set.vNumOfEntries_[ibin]);
355  }
356  }
357  }
358 }
static const char mlDqmSource_[]
int extract(std::vector< int > *output, const std::string &dati)
Log< level::Warning, false > LogWarning

Member Data Documentation

◆ booked_

bool CommissioningTask::booked_
private

Definition at line 174 of file CommissioningTask.h.

Referenced by bookHistograms(), and fillHistograms().

◆ connection_

FedChannelConnection CommissioningTask::connection_
private

Definition at line 168 of file CommissioningTask.h.

Referenced by CommissioningTask(), connection(), and ~CommissioningTask().

◆ dqm_

DQMStore* CommissioningTask::dqm_
private

Definition at line 162 of file CommissioningTask.h.

Referenced by dqm().

◆ eventSetup_

const edm::EventSetup* CommissioningTask::eventSetup_
private

Definition at line 178 of file CommissioningTask.h.

Referenced by eventSetup().

◆ fecKey_

uint32_t CommissioningTask::fecKey_
private

Definition at line 172 of file CommissioningTask.h.

Referenced by CommissioningTask(), fecKey(), and ~CommissioningTask().

◆ fedKey_

uint32_t CommissioningTask::fedKey_
private

Definition at line 170 of file CommissioningTask.h.

Referenced by CommissioningTask(), fedKey(), and ~CommissioningTask().

◆ fillCntr_

uint32_t CommissioningTask::fillCntr_
private

Definition at line 166 of file CommissioningTask.h.

Referenced by fillCntr(), and fillHistograms().

◆ myName_

std::string CommissioningTask::myName_
private

Definition at line 176 of file CommissioningTask.h.

Referenced by CommissioningTask(), myName(), and ~CommissioningTask().

◆ updateFreq_

uint32_t CommissioningTask::updateFreq_
private

Definition at line 164 of file CommissioningTask.h.

Referenced by fillHistograms(), and updateFreq().