#include <CommissioningTask.h>
Classes | |
class | CompactHistoSet |
class | HistoSet |
Public Member Functions | |
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 () |
Protected Member Functions | |
const FedChannelConnection & | connection () const |
DQMStore *const | dqm () const |
const edm::EventSetup *const | eventSetup () const |
const uint32_t & | fecKey () const |
const uint32_t & | fedKey () const |
void | updateHistoSet (CompactHistoSet &, const uint32_t &bin) |
void | updateHistoSet (HistoSet &) |
void | updateHistoSet (HistoSet &, const uint32_t &bin) |
void | updateHistoSet (HistoSet &, const float &value) |
void | updateHistoSet (HistoSet &, const uint32_t &bin, const float &value) |
void | updateHistoSet (CompactHistoSet &) |
void | updateHistoSet (CompactHistoSet &, const uint32_t &bin, const short &value) |
Private Member Functions | |
virtual void | book () |
CommissioningTask () | |
virtual void | fill (const SiStripEventSummary &, const uint16_t &fed_id, const std::map< uint16_t, float > &fed_ch) |
virtual void | fill (const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) |
virtual void | update () |
Private Attributes | |
bool | booked_ |
FedChannelConnection | connection_ |
DQMStore * | dqm_ |
const edm::EventSetup * | eventSetup_ |
uint32_t | fecKey_ |
uint32_t | fedKey_ |
uint32_t | fillCntr_ |
std::string | myName_ |
uint32_t | updateFreq_ |
Definition at line 21 of file CommissioningTask.h.
CommissioningTask::CommissioningTask | ( | DQMStore * | dqm, |
const FedChannelConnection & | conn, | ||
const std::string & | my_name | ||
) |
Definition at line 17 of file CommissioningTask.cc.
References FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), connection_, FedChannelConnection::fecCrate(), SiStripFedKey::feChan(), fecKey_, FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), FedChannelConnection::fedId(), fedKey_, SiStripFedKey::feUnit(), combine::key, FedChannelConnection::lldChannel(), LogTrace, sistrip::mlDqmSource_, and myName_.
: dqm_(dqm), updateFreq_(0), fillCntr_(0), connection_(conn), fedKey_(0), fecKey_(0), booked_(false), myName_(my_name), eventSetup_(0) { uint16_t fed_ch = connection_.fedCh(); fedKey_ = SiStripFedKey( connection_.fedId(), SiStripFedKey::feUnit(fed_ch), SiStripFedKey::feChan(fed_ch) ).key(); fecKey_ = SiStripFecKey( connection_.fecCrate(), connection_.fecSlot(), connection_.fecRing(), connection_.ccuAddr(), connection_.ccuChan(), connection_.lldChannel() ).key(); LogTrace(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Constructing '" << myName_ << "' object for FecKey/FedKey: " << "0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey_ << std::dec << "/" << "0x" << std::hex << std::setw(8) << std::setfill('0') << fedKey_ << std::dec << " and Crate/FEC/ring/CCU/module/LLDchan: " << connection_.fecCrate() << "/" << connection_.fecSlot() << "/" << connection_.fecRing() << "/" << connection_.ccuAddr() << "/" << connection_.ccuChan() << "/" << connection_.lldChannel() << " and FedId/Ch: " << connection_.fedId() << "/" << connection_.fedCh(); }
CommissioningTask::~CommissioningTask | ( | ) | [virtual] |
Definition at line 62 of file CommissioningTask.cc.
References FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), connection_, FedChannelConnection::fecCrate(), fecKey_, FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), FedChannelConnection::fedId(), fedKey_, FedChannelConnection::lldChannel(), LogTrace, sistrip::mlDqmSource_, and myName_.
{ LogTrace(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Destructing object for FED id/ch " << " Constructing '" << myName_ << "' object for FecKey/FedKey: " << "0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey_ << std::dec << "/" << "0x" << std::hex << std::setw(8) << std::setfill('0') << fedKey_ << std::dec << " and Crate/FEC/ring/CCU/module/LLDchan: " << connection_.fecCrate() << "/" << connection_.fecSlot() << "/" << connection_.fecRing() << "/" << connection_.ccuAddr() << "/" << connection_.ccuChan() << "/" << connection_.lldChannel() << " and FedId/Ch: " << connection_.fedId() << "/" << connection_.fedCh(); //@@ do not delete EventSetup pointer! }
CommissioningTask::CommissioningTask | ( | ) | [inline, private] |
Definition at line 134 of file CommissioningTask.h.
{;}
void CommissioningTask::book | ( | ) | [private, virtual] |
Reimplemented in ApvTimingTask, CalibrationScanTask, CalibrationTask, DaqScopeModeTask, FastFedCablingTask, FedCablingTask, FedTimingTask, FineDelayTask, LatencyTask, NoiseTask, OptoScanTask, PedestalsTask, PedsFullNoiseTask, PedsOnlyTask, and VpspScanTask.
Definition at line 144 of file CommissioningTask.cc.
References sistrip::mlDqmSource_.
Referenced by bookHistograms().
{ edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " No derived implementation exists!"; }
void CommissioningTask::bookHistograms | ( | ) |
const FedChannelConnection & CommissioningTask::connection | ( | ) | const [inline, protected] |
Definition at line 177 of file CommissioningTask.h.
References connection_.
Referenced by FedTimingTask::book(), DaqScopeModeTask::book(), CalibrationTask::book(), OptoScanTask::book(), LatencyTask::book(), PedestalsTask::book(), CalibrationScanTask::book(), VpspScanTask::book(), PedsOnlyTask::book(), NoiseTask::book(), FastFedCablingTask::book(), ApvTimingTask::book(), FedCablingTask::book(), PedsFullNoiseTask::book(), CalibrationTask::checkAndSave(), CalibrationScanTask::checkAndSave(), PedsOnlyTask::fill(), NoiseTask::fill(), PedsOnlyTask::update(), and NoiseTask::update().
{ return connection_; }
DQMStore *const CommissioningTask::dqm | ( | ) | const [inline, protected] |
Returns const pointer to DQM back-end interface object.
Definition at line 176 of file CommissioningTask.h.
References dqm_.
Referenced by FedTimingTask::book(), FineDelayTask::book(), CalibrationTask::book(), DaqScopeModeTask::book(), OptoScanTask::book(), LatencyTask::book(), PedestalsTask::book(), CalibrationScanTask::book(), PedsOnlyTask::book(), VpspScanTask::book(), NoiseTask::book(), FastFedCablingTask::book(), ApvTimingTask::book(), FedCablingTask::book(), PedsFullNoiseTask::book(), CalibrationTask::checkAndSave(), and CalibrationScanTask::checkAndSave().
{ return dqm_; }
void CommissioningTask::eventSetup | ( | const edm::EventSetup * | setup | ) | [inline] |
Define access to the EventSetup.
Definition at line 182 of file CommissioningTask.h.
References eventSetup_.
{ eventSetup_ = setup; }
const edm::EventSetup *const CommissioningTask::eventSetup | ( | ) | const [inline, protected] |
Access to the EventSetup.
Definition at line 183 of file CommissioningTask.h.
References eventSetup_.
Referenced by NoiseTask::book().
{ return eventSetup_; }
const uint32_t & CommissioningTask::fecKey | ( | ) | const [inline, protected] |
Returns FEC key.
Definition at line 179 of file CommissioningTask.h.
References fecKey_.
Referenced by VpspScanTask::fill().
{ return fecKey_; }
const uint32_t & CommissioningTask::fedKey | ( | ) | const [inline, protected] |
Returns FED key.
Definition at line 180 of file CommissioningTask.h.
References fedKey_.
Referenced by FedTimingTask::book(), DaqScopeModeTask::book(), OptoScanTask::book(), PedestalsTask::book(), PedsOnlyTask::book(), VpspScanTask::book(), NoiseTask::book(), FastFedCablingTask::book(), ApvTimingTask::book(), FedCablingTask::book(), and PedsFullNoiseTask::book().
{ return fedKey_; }
void CommissioningTask::fill | ( | const SiStripEventSummary & | summary, |
const edm::DetSet< SiStripRawDigi > & | digis | ||
) | [private, virtual] |
Reimplemented in ApvTimingTask, CalibrationScanTask, CalibrationTask, DaqScopeModeTask, FastFedCablingTask, FedTimingTask, FineDelayTask, LatencyTask, NoiseTask, OptoScanTask, PedestalsTask, PedsFullNoiseTask, PedsOnlyTask, and VpspScanTask.
Definition at line 152 of file CommissioningTask.cc.
References sistrip::mlDqmSource_.
Referenced by fillHistograms().
{ edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " No derived implementation exists!"; }
void CommissioningTask::fill | ( | const SiStripEventSummary & | summary, |
const uint16_t & | fed_id, | ||
const std::map< uint16_t, float > & | fed_ch | ||
) | [private, virtual] |
Reimplemented in FedCablingTask.
Definition at line 161 of file CommissioningTask.cc.
References sistrip::mlDqmSource_.
{ edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " No derived implementation exists!"; }
const uint32_t & CommissioningTask::fillCntr | ( | ) | const [inline] |
Get histogram filled counter.
Definition at line 171 of file CommissioningTask.h.
References fillCntr_.
Referenced by DaqScopeModeTask::fill().
{ return fillCntr_; }
void CommissioningTask::fillHistograms | ( | const SiStripEventSummary & | summary, |
const edm::DetSet< SiStripRawDigi > & | digis | ||
) |
Fills HistoSet cache.
Definition at line 186 of file CommissioningTask.cc.
References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, update(), and updateFreq_.
{ if ( !booked_ ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Attempting to fill histos that haven't been booked yet!"; return; } fillCntr_++; fill( summary, digis ); if ( updateFreq_ && !(fillCntr_%updateFreq_) ) { update(); } }
void CommissioningTask::fillHistograms | ( | const SiStripEventSummary & | summary, |
const uint16_t & | fed_id, | ||
const std::map< uint16_t, float > & | fed_ch | ||
) |
Fill HistoSet cache for FED cabling (special case).
Definition at line 204 of file CommissioningTask.cc.
References booked_, fill(), fillCntr_, sistrip::mlDqmSource_, update(), and updateFreq_.
{ if ( !booked_ ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Attempting to fill histos that haven't been booked yet!"; return; } fillCntr_++; fill( summary, fed_id, fed_ch ); if ( updateFreq_ && !(fillCntr_%updateFreq_) ) { update(); } }
const std::string & CommissioningTask::myName | ( | void | ) | const [inline] |
Returns the name of this commissioning task.
Definition at line 174 of file CommissioningTask.h.
References myName_.
{ return myName_; }
void CommissioningTask::update | ( | void | ) | [private, virtual] |
Reimplemented in ApvTimingTask, CalibrationScanTask, CalibrationTask, DaqScopeModeTask, FastFedCablingTask, FedCablingTask, FedTimingTask, FineDelayTask, LatencyTask, NoiseTask, OptoScanTask, PedestalsTask, PedsFullNoiseTask, PedsOnlyTask, and VpspScanTask.
Definition at line 171 of file CommissioningTask.cc.
References sistrip::mlDqmSource_.
Referenced by fillHistograms(), and updateHistograms().
{ edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " No derived implementation exists!"; }
const uint32_t & CommissioningTask::updateFreq | ( | ) | const [inline] |
Get histogram update frequency.
Definition at line 172 of file CommissioningTask.h.
References updateFreq_.
Referenced by DaqScopeModeTask::fill().
{ return updateFreq_; }
void CommissioningTask::updateFreq | ( | const uint32_t & | freq | ) | [inline] |
Set histogram update frequency.
Definition at line 173 of file CommissioningTask.h.
References updateFreq_.
{ updateFreq_ = freq; }
void CommissioningTask::updateHistograms | ( | ) |
Updates histograms using HistoSet cache.
Definition at line 223 of file CommissioningTask.cc.
References update().
{ update(); }
void CommissioningTask::updateHistoSet | ( | CompactHistoSet & | histo_set, |
const uint32_t & | bin | ||
) | [protected] |
Definition at line 237 of file CommissioningTask.cc.
References updateHistoSet(), and relativeConstraints::value.
{ short value = 1; updateHistoSet( histo_set, bin, value ); }
void CommissioningTask::updateHistoSet | ( | CompactHistoSet & | histo_set, |
const uint32_t & | bin, | ||
const short & | value | ||
) | [protected] |
Definition at line 297 of file CommissioningTask.cc.
References newFWLiteAna::bin, CommissioningTask::CompactHistoSet::explicitFill_, CommissioningTask::CompactHistoSet::histo(), sistrip::mlDqmSource_, relativeConstraints::value, and CommissioningTask::CompactHistoSet::vNumOfEntries_.
{ // Check bin number if ( bin >= histo_set.vNumOfEntries_.size() && !histo_set.explicitFill_ ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Unexpected bin number " << bin << " when filling histogram of size " << histo_set.vNumOfEntries_.size(); return; } if (histo_set.explicitFill_) { float origVal = histo_set.histo()->getBinContent( bin+1 ); histo_set.histo()->setBinContent( bin+1, origVal + value ); } else { // Set entries histo_set.vNumOfEntries_[bin] += value; } }
void CommissioningTask::updateHistoSet | ( | HistoSet & | histo_set, |
const float & | value | ||
) | [protected] |
Updates the vectors of HistoSet.
Definition at line 245 of file CommissioningTask.cc.
References CommissioningTask::HistoSet::bin(), updateHistoSet(), and CommonMethods::weight().
{ float weight = 1.; updateHistoSet( histo_set, histo_set.bin(value), weight ); }
void CommissioningTask::updateHistoSet | ( | HistoSet & | histo_set | ) | [protected] |
Updates the MonitorElements of HistoSet.
Definition at line 322 of file CommissioningTask.cc.
References CommissioningTask::HistoSet::explicitFill_, extract(), CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, sistrip::mlDqmSource_, profilereader::profile, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.
{ // Check if histo exists if ( !histo_set.histo() ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " NULL pointer to MonitorElement!"; return; } if (!histo_set.explicitFill_) { if ( histo_set.isProfile_ ) { TProfile* prof = ExtractTObject<TProfile>().extract( histo_set.histo() ); // if ( prof ) { prof->SetErrorOption("s"); } //@@ necessary? static UpdateTProfile profile; for ( uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++ ) { profile.setBinContents( prof, ibin+1, histo_set.vNumOfEntries_[ibin], histo_set.vSumOfContents_[ibin], histo_set.vSumOfSquares_[ibin] ); } } else { for ( uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++ ) { histo_set.histo()->setBinContent( ibin+1, histo_set.vNumOfEntries_[ibin] ); } } } }
void CommissioningTask::updateHistoSet | ( | HistoSet & | histo_set, |
const uint32_t & | bin, | ||
const float & | value | ||
) | [protected] |
Updates the vectors of HistoSet.
Definition at line 253 of file CommissioningTask.cc.
References newFWLiteAna::bin, CommissioningTask::HistoSet::explicitFill_, CommissioningTask::HistoSet::histo(), CommissioningTask::HistoSet::isProfile_, sistrip::mlDqmSource_, relativeConstraints::value, CommissioningTask::HistoSet::vNumOfEntries_, CommissioningTask::HistoSet::vSumOfContents_, and CommissioningTask::HistoSet::vSumOfSquares_.
Referenced by FedCablingTask::fill(), ApvTimingTask::fill(), DaqScopeModeTask::fill(), OptoScanTask::fill(), FedTimingTask::fill(), LatencyTask::fill(), PedsFullNoiseTask::fill(), CalibrationScanTask::fill(), FineDelayTask::fill(), CalibrationTask::fill(), PedestalsTask::fill(), FastFedCablingTask::fill(), VpspScanTask::fill(), FedTimingTask::update(), PedestalsTask::update(), CalibrationTask::update(), OptoScanTask::update(), VpspScanTask::update(), FastFedCablingTask::update(), CalibrationScanTask::update(), FedCablingTask::update(), NoiseTask::update(), PedsFullNoiseTask::update(), LatencyTask::update(), ApvTimingTask::update(), DaqScopeModeTask::update(), FineDelayTask::update(), and updateHistoSet().
{ // Check bin number if ( bin >= histo_set.vNumOfEntries_.size() && !histo_set.explicitFill_ ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Unexpected bin number " << bin << " when filling histogram of size " << histo_set.vNumOfEntries_.size(); return; } // Check if histo is TProfile or not if ( !histo_set.isProfile_ ) { // Set entries if (histo_set.explicitFill_) { float origVal = histo_set.histo()->getBinContent( bin+1 ); histo_set.histo()->setBinContent( bin+1, origVal + value ); } else { histo_set.vNumOfEntries_[bin]+=value; } } else { // Set entries histo_set.vNumOfEntries_[bin]++; // Check bin number if ( bin >= histo_set.vSumOfContents_.size() || bin >= histo_set.vSumOfSquares_.size() ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " Unexpected bin when filling histogram: " << bin; return; } // Set sum of contents and squares histo_set.vSumOfContents_[bin] += value; histo_set.vSumOfSquares_[bin] += value*value; } }
void CommissioningTask::updateHistoSet | ( | HistoSet & | histo_set, |
const uint32_t & | bin | ||
) | [protected] |
Updates the vectors of HistoSet.
Definition at line 229 of file CommissioningTask.cc.
References updateHistoSet(), and relativeConstraints::value.
{ float value = 1.; updateHistoSet( histo_set, bin, value ); }
void CommissioningTask::updateHistoSet | ( | CompactHistoSet & | histo_set | ) | [protected] |
Definition at line 361 of file CommissioningTask.cc.
References CommissioningTask::CompactHistoSet::explicitFill_, CommissioningTask::CompactHistoSet::histo(), sistrip::mlDqmSource_, and CommissioningTask::CompactHistoSet::vNumOfEntries_.
{ // Check if histo exists if ( !histo_set.histo() ) { edm::LogWarning(mlDqmSource_) << "[CommissioningTask::" << __func__ << "]" << " NULL pointer to MonitorElement!"; return; } if (!histo_set.explicitFill_) { for ( uint32_t ibin = 0; ibin < histo_set.vNumOfEntries_.size(); ibin++ ) { histo_set.histo()->setBinContent( ibin+1, histo_set.vNumOfEntries_[ibin] ); } } }
bool CommissioningTask::booked_ [private] |
Definition at line 161 of file CommissioningTask.h.
Referenced by bookHistograms(), and fillHistograms().
Definition at line 155 of file CommissioningTask.h.
Referenced by CommissioningTask(), connection(), and ~CommissioningTask().
DQMStore* CommissioningTask::dqm_ [private] |
Definition at line 149 of file CommissioningTask.h.
Referenced by dqm().
const edm::EventSetup* CommissioningTask::eventSetup_ [private] |
Definition at line 165 of file CommissioningTask.h.
Referenced by eventSetup().
uint32_t CommissioningTask::fecKey_ [private] |
Definition at line 159 of file CommissioningTask.h.
Referenced by CommissioningTask(), fecKey(), and ~CommissioningTask().
uint32_t CommissioningTask::fedKey_ [private] |
Definition at line 157 of file CommissioningTask.h.
Referenced by CommissioningTask(), fedKey(), and ~CommissioningTask().
uint32_t CommissioningTask::fillCntr_ [private] |
Definition at line 153 of file CommissioningTask.h.
Referenced by fillCntr(), and fillHistograms().
std::string CommissioningTask::myName_ [private] |
Definition at line 163 of file CommissioningTask.h.
Referenced by CommissioningTask(), myName(), and ~CommissioningTask().
uint32_t CommissioningTask::updateFreq_ [private] |
Definition at line 151 of file CommissioningTask.h.
Referenced by fillHistograms(), and updateFreq().