CMS 3D CMS Logo

FedCablingTask.cc
Go to the documentation of this file.
6 #include <algorithm>
7 #include <sstream>
8 #include <iomanip>
9 
10 using namespace sistrip;
11 
12 // -----------------------------------------------------------------------------
13 //
15  : CommissioningTask(dqm, conn, "FedCablingTask"), histos_() {}
16 
17 // -----------------------------------------------------------------------------
18 //
20 
21 // -----------------------------------------------------------------------------
22 //
24  histos_.resize(2);
25 
27  uint16_t nbins = 0;
28  std::string extra_info = "";
29  for (uint16_t iter = 0; iter < 2; iter++) {
30  // Define number of histo bins and title
31  if (iter == 0) {
32  nbins = 1024;
33  extra_info = sistrip::feDriver_;
34  } else if (iter == 1) {
35  nbins = 96;
36  extra_info = sistrip::fedChannel_;
37  } else {
38  edm::LogWarning(mlDqmSource_) << "[FedCablingTask::" << __func__ << "]"
39  << " Unexpected number of HistoSets: " << iter;
40  }
41 
45  fedKey(),
47  connection().lldChannel(),
48  extra_info)
49  .title();
50 
51  histos_[iter].histo(dqm()->bookProfile(title, title, nbins, -0.5, nbins * 1. - 0.5, 1025, 0., 1025.));
52 
53  histos_[iter].vNumOfEntries_.resize(nbins, 0);
54  histos_[iter].vSumOfContents_.resize(nbins, 0);
55  histos_[iter].vSumOfSquares_.resize(nbins, 0);
56  }
57 }
58 
59 // -----------------------------------------------------------------------------
60 //
62  const uint16_t& fed_id,
63  const std::map<uint16_t, float>& fed_ch) {
64  if (fed_ch.empty()) {
65  edm::LogWarning(mlDqmSource_) << "[FedCablingTask::" << __func__ << "]"
66  << " No FED channels with high signal!";
67  return;
68  } else {
69  LogTrace(mlDqmSource_) << "[FedCablingTask::" << __func__ << "]"
70  << " Found " << fed_ch.size() << " FED channels with high signal!";
71  }
72 
73  std::map<uint16_t, float>::const_iterator ichan = fed_ch.begin();
74  for (; ichan != fed_ch.end(); ichan++) {
75  updateHistoSet(histos_[0], fed_id, ichan->second);
76  updateHistoSet(histos_[1], ichan->first, ichan->second);
77  }
78 }
79 
80 // -----------------------------------------------------------------------------
81 //
83  for (uint32_t iter = 0; iter < histos_.size(); iter++) {
84  updateHistoSet(histos_[iter]);
85  }
86 }
sistrip::mlDqmSource_
static const char mlDqmSource_[]
Definition: ConstantsForLogger.h:20
FedCablingTask::book
void book() override
Definition: FedCablingTask.cc:23
MessageLogger.h
FedCablingTask::fill
void fill(const SiStripEventSummary &, const uint16_t &fed_id, const std::map< uint16_t, float > &fed_ch) override
Definition: FedCablingTask.cc:61
FedCablingTask::histos_
std::vector< HistoSet > histos_
Definition: FedCablingTask.h:25
CommissioningTask::connection
const FedChannelConnection & connection() const
Definition: CommissioningTask.h:189
FedCablingTask::~FedCablingTask
~FedCablingTask() override
Definition: FedCablingTask.cc:19
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
DQMStore.h
CommissioningTask
Definition: CommissioningTask.h:24
CommissioningTask::fedKey
const uint32_t & fedKey() const
Definition: CommissioningTask.h:192
sistrip::FED_CABLING
Definition: ConstantsForRunType.h:81
dqm::legacy::DQMStore
Definition: DQMStore.h:727
sistrip::fedChannel_
static const char fedChannel_[]
Definition: ConstantsForGranularity.h:48
FedCablingTask.h
FedCablingTask::FedCablingTask
FedCablingTask(DQMStore *, const FedChannelConnection &)
Definition: FedCablingTask.cc:14
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
FedChannelConnection
Class containning control, module, detector and connection information, at the level of a FED channel...
Definition: FedChannelConnection.h:26
SiStripConstants.h
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
CommissioningTask::updateHistoSet
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: CommissioningTask.cc:274
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
CommissioningTask::dqm
DQMStore *const dqm() const
Definition: CommissioningTask.h:188
SiStripHistoTitle.h
SiStripHistoTitle::title
const std::string & title() const
Definition: SiStripHistoTitle.h:109
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
dqm
Definition: DQMStore.h:18
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
SiStripEventSummary
Definition: SiStripEventSummary.h:22
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78
sistrip::feDriver_
static const char feDriver_[]
Definition: ConstantsForGranularity.h:44
FedCablingTask::update
void update() override
Definition: FedCablingTask.cc:82