#include <DQM/SiStripCommissioningSources/interface/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_, and pApvFactory_.
00019 : CommissioningTask( dqm, rCONN, "PedsOnlyTask") 00020 { 00021 //@@ NOT GUARANTEED TO BE THREAD SAFE! 00022 pApvFactory_ = edm::Service<ApvFactoryService>().operator->()->getApvFactory(); 00023 00024 LogTrace( mlDqmSource_) 00025 << "[PedsOnlyTask::" << __func__ << "]" 00026 << " Constructing object..."; 00027 }
PedsOnlyTask::~PedsOnlyTask | ( | ) | [virtual] |
Definition at line 31 of file PedsOnlyTask.cc.
References LogTrace, sistrip::mlDqmSource_, and pApvFactory_.
00032 { 00033 LogTrace( mlDqmSource_) 00034 << "[PedsOnlyTask::" << __func__ << "]" 00035 << " Destructing object..."; 00036 00037 // Have to delete pApvFactory_ manually even though we didn't create it 00038 // ourself. :( 00039 if( pApvFactory_) { delete pApvFactory_; } 00040 }
void PedsOnlyTask::book | ( | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 44 of file PedsOnlyTask.cc.
References CommissioningTask::connection(), detId, 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_, indexGen::title, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.
00045 { 00046 LogTrace( mlDqmSource_) << "[PedsOnlyTask::" << __func__ << "]"; 00047 00048 const uint16_t nBINS = 256; 00049 00050 { 00051 // Pedestals 00052 std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, 00053 sistrip::PEDS_ONLY, 00054 sistrip::FED_KEY, 00055 fedKey(), 00056 sistrip::LLD_CHAN, 00057 connection().lldChannel(), 00058 sistrip::extrainfo::pedestals_).title(); 00059 00060 HistoSet oHSet; 00061 oHSet.isProfile_ = true; 00062 00063 oHSet.vNumOfEntries_.resize( nBINS, 0); 00064 oHSet.vSumOfContents_.resize( nBINS, 0); 00065 oHSet.vSumOfSquares_.resize( nBINS, 0); 00066 00067 oHSet.histo( dqm()->bookProfile( title, title, 00068 nBINS, -0.5, nBINS * 1. - 0.5, 00069 1025, 0., 1025.) ); 00070 00071 peds_.push_back( oHSet); 00072 } 00073 00074 { 00075 // Raw Noise 00076 std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, 00077 sistrip::PEDS_ONLY, 00078 sistrip::FED_KEY, 00079 fedKey(), 00080 sistrip::LLD_CHAN, 00081 connection().lldChannel(), 00082 sistrip::extrainfo::rawNoise_).title(); 00083 00084 HistoSet oHSet; 00085 oHSet.isProfile_ = true; 00086 00087 oHSet.vNumOfEntries_.resize( nBINS, 0); 00088 oHSet.vSumOfContents_.resize( nBINS, 0); 00089 oHSet.vSumOfSquares_.resize( nBINS, 0); 00090 00091 oHSet.histo( dqm()->bookProfile( title, title, 00092 nBINS, -0.5, nBINS * 1. - 0.5, 00093 1025, 0., 1025.) ); 00094 00095 peds_.push_back( oHSet); 00096 } 00097 00098 pApvFactory_->instantiateApvs( connection().detId(), 00099 connection().nApvs()); 00100 }
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(), detId, pApvFactory_, and ApvAnalysisFactory::updatePair().
00106 { 00107 pApvFactory_->updatePair( connection().detId(), 00108 connection().apvPairNumber(), 00109 rDigis); 00110 }
void PedsOnlyTask::update | ( | ) | [private, virtual] |
Reimplemented from CommissioningTask.
Definition at line 114 of file PedsOnlyTask.cc.
References FedChannelConnection::apvPairNumber(), CommissioningTask::connection(), detId, extract(), ApvAnalysisFactory::getPedestal(), ApvAnalysisFactory::getRawNoise(), histo, pApvFactory_, peds_, and UpdateTProfile::setBinContent().
00115 { 00116 static UpdateTProfile updateTProfile; 00117 00118 TProfile *pedsProf = ExtractTObject<TProfile>().extract( peds_[0].histo() ); 00119 TProfile *noiseProf = ExtractTObject<TProfile>().extract( peds_[1].histo() ); 00120 00121 for( uint16_t nLclApv = 2 * connection().apvPairNumber(), 00122 nMaxLclApv = nLclApv + 2; 00123 nMaxLclApv > nLclApv; 00124 ++nLclApv) 00125 { 00126 ApvAnalysis::PedestalType lclPedestals; 00127 ApvAnalysis::PedestalType lclNoises; 00128 00129 pApvFactory_->getPedestal( connection().detId(), nLclApv, lclPedestals); 00130 pApvFactory_->getRawNoise( connection().detId(), nLclApv, lclNoises ); 00131 00132 const uint16_t nSTART_BIN = 128 * ( nLclApv % 2); 00133 00134 for( uint16_t nBin = 0, 00135 nAbsBin = nSTART_BIN + nBin + 1; 00136 128 > nBin; 00137 ++nBin, ++nAbsBin) 00138 { 00139 updateTProfile.setBinContent( pedsProf, nAbsBin, 5, 00140 lclPedestals[nBin], lclNoises[nBin]); 00141 updateTProfile.setBinContent( noiseProf, nAbsBin, 5, 00142 lclNoises[nBin], 0); 00143 } // End loop over BINs 00144 } // End loop over Local Apvs 00145 }
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] |