#include <VpspScanTask.h>
Public Member Functions | |
VpspScanTask (DQMStore *, const FedChannelConnection &) | |
virtual | ~VpspScanTask () |
Private Member Functions | |
virtual void | book () |
virtual void | fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) |
virtual void | update () |
Private Attributes | |
std::vector< HistoSet > | vpsp_ |
Definition at line 9 of file VpspScanTask.h.
VpspScanTask::VpspScanTask | ( | DQMStore * | dqm, |
const FedChannelConnection & | conn | ||
) |
Definition at line 13 of file VpspScanTask.cc.
: CommissioningTask( dqm, conn, "VpspScanTask" ), vpsp_() {}
VpspScanTask::~VpspScanTask | ( | ) | [virtual] |
Definition at line 21 of file VpspScanTask.cc.
{ }
void VpspScanTask::book | ( | ) | [private, virtual] |
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, indexGen::title, vpsp_, and sistrip::VPSP_SCAN.
{ uint16_t nbins = 60; std::string title; vpsp_.resize(2); for ( uint16_t iapv = 0; iapv < 2; iapv++ ) { if ( connection().i2cAddr(iapv) ) { std::stringstream extra_info; extra_info << sistrip::apv_ << iapv; title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::VPSP_SCAN, sistrip::FED_KEY, fedKey(), sistrip::LLD_CHAN, connection().lldChannel(), extra_info.str() ).title(); vpsp_[iapv].histo( dqm()->bookProfile( title, title, nbins, -0.5, nbins*1.-0.5, 1025, 0., 1025. ) ); vpsp_[iapv].vNumOfEntries_.resize(nbins,0); vpsp_[iapv].vSumOfContents_.resize(nbins,0); vpsp_[iapv].vSumOfSquares_.resize(nbins,0); } } }
void VpspScanTask::fill | ( | const SiStripEventSummary & | summary, |
const edm::DetSet< SiStripRawDigi > & | digis | ||
) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 62 of file VpspScanTask.cc.
References edm::DetSet< T >::data, CommissioningTask::fecKey(), getHLTprescales::index, sistrip::mlDqmSource_, python::multivaluedict::sort(), summarizeEdmComparisonLogfiles::summary, CommissioningTask::updateHistoSet(), and vpsp_.
{ // Retrieve VPSP setting and CCU channel uint32_t vpsp = const_cast<SiStripEventSummary&>(summary).vpsp(); uint32_t ccu_chan = const_cast<SiStripEventSummary&>(summary).vpspCcuChan(); // Check CCU channel from EventSummary is consistent with this module if ( SiStripFecKey( fecKey() ).ccuChan() != ccu_chan ) { return; } if ( digis.data.size() != 256 ) { edm::LogWarning(mlDqmSource_) << "[VpspScanTask::" << __func__ << "]" << " Unexpected number of digis! " << digis.data.size(); return; } // Fill histo with baseline(calc'ed from median value of data) for ( uint16_t iapv = 0; iapv < 2; iapv++ ) { if ( vpsp >= vpsp_[iapv].vNumOfEntries_.size() ) { edm::LogWarning(mlDqmSource_) << "[VpspScanTask::" << __func__ << "]" << " Unexpected VPSP value! " << vpsp; return; } std::vector<uint16_t> baseline; baseline.reserve(128); for ( uint16_t idigi = 128*iapv; idigi < 128*(iapv+1); idigi++ ) { baseline.push_back( digis.data[idigi].adc() ); } sort( baseline.begin(), baseline.end() ); uint16_t index = baseline.size()%2 ? baseline.size()/2 : baseline.size()/2-1; if ( !baseline.empty() ) { updateHistoSet( vpsp_[iapv], vpsp, baseline[index] ); } } }
void VpspScanTask::update | ( | void | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 108 of file VpspScanTask.cc.
References CommissioningTask::updateHistoSet(), and vpsp_.
{ for ( uint32_t iapv = 0; iapv < vpsp_.size(); iapv++ ) { updateHistoSet( vpsp_[iapv] ); } }
std::vector<HistoSet> VpspScanTask::vpsp_ [private] |
Definition at line 23 of file VpspScanTask.h.