Histogram-based analysis for connection loop. More...
#include <FastFedCablingAnalysis.h>
Public Types | |
typedef std::map< uint32_t, uint16_t > | Candidates |
Public Member Functions | |
bool | badTrimDac () const |
const uint32_t & | dcuHardId () const |
FastFedCablingAnalysis () | |
FastFedCablingAnalysis (const uint32_t &key) | |
void | header (std::stringstream &) const |
const float & | highLevel () const |
const float & | highRms () const |
bool | isDirty () const |
bool | isValid () const |
const uint16_t & | lldCh () const |
const float & | lowLevel () const |
const float & | lowRms () const |
const float & | max () const |
const float & | min () const |
void | print (std::stringstream &, uint32_t not_used=0) |
void | reset () |
void | summary (std::stringstream &) const |
virtual | ~FastFedCablingAnalysis () |
Static Public Attributes | |
static const float | dirtyThreshold_ = 800 |
static const uint16_t | nBitsForDcuId_ = 32 |
static const uint16_t | nBitsForLldCh_ = 2 |
static const float | threshold_ = 100. |
static const float | trimDacThreshold_ = 10 |
Private Attributes | |
uint32_t | dcuHardId_ |
float | highMean_ |
float | highMedian_ |
float | highRms_ |
uint16_t | lldCh_ |
float | lowMean_ |
float | lowMedian_ |
float | lowRms_ |
float | max_ |
float | midRange_ |
float | min_ |
float | range_ |
Friends | |
class | FastFedCablingAlgorithm |
Histogram-based analysis for connection loop.
Definition at line 16 of file FastFedCablingAnalysis.h.
typedef std::map<uint32_t,uint16_t> FastFedCablingAnalysis::Candidates |
Definition at line 28 of file FastFedCablingAnalysis.h.
FastFedCablingAnalysis::FastFedCablingAnalysis | ( | const uint32_t & | key | ) |
Definition at line 34 of file FastFedCablingAnalysis.cc.
References CommissioningAnalysis::fecKey(), CommissioningAnalysis::fedKey(), sistrip::invalid_, and combine::key.
: CommissioningAnalysis(key,sistrip::fastCablingAnalysis_), dcuHardId_(sistrip::invalid32_), lldCh_(sistrip::invalid_), highMedian_(1.*sistrip::invalid_), highMean_(1.*sistrip::invalid_), highRms_(1.*sistrip::invalid_), lowMedian_(1.*sistrip::invalid_), lowMean_(1.*sistrip::invalid_), lowRms_(1.*sistrip::invalid_), range_(1.*sistrip::invalid_), midRange_(1.*sistrip::invalid_), max_(1.*sistrip::invalid_), min_(1.*sistrip::invalid_) { fecKey( SiStripFecKey( sistrip::invalid_, sistrip::invalid_, sistrip::invalid_, sistrip::invalid_, sistrip::invalid_, sistrip::invalid_, sistrip::invalid_ ).key() ); fedKey( key ); }
FastFedCablingAnalysis::FastFedCablingAnalysis | ( | ) |
Definition at line 61 of file FastFedCablingAnalysis.cc.
: CommissioningAnalysis(sistrip::fastCablingAnalysis_), dcuHardId_(sistrip::invalid32_), lldCh_(sistrip::invalid_), highMedian_(1.*sistrip::invalid_), highMean_(1.*sistrip::invalid_), highRms_(1.*sistrip::invalid_), lowMedian_(1.*sistrip::invalid_), lowMean_(1.*sistrip::invalid_), lowRms_(1.*sistrip::invalid_), range_(1.*sistrip::invalid_), midRange_(1.*sistrip::invalid_), max_(1.*sistrip::invalid_), min_(1.*sistrip::invalid_) {;}
virtual FastFedCablingAnalysis::~FastFedCablingAnalysis | ( | ) | [inline, virtual] |
Definition at line 26 of file FastFedCablingAnalysis.h.
{;}
bool FastFedCablingAnalysis::badTrimDac | ( | ) | const |
Identifies if TrimDAQ setting is valid or not.
Definition at line 120 of file FastFedCablingAnalysis.cc.
References lowMean_, and trimDacThreshold_.
Referenced by FastFedCablingHistosUsingDb::connections(), print(), FastFedCablingHistograms::printAnalyses(), and FastFedCablingHistograms::printSummary().
{ return ( lowMean_ < trimDacThreshold_ ); }
const uint32_t & FastFedCablingAnalysis::dcuHardId | ( | ) | const [inline] |
DCU hardware id (32-bits).
Definition at line 144 of file FastFedCablingAnalysis.h.
References dcuHardId_.
Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), FastFedCablingHistosUsingDb::connections(), and FastFedCablingHistosUsingDb::update().
{ return dcuHardId_; }
void FastFedCablingAnalysis::header | ( | std::stringstream & | ss | ) | const [virtual] |
Header information for analysis print().
Reimplemented from CommissioningAnalysis.
Definition at line 126 of file FastFedCablingAnalysis.cc.
References SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), CommissioningAnalysis::dcuId(), CommissioningAnalysis::detId(), SiStripFecKey::fecCrate(), SiStripFedKey::feChan(), CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), CommissioningAnalysis::fedKey(), SiStripFedKey::feUnit(), SiStripFecKey::isValid(), SiStripFecKey::lldChan(), and CommissioningAnalysis::myName().
Referenced by print().
{ ss << "[" << myName() << "] Monitorables (65535 means \"invalid\"):" << std::endl; //summary(ss); SiStripFecKey fec_key( fecKey() ); if ( fec_key.isValid() ) { ss << " Crate/FEC/Ring/CCU/Mod/LLD : " << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/" << fec_key.lldChan() << std::endl; } else { ss << " Crate/FEC/Ring/CCU/Mod/LLD : (invalid)" << std::endl; } SiStripFedKey fed_key( fedKey() ); ss << " FedId/FeUnit/FeChan/FedChannel : " << fed_key.fedId() << "/" << fed_key.feUnit() << "/" << fed_key.feChan() << "/" << fed_key.fedChannel() << std::endl; // if ( fed_key.fedChannel() != sistrip::invalid_ ) { ss << fed_key.fedChannel(); } // else { ss << "(invalid)"; } // ss << std::endl; ss << " FecKey/Fedkey (hex) : 0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey() << " / 0x" << std::setw(8) << std::setfill('0') << fedKey() << std::dec << std::endl; ss << " DcuId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << dcuId() << " / " << std::dec << std::setw(10) << std::setfill(' ') << dcuId() << std::endl; ss << " DetId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << detId() << " / " << std::dec << std::setw(10) << std::setfill(' ') << detId() << std::endl; }
const float & FastFedCablingAnalysis::highLevel | ( | ) | const [inline] |
"High" light level [ADC].
Definition at line 146 of file FastFedCablingAnalysis.h.
References highMean_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return highMean_; }
const float & FastFedCablingAnalysis::highRms | ( | ) | const [inline] |
Spread in "high" ligh level [ADC].
Definition at line 147 of file FastFedCablingAnalysis.h.
References highRms_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return highRms_; }
bool FastFedCablingAnalysis::isDirty | ( | ) | const |
Identifies if fibre is dirty or not.
Definition at line 114 of file FastFedCablingAnalysis.cc.
References dirtyThreshold_, and highMean_.
Referenced by FastFedCablingHistosUsingDb::connections(), FastFedCablingHistosUsingDb::create(), print(), FastFedCablingHistograms::printAnalyses(), and FastFedCablingHistograms::printSummary().
{ return ( highMean_ < dirtyThreshold_ ); }
bool FastFedCablingAnalysis::isValid | ( | void | ) | const [virtual] |
Identifies if analysis is valid or not.
Reimplemented from CommissioningAnalysis.
Definition at line 96 of file FastFedCablingAnalysis.cc.
References dcuHardId_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), highMean_, highMedian_, highRms_, sistrip::invalid32_, lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, range_, and sistrip::valid_.
Referenced by FastFedCablingHistosUsingDb::connections(), FastFedCablingHistosUsingDb::create(), FastFedCablingSummaryFactory::extract(), FastFedCablingHistograms::histoAnalysis(), print(), FastFedCablingHistograms::printAnalyses(), FastFedCablingHistograms::printSummary(), summary(), and FastFedCablingHistosUsingDb::update().
{ return ( dcuHardId_ < sistrip::invalid32_ && lldCh_ < sistrip::valid_ && highMedian_ < sistrip::valid_ && highMean_ < sistrip::valid_ && highRms_ < sistrip::valid_ && lowMedian_ < sistrip::valid_ && lowMean_ < sistrip::valid_ && lowRms_ < sistrip::valid_ && range_ < sistrip::valid_ && midRange_ < sistrip::valid_ && max_ < sistrip::valid_ && min_ < sistrip::valid_ && getErrorCodes().empty() ); }
const uint16_t & FastFedCablingAnalysis::lldCh | ( | ) | const [inline] |
Linear Laser Driver channel.
Definition at line 145 of file FastFedCablingAnalysis.h.
References lldCh_.
Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), FastFedCablingHistosUsingDb::create(), and FastFedCablingHistosUsingDb::update().
{ return lldCh_; }
const float & FastFedCablingAnalysis::lowLevel | ( | ) | const [inline] |
"Low" light level [ADC].
Definition at line 148 of file FastFedCablingAnalysis.h.
References lowMean_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return lowMean_; }
const float & FastFedCablingAnalysis::lowRms | ( | ) | const [inline] |
Spread in "low" ligh level [ADC].
Definition at line 149 of file FastFedCablingAnalysis.h.
References lowRms_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return lowRms_; }
const float & FastFedCablingAnalysis::max | ( | ) | const [inline] |
Maximum light level in data [ADC].
Definition at line 150 of file FastFedCablingAnalysis.h.
References max_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return max_; }
const float & FastFedCablingAnalysis::min | ( | ) | const [inline] |
Minimum light level in data [ADC].
Definition at line 151 of file FastFedCablingAnalysis.h.
References min_.
Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().
{ return min_; }
void FastFedCablingAnalysis::print | ( | std::stringstream & | ss, |
uint32_t | not_used = 0 |
||
) | [virtual] |
Prints analysis results.
Implements CommissioningAnalysis.
Definition at line 218 of file FastFedCablingAnalysis.cc.
References badTrimDac(), dcuHardId_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), header(), highMean_, highMedian_, highRms_, sistrip::invalid_, isDirty(), isValid(), lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, and range_.
Referenced by FastFedCablingHistograms::printAnalyses().
{ header( ss ); ss << std::fixed << std::setprecision(2) << " DCU id extracted from histo : 0x" << std::hex << std::setw(8) << std::setfill('0') << dcuHardId_ << std::endl << std::dec << " LLD chan extracted from histo : " << ( lldCh_ > 3 ? sistrip::invalid_ : lldCh_ ) << std::endl << " \"High\" level (mean+/-rms) [ADC] : " << highMean_ << " +/- " << highRms_ << std::endl << " \"Low\" level (mean+/-rms) [ADC] : " << lowMean_ << " +/- " << lowRms_ << std::endl << " Median \"high\" level [ADC] : " << highMedian_ << std::endl << " Median \"low\" level [ADC] : " << lowMedian_ << std::endl << " Range [ADC] : " << range_ << std::endl << " Mid-range level [ADC] : " << midRange_ << std::endl << " Maximum level [ADC] : " << max_ << std::endl << " Minimum level [ADC] : " << min_ << std::endl; ss << std::boolalpha << " isValid : " << isValid() << std::endl << " isDirty : " << isDirty() << std::endl << " badTrimDac : " << badTrimDac() << std::endl << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size() << ") : "; if ( getErrorCodes().empty() ) { ss << "(none)"; } else { VString::const_iterator istr = getErrorCodes().begin(); VString::const_iterator jstr = getErrorCodes().end(); for ( ; istr != jstr; ++istr ) { ss << *istr << " "; } } ss << std::endl; }
void FastFedCablingAnalysis::reset | ( | void | ) | [virtual] |
Resets analysis member data.
Implements CommissioningAnalysis.
Definition at line 79 of file FastFedCablingAnalysis.cc.
References dcuHardId_, highMean_, highMedian_, highRms_, sistrip::invalid32_, sistrip::invalid_, lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, and range_.
{ dcuHardId_ = sistrip::invalid32_; lldCh_ = sistrip::invalid_; highMedian_ = 1.*sistrip::invalid_; highMean_ = 1.*sistrip::invalid_; highRms_ = 1.*sistrip::invalid_; lowMedian_ = 1.*sistrip::invalid_; lowMean_ = 1.*sistrip::invalid_; lowRms_ = 1.*sistrip::invalid_; range_ = 1.*sistrip::invalid_; midRange_ = 1.*sistrip::invalid_; max_ = 1.*sistrip::invalid_; min_ = 1.*sistrip::invalid_; }
void FastFedCablingAnalysis::summary | ( | std::stringstream & | ss | ) | const [virtual] |
Overrides base method.
Reimplemented from CommissioningAnalysis.
Definition at line 185 of file FastFedCablingAnalysis.cc.
References sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, SiStripFedKey::feChan(), CommissioningAnalysis::fecKey(), sistrip::FED_KEY, SiStripFedKey::fedId(), CommissioningAnalysis::fedKey(), SiStripFedKey::feUnit(), isValid(), SiStripKey::key(), sistrip::LLD_CHAN, SiStripFecKey::lldChan(), CommissioningAnalysis::myName(), SiStripKey::path(), sistrip::readoutView_, environment_file_cff::runType, AlCaHLTBitMon_QueryRunRegistry::string, and indexGen::title.
Referenced by FastFedCablingHistograms::printSummary().
{ SiStripFecKey fec_key( fecKey() ); SiStripFedKey fed_key( fedKey() ); sistrip::RunType type = SiStripEnumsAndStrings::runType( myName() ); std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan() ).title(); ss << " Summary" << ":" << ( isValid() ? "Valid" : "Invalid" ) << ":" << sistrip::readoutView_ << ":" << fed_key.fedId() << "/" << fed_key.feUnit() << "/" << fed_key.feChan() << ":" << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_ << fed_key.path() << ":" << title << std::endl; }
friend class FastFedCablingAlgorithm [friend] |
Definition at line 30 of file FastFedCablingAnalysis.h.
uint32_t FastFedCablingAnalysis::dcuHardId_ [private] |
Extracted DCU id.
Definition at line 105 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), dcuHardId(), isValid(), print(), and reset().
const float FastFedCablingAnalysis::dirtyThreshold_ = 800 [static] |
Level [ADC] below which fibre is defined as "dirty".
Definition at line 89 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingHistosUsingDb::create(), and isDirty().
float FastFedCablingAnalysis::highMean_ [private] |
Definition at line 114 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), highLevel(), isDirty(), isValid(), print(), and reset().
float FastFedCablingAnalysis::highMedian_ [private] |
Definition at line 111 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().
float FastFedCablingAnalysis::highRms_ [private] |
Definition at line 117 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), highRms(), isValid(), print(), and reset().
uint16_t FastFedCablingAnalysis::lldCh_ [private] |
Extracted LLD channel.
Definition at line 108 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), lldCh(), print(), and reset().
float FastFedCablingAnalysis::lowMean_ [private] |
Definition at line 123 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), badTrimDac(), isValid(), lowLevel(), print(), and reset().
float FastFedCablingAnalysis::lowMedian_ [private] |
Definition at line 120 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().
float FastFedCablingAnalysis::lowRms_ [private] |
Definition at line 126 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), lowRms(), print(), and reset().
float FastFedCablingAnalysis::max_ [private] |
Definition at line 135 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), max(), print(), and reset().
float FastFedCablingAnalysis::midRange_ [private] |
Definition at line 132 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().
float FastFedCablingAnalysis::min_ [private] |
Definition at line 138 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), min(), print(), and reset().
const uint16_t FastFedCablingAnalysis::nBitsForDcuId_ = 32 [static] |
Definition at line 95 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse().
const uint16_t FastFedCablingAnalysis::nBitsForLldCh_ = 2 [static] |
Definition at line 98 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse().
float FastFedCablingAnalysis::range_ [private] |
Definition at line 129 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().
const float FastFedCablingAnalysis::threshold_ = 100. [static] |
Threshold to identify digital high from digital low.
Definition at line 86 of file FastFedCablingAnalysis.h.
Referenced by FastFedCablingAlgorithm::analyse(), and FastFedCablingHistosUsingDb::create().
const float FastFedCablingAnalysis::trimDacThreshold_ = 10 [static] |
Level [ADC] below which TrimDAC setting is defined as "bad".
Definition at line 92 of file FastFedCablingAnalysis.h.
Referenced by badTrimDac().