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 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

- 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 (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 &)
 

Detailed Description

Definition at line 9 of file VpspScanTask.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file VpspScanTask.cc.

14  :
15  CommissioningTask( dqm, conn, "VpspScanTask" ),
16  vpsp_()
17 {}
std::vector< HistoSet > vpsp_
Definition: VpspScanTask.h:23
VpspScanTask::~VpspScanTask ( )
override

Definition at line 21 of file VpspScanTask.cc.

21  {
22 }

Member Function Documentation

void VpspScanTask::book ( )
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 26 of file VpspScanTask.cc.

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

26  {
27 
28  uint16_t nbins = 60;
29 
31 
32  vpsp_.resize(2);
33  for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
34  if ( connection().i2cAddr(iapv) ) {
35 
36  std::stringstream extra_info;
37  extra_info << sistrip::apv_ << iapv;
38 
42  fedKey(),
44  connection().lldChannel(),
45  extra_info.str() ).title();
46 
47  vpsp_[iapv].histo( dqm()->bookProfile( title, title,
48  nbins, -0.5, nbins*1.-0.5,
49  1025, 0., 1025. ) );
50 
51  vpsp_[iapv].vNumOfEntries_.resize(nbins,0);
52  vpsp_[iapv].vSumOfContents_.resize(nbins,0);
53  vpsp_[iapv].vSumOfSquares_.resize(nbins,0);
54 
55  }
56  }
57 
58 }
Utility class that holds histogram title.
std::vector< HistoSet > vpsp_
Definition: VpspScanTask.h:23
static const char apv_[]
DQMStore *const dqm() const
const uint32_t & fedKey() const
const FedChannelConnection & connection() const
void VpspScanTask::fill ( const SiStripEventSummary summary,
const edm::DetSet< SiStripRawDigi > &  digis 
)
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 62 of file VpspScanTask.cc.

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

63  {
64 
65  // Retrieve VPSP setting and CCU channel
66  uint32_t vpsp = const_cast<SiStripEventSummary&>(summary).vpsp();
67  uint32_t ccu_chan = const_cast<SiStripEventSummary&>(summary).vpspCcuChan();
68 
69  // Check CCU channel from EventSummary is consistent with this module
70  if ( SiStripFecKey( fecKey() ).ccuChan() != ccu_chan ) { return; }
71 
72  if ( digis.data.size() != 256 ) {
74  << "[VpspScanTask::" << __func__ << "]"
75  << " Unexpected number of digis! "
76  << digis.data.size();
77  return;
78  }
79 
80  // Fill histo with baseline(calc'ed from median value of data)
81  for ( uint16_t iapv = 0; iapv < 2; iapv++ ) {
82 
83  if ( vpsp >= vpsp_[iapv].vNumOfEntries_.size() ) {
85  << "[VpspScanTask::" << __func__ << "]"
86  << " Unexpected VPSP value! " << vpsp;
87  return;
88  }
89 
90  std::vector<uint16_t> baseline;
91  baseline.reserve(128);
92  for ( uint16_t idigi = 128*iapv; idigi < 128*(iapv+1); idigi++ ) {
93  baseline.push_back( digis.data[idigi].adc() );
94  }
95  sort( baseline.begin(), baseline.end() );
96  uint16_t index = baseline.size()%2 ? baseline.size()/2 : baseline.size()/2-1;
97 
98  if ( !baseline.empty() ) {
99  updateHistoSet( vpsp_[iapv], vpsp, baseline[index] );
100  }
101 
102  }
103 
104 }
std::vector< HistoSet > vpsp_
Definition: VpspScanTask.h:23
static const char mlDqmSource_[]
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
collection_type data
Definition: DetSet.h:78
const uint32_t & fecKey() const
void VpspScanTask::update ( )
overrideprivatevirtual

Reimplemented from CommissioningTask.

Definition at line 108 of file VpspScanTask.cc.

References CommissioningTask::updateHistoSet(), and vpsp_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

108  {
109  for ( uint32_t iapv = 0; iapv < vpsp_.size(); iapv++ ) {
110  updateHistoSet( vpsp_[iapv] );
111  }
112 }
std::vector< HistoSet > vpsp_
Definition: VpspScanTask.h:23
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)

Member Data Documentation

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

Definition at line 23 of file VpspScanTask.h.

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