#include <CondFormats/SiStripObjects/interface/FastFedCablingAnalysis.h>
Public Types | |
typedef std::map< uint32_t, uint16_t > | Candidates |
Public Member Functions | |
bool | badTrimDac () const |
Identifies if TrimDAQ setting is valid or not. | |
const uint32_t & | dcuHardId () const |
DCU hardware id (32-bits). | |
FastFedCablingAnalysis () | |
FastFedCablingAnalysis (const uint32_t &key) | |
void | header (std::stringstream &) const |
Header information for analysis print(). | |
const float & | highLevel () const |
"High" light level [ADC]. | |
const float & | highRms () const |
Spread in "high" ligh level [ADC]. | |
bool | isDirty () const |
Identifies if fibre is dirty or not. | |
bool | isValid () const |
Identifies if analysis is valid or not. | |
const uint16_t & | lldCh () const |
Linear Laser Driver channel. | |
const float & | lowLevel () const |
"Low" light level [ADC]. | |
const float & | lowRms () const |
Spread in "low" ligh level [ADC]. | |
const float & | max () const |
Maximum light level in data [ADC]. | |
const float & | min () const |
Minimum light level in data [ADC]. | |
void | print (std::stringstream &, uint32_t not_used=0) |
Prints analysis results. | |
void | reset () |
Resets analysis member data. | |
void | summary (std::stringstream &) const |
Overrides base method. | |
virtual | ~FastFedCablingAnalysis () |
Static Public Attributes | |
static const float | dirtyThreshold_ = 800 |
Level [ADC] below which fibre is defined as "dirty". | |
static const uint16_t | nBitsForDcuId_ = 32 |
static const uint16_t | nBitsForLldCh_ = 2 |
static const float | threshold_ = 100. |
Threshold to identify digital high from digital low. | |
static const float | trimDacThreshold_ = 10 |
Level [ADC] below which TrimDAC setting is defined as "bad". | |
Private Attributes | |
uint32_t | dcuHardId_ |
Extracted DCU id. | |
float | highMean_ |
float | highMedian_ |
float | highRms_ |
uint16_t | lldCh_ |
Extracted LLD channel. | |
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 getDQMSummary::key.
00035 : CommissioningAnalysis(key,sistrip::fastCablingAnalysis_), 00036 dcuHardId_(sistrip::invalid32_), 00037 lldCh_(sistrip::invalid_), 00038 highMedian_(1.*sistrip::invalid_), 00039 highMean_(1.*sistrip::invalid_), 00040 highRms_(1.*sistrip::invalid_), 00041 lowMedian_(1.*sistrip::invalid_), 00042 lowMean_(1.*sistrip::invalid_), 00043 lowRms_(1.*sistrip::invalid_), 00044 range_(1.*sistrip::invalid_), 00045 midRange_(1.*sistrip::invalid_), 00046 max_(1.*sistrip::invalid_), 00047 min_(1.*sistrip::invalid_) 00048 { 00049 fecKey( SiStripFecKey( sistrip::invalid_, 00050 sistrip::invalid_, 00051 sistrip::invalid_, 00052 sistrip::invalid_, 00053 sistrip::invalid_, 00054 sistrip::invalid_, 00055 sistrip::invalid_ ).key() ); 00056 fedKey( key ); 00057 }
FastFedCablingAnalysis::FastFedCablingAnalysis | ( | ) |
Definition at line 61 of file FastFedCablingAnalysis.cc.
00062 : CommissioningAnalysis(sistrip::fastCablingAnalysis_), 00063 dcuHardId_(sistrip::invalid32_), 00064 lldCh_(sistrip::invalid_), 00065 highMedian_(1.*sistrip::invalid_), 00066 highMean_(1.*sistrip::invalid_), 00067 highRms_(1.*sistrip::invalid_), 00068 lowMedian_(1.*sistrip::invalid_), 00069 lowMean_(1.*sistrip::invalid_), 00070 lowRms_(1.*sistrip::invalid_), 00071 range_(1.*sistrip::invalid_), 00072 midRange_(1.*sistrip::invalid_), 00073 max_(1.*sistrip::invalid_), 00074 min_(1.*sistrip::invalid_) 00075 {;}
virtual FastFedCablingAnalysis::~FastFedCablingAnalysis | ( | ) | [inline, virtual] |
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().
00120 { 00121 return ( lowMean_ < trimDacThreshold_ ); 00122 }
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().
00144 { 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(), lat::endl(), 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().
00126 { 00127 ss << "[" << myName() << "] Monitorables (65535 means \"invalid\"):" << std::endl; 00128 00129 //summary(ss); 00130 00131 SiStripFecKey fec_key( fecKey() ); 00132 if ( fec_key.isValid() ) { 00133 ss << " Crate/FEC/Ring/CCU/Mod/LLD : " 00134 << fec_key.fecCrate() << "/" 00135 << fec_key.fecSlot() << "/" 00136 << fec_key.fecRing() << "/" 00137 << fec_key.ccuAddr() << "/" 00138 << fec_key.ccuChan() << "/" 00139 << fec_key.lldChan() 00140 << std::endl; 00141 } else { 00142 ss << " Crate/FEC/Ring/CCU/Mod/LLD : (invalid)" 00143 << std::endl; 00144 } 00145 00146 SiStripFedKey fed_key( fedKey() ); 00147 ss << " FedId/FeUnit/FeChan/FedChannel : " 00148 << fed_key.fedId() << "/" 00149 << fed_key.feUnit() << "/" 00150 << fed_key.feChan() << "/" 00151 << fed_key.fedChannel() 00152 << std::endl; 00153 // if ( fed_key.fedChannel() != sistrip::invalid_ ) { ss << fed_key.fedChannel(); } 00154 // else { ss << "(invalid)"; } 00155 // ss << std::endl; 00156 00157 ss << " FecKey/Fedkey (hex) : 0x" 00158 << std::hex 00159 << std::setw(8) << std::setfill('0') << fecKey() 00160 << " / 0x" 00161 << std::setw(8) << std::setfill('0') << fedKey() 00162 << std::dec 00163 << std::endl; 00164 00165 ss << " DcuId (hex/dec) : 0x" 00166 << std::hex 00167 << std::setw(8) << std::setfill('0') << dcuId() 00168 << " / " 00169 << std::dec 00170 << std::setw(10) << std::setfill(' ') << dcuId() 00171 << std::endl; 00172 00173 ss << " DetId (hex/dec) : 0x" 00174 << std::hex 00175 << std::setw(8) << std::setfill('0') << detId() 00176 << " / " 00177 << std::dec 00178 << std::setw(10) << std::setfill(' ') << detId() 00179 << std::endl; 00180 00181 }
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().
00146 { 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().
00147 { 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().
00114 { 00115 return ( highMean_ < dirtyThreshold_ ); 00116 }
Identifies if analysis is valid or not.
Reimplemented from CommissioningAnalysis.
Definition at line 96 of file FastFedCablingAnalysis.cc.
References dcuHardId_, 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().
00096 { 00097 return ( dcuHardId_ < sistrip::invalid32_ && 00098 lldCh_ < sistrip::valid_ && 00099 highMedian_ < sistrip::valid_ && 00100 highMean_ < sistrip::valid_ && 00101 highRms_ < sistrip::valid_ && 00102 lowMedian_ < sistrip::valid_ && 00103 lowMean_ < sistrip::valid_ && 00104 lowRms_ < sistrip::valid_ && 00105 range_ < sistrip::valid_ && 00106 midRange_ < sistrip::valid_ && 00107 max_ < sistrip::valid_ && 00108 min_ < sistrip::valid_ && 00109 getErrorCodes().empty() ); 00110 }
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().
00145 { 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().
00148 { 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().
00149 { 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().
00150 { 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().
00151 { 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_, empty, lat::endl(), CommissioningAnalysis::getErrorCodes(), header(), highMean_, highMedian_, highRms_, sistrip::invalid_, isDirty(), isValid(), lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, and range_.
Referenced by FastFedCablingHistograms::printAnalyses().
00218 { 00219 header( ss ); 00220 ss << std::fixed << std::setprecision(2) 00221 << " DCU id extracted from histo : 0x" 00222 << std::hex 00223 << std::setw(8) << std::setfill('0') << dcuHardId_ << std::endl 00224 << std::dec 00225 << " LLD chan extracted from histo : " << ( lldCh_ > 3 ? sistrip::invalid_ : lldCh_ ) << std::endl 00226 << " \"High\" level (mean+/-rms) [ADC] : " << highMean_ << " +/- " << highRms_ << std::endl 00227 << " \"Low\" level (mean+/-rms) [ADC] : " << lowMean_ << " +/- " << lowRms_ << std::endl 00228 << " Median \"high\" level [ADC] : " << highMedian_ << std::endl 00229 << " Median \"low\" level [ADC] : " << lowMedian_ << std::endl 00230 << " Range [ADC] : " << range_ << std::endl 00231 << " Mid-range level [ADC] : " << midRange_ << std::endl 00232 << " Maximum level [ADC] : " << max_ << std::endl 00233 << " Minimum level [ADC] : " << min_ << std::endl; 00234 ss << std::boolalpha 00235 << " isValid : " << isValid() << std::endl 00236 << " isDirty : " << isDirty() << std::endl 00237 << " badTrimDac : " << badTrimDac() << std::endl 00238 << std::noboolalpha 00239 << " Error codes (found " 00240 << std::setw(2) << std::setfill(' ') << getErrorCodes().size() 00241 << ") : "; 00242 if ( getErrorCodes().empty() ) { ss << "(none)"; } 00243 else { 00244 VString::const_iterator istr = getErrorCodes().begin(); 00245 VString::const_iterator jstr = getErrorCodes().end(); 00246 for ( ; istr != jstr; ++istr ) { ss << *istr << " "; } 00247 } 00248 ss << std::endl; 00249 }
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_.
00079 { 00080 dcuHardId_ = sistrip::invalid32_; 00081 lldCh_ = sistrip::invalid_; 00082 highMedian_ = 1.*sistrip::invalid_; 00083 highMean_ = 1.*sistrip::invalid_; 00084 highRms_ = 1.*sistrip::invalid_; 00085 lowMedian_ = 1.*sistrip::invalid_; 00086 lowMean_ = 1.*sistrip::invalid_; 00087 lowRms_ = 1.*sistrip::invalid_; 00088 range_ = 1.*sistrip::invalid_; 00089 midRange_ = 1.*sistrip::invalid_; 00090 max_ = 1.*sistrip::invalid_; 00091 min_ = 1.*sistrip::invalid_; 00092 }
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_, lat::endl(), 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_, SiStripEnumsAndStrings::runType(), and indexGen::title.
Referenced by FastFedCablingHistograms::printSummary().
00185 { 00186 00187 SiStripFecKey fec_key( fecKey() ); 00188 SiStripFedKey fed_key( fedKey() ); 00189 00190 sistrip::RunType type = SiStripEnumsAndStrings::runType( myName() ); 00191 std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, 00192 type, 00193 sistrip::FED_KEY, 00194 fed_key.key(), 00195 sistrip::LLD_CHAN, 00196 fec_key.lldChan() ).title(); 00197 00198 ss << " Summary" 00199 << ":" 00200 << ( isValid() ? "Valid" : "Invalid" ) 00201 << ":" 00202 << sistrip::readoutView_ << ":" 00203 << fed_key.fedId() << "/" 00204 << fed_key.feUnit() << "/" 00205 << fed_key.feChan() 00206 << ":" 00207 << sistrip::dqmRoot_ << sistrip::dir_ 00208 << "Collate" << sistrip::dir_ 00209 << fed_key.path() 00210 << ":" 00211 << title 00212 << std::endl; 00213 00214 }
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().