#include <PedsOnlyTask.h>
Public Member Functions | |
PedsOnlyTask (DQMStore *, const FedChannelConnection &) | |
virtual | ~PedsOnlyTask () |
Private Member Functions | |
virtual void | book () |
virtual void | fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) |
virtual void | update () |
Private Attributes | |
ApvAnalysisFactory * | pApvFactory_ |
std::vector< HistoSet > | peds_ |
Definition at line 19 of file PedsOnlyTask.h.
PedsOnlyTask::PedsOnlyTask | ( | DQMStore * | dqm, |
const FedChannelConnection & | rCONN | ||
) |
Definition at line 17 of file PedsOnlyTask.cc.
References LogTrace, sistrip::mlDqmSource_, cmsCodeRules::cppFunctionSkipper::operator, and pApvFactory_.
: CommissioningTask( dqm, rCONN, "PedsOnlyTask") { //@@ NOT GUARANTEED TO BE THREAD SAFE! pApvFactory_ = edm::Service<ApvFactoryService>().operator->()->getApvFactory(); LogTrace( mlDqmSource_) << "[PedsOnlyTask::" << __func__ << "]" << " Constructing object..."; }
PedsOnlyTask::~PedsOnlyTask | ( | ) | [virtual] |
Definition at line 31 of file PedsOnlyTask.cc.
References LogTrace, sistrip::mlDqmSource_, and pApvFactory_.
{ LogTrace( mlDqmSource_) << "[PedsOnlyTask::" << __func__ << "]" << " Destructing object..."; // Have to delete pApvFactory_ manually even though we didn't create it // ourself. :( if( pApvFactory_) { delete pApvFactory_; } }
void PedsOnlyTask::book | ( | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 44 of file PedsOnlyTask.cc.
References CommissioningTask::connection(), CommissioningTask::dqm(), sistrip::EXPERT_HISTO, sistrip::FED_KEY, CommissioningTask::fedKey(), CommissioningTask::HistoSet::histo(), ApvAnalysisFactory::instantiateApvs(), CommissioningTask::HistoSet::isProfile_, sistrip::LLD_CHAN, LogTrace, sistrip::mlDqmSource_, pApvFactory_, sistrip::extrainfo::pedestals_, peds_, sistrip::PEDS_ONLY, sistrip::extrainfo::rawNoise_, SiStripHistoTitle::title(), indexGen::title, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.
{ LogTrace( mlDqmSource_) << "[PedsOnlyTask::" << __func__ << "]"; const uint16_t nBINS = 256; { // Pedestals std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::PEDS_ONLY, sistrip::FED_KEY, fedKey(), sistrip::LLD_CHAN, connection().lldChannel(), sistrip::extrainfo::pedestals_).title(); HistoSet oHSet; oHSet.isProfile_ = true; oHSet.vNumOfEntries_.resize( nBINS, 0); oHSet.vSumOfContents_.resize( nBINS, 0); oHSet.vSumOfSquares_.resize( nBINS, 0); oHSet.histo( dqm()->bookProfile( title, title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.) ); peds_.push_back( oHSet); } { // Raw Noise std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, sistrip::PEDS_ONLY, sistrip::FED_KEY, fedKey(), sistrip::LLD_CHAN, connection().lldChannel(), sistrip::extrainfo::rawNoise_).title(); HistoSet oHSet; oHSet.isProfile_ = true; oHSet.vNumOfEntries_.resize( nBINS, 0); oHSet.vSumOfContents_.resize( nBINS, 0); oHSet.vSumOfSquares_.resize( nBINS, 0); oHSet.histo( dqm()->bookProfile( title, title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.) ); peds_.push_back( oHSet); } pApvFactory_->instantiateApvs( connection().detId(), connection().nApvs()); }
void PedsOnlyTask::fill | ( | const SiStripEventSummary & | rSummary, |
const edm::DetSet< SiStripRawDigi > & | rDigis | ||
) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 104 of file PedsOnlyTask.cc.
References CommissioningTask::connection(), pApvFactory_, and ApvAnalysisFactory::updatePair().
{ pApvFactory_->updatePair( connection().detId(), connection().apvPairNumber(), rDigis); }
void PedsOnlyTask::update | ( | void | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 114 of file PedsOnlyTask.cc.
References FedChannelConnection::apvPairNumber(), CommissioningTask::connection(), extract(), ApvAnalysisFactory::getPedestal(), ApvAnalysisFactory::getRawNoise(), timingPdfMaker::histo, pApvFactory_, peds_, and UpdateTProfile::setBinContent().
{ static UpdateTProfile updateTProfile; TProfile *pedsProf = ExtractTObject<TProfile>().extract( peds_[0].histo() ); TProfile *noiseProf = ExtractTObject<TProfile>().extract( peds_[1].histo() ); for( uint16_t nLclApv = 2 * connection().apvPairNumber(), nMaxLclApv = nLclApv + 2; nMaxLclApv > nLclApv; ++nLclApv) { ApvAnalysis::PedestalType lclPedestals; ApvAnalysis::PedestalType lclNoises; pApvFactory_->getPedestal( connection().detId(), nLclApv, lclPedestals); pApvFactory_->getRawNoise( connection().detId(), nLclApv, lclNoises ); const uint16_t nSTART_BIN = 128 * ( nLclApv % 2); for( uint16_t nBin = 0, nAbsBin = nSTART_BIN + nBin + 1; 128 > nBin; ++nBin, ++nAbsBin) { updateTProfile.setBinContent( pedsProf, nAbsBin, 5, lclPedestals[nBin], lclNoises[nBin]); updateTProfile.setBinContent( noiseProf, nAbsBin, 5, lclNoises[nBin], 0); } // End loop over BINs } // End loop over Local Apvs }
ApvAnalysisFactory* PedsOnlyTask::pApvFactory_ [private] |
Definition at line 33 of file PedsOnlyTask.h.
Referenced by book(), fill(), PedsOnlyTask(), update(), and ~PedsOnlyTask().
std::vector<HistoSet> PedsOnlyTask::peds_ [private] |
Definition at line 31 of file PedsOnlyTask.h.