CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
VpspScanTask Class Reference

#include <VpspScanTask.h>

Inheritance diagram for VpspScanTask:
CommissioningTask

Public Member Functions

 VpspScanTask (DQMStore *, const FedChannelConnection &)
 
 ~VpspScanTask () override
 
- Public Member Functions inherited from CommissioningTask
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 ()
 

Private Member Functions

void book () override
 
void fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
 
void update () override
 

Private Attributes

std::vector< HistoSetvpsp_
 

Additional Inherited Members

- Public Types inherited from CommissioningTask
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from CommissioningTask
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 (CompactHistoSet &)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin)
 
void updateHistoSet (CompactHistoSet &, const uint32_t &bin, const short &value)
 
void updateHistoSet (HistoSet &)
 
void updateHistoSet (HistoSet &, const float &value)
 
void updateHistoSet (HistoSet &, const uint32_t &bin)
 
void updateHistoSet (HistoSet &, const uint32_t &bin, const float &value)
 

Detailed Description

Definition at line 9 of file VpspScanTask.h.

Constructor & Destructor Documentation

◆ VpspScanTask()

VpspScanTask::VpspScanTask ( DQMStore dqm,
const FedChannelConnection conn 
)

Definition at line 13 of file VpspScanTask.cc.

14  : CommissioningTask(dqm, conn, "VpspScanTask"), vpsp_() {}

◆ ~VpspScanTask()

VpspScanTask::~VpspScanTask ( )
override

Definition at line 18 of file VpspScanTask.cc.

18 {}

Member Function Documentation

◆ book()

void VpspScanTask::book ( )
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 22 of file VpspScanTask.cc.

22  {
23  uint16_t nbins = 60;
24 
26 
27  vpsp_.resize(2);
28  for (uint16_t iapv = 0; iapv < 2; iapv++) {
29  if (connection().i2cAddr(iapv)) {
30  std::stringstream extra_info;
31  extra_info << sistrip::apv_ << iapv;
32 
36  fedKey(),
38  connection().lldChannel(),
39  extra_info.str())
40  .title();
41 
42  vpsp_[iapv].histo(dqm()->bookProfile(title, title, nbins, -0.5, nbins * 1. - 0.5, 1025, 0., 1025.));
43 
44  vpsp_[iapv].vNumOfEntries_.resize(nbins, 0);
45  vpsp_[iapv].vSumOfContents_.resize(nbins, 0);
46  vpsp_[iapv].vSumOfSquares_.resize(nbins, 0);
47  }
48  }
49 }

References sistrip::apv_, CommissioningTask::connection(), CommissioningTask::dqm(), sistrip::EXPERT_HISTO, sistrip::FED_KEY, CommissioningTask::fedKey(), sistrip::LLD_CHAN, LaserClient_cfi::nbins, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, vpsp_, and sistrip::VPSP_SCAN.

◆ fill()

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

Reimplemented from CommissioningTask.

Definition at line 53 of file VpspScanTask.cc.

53  {
54  // Retrieve VPSP setting and CCU channel
55  uint32_t vpsp = summary.vpsp();
56  uint32_t ccu_chan = summary.vpspCcuChan();
57 
58  // Check CCU channel from EventSummary is consistent with this module
59  if (SiStripFecKey(fecKey()).ccuChan() != ccu_chan) {
60  return;
61  }
62 
63  if (digis.data.size() != 256) {
64  edm::LogWarning(mlDqmSource_) << "[VpspScanTask::" << __func__ << "]"
65  << " Unexpected number of digis! " << digis.data.size();
66  return;
67  }
68 
69  // Fill histo with baseline(calc'ed from median value of data)
70  for (uint16_t iapv = 0; iapv < 2; iapv++) {
71  if (vpsp >= vpsp_[iapv].vNumOfEntries_.size()) {
72  edm::LogWarning(mlDqmSource_) << "[VpspScanTask::" << __func__ << "]"
73  << " Unexpected VPSP value! " << vpsp;
74  return;
75  }
76 
77  std::vector<uint16_t> baseline;
78  baseline.reserve(128);
79  for (uint16_t idigi = 128 * iapv; idigi < 128 * (iapv + 1); idigi++) {
80  baseline.push_back(digis.data[idigi].adc());
81  }
82  sort(baseline.begin(), baseline.end());
83  uint16_t index = baseline.size() % 2 ? baseline.size() / 2 : baseline.size() / 2 - 1;
84 
85  if (!baseline.empty()) {
86  updateHistoSet(vpsp_[iapv], vpsp, baseline[index]);
87  }
88  }
89 }

References edm::DetSet< T >::data, CommissioningTask::fecKey(), sistrip::mlDqmSource_, edmLumisInFiles::summary, CommissioningTask::updateHistoSet(), and vpsp_.

◆ update()

void VpspScanTask::update ( )
overrideprivatevirtual

Member Data Documentation

◆ vpsp_

std::vector<HistoSet> VpspScanTask::vpsp_
private

Definition at line 19 of file VpspScanTask.h.

Referenced by book(), fill(), and update().

sistrip::mlDqmSource_
static const char mlDqmSource_[]
Definition: ConstantsForLogger.h:20
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
sistrip::VPSP_SCAN
Definition: ConstantsForRunType.h:82
CommissioningTask::connection
const FedChannelConnection & connection() const
Definition: CommissioningTask.h:189
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CommissioningTask::fedKey
const uint32_t & fedKey() const
Definition: CommissioningTask.h:192
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
CommissioningTask::CommissioningTask
CommissioningTask()
Definition: CommissioningTask.h:143
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
CommissioningTask::updateHistoSet
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Definition: CommissioningTask.cc:274
VpspScanTask::vpsp_
std::vector< HistoSet > vpsp_
Definition: VpspScanTask.h:19
sistrip::apv_
static const char apv_[]
Definition: ConstantsForGranularity.h:40
CommissioningTask::dqm
DQMStore *const dqm() const
Definition: CommissioningTask.h:188
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
dqm
Definition: DQMStore.h:18
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
CommissioningTask::fecKey
const uint32_t & fecKey() const
Definition: CommissioningTask.h:191
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78