CMS 3D CMS Logo

FastFedCablingAnalysis Class Reference

Author:
R.Bainbridge
More...

#include <CondFormats/SiStripObjects/interface/FastFedCablingAnalysis.h>

Inheritance diagram for FastFedCablingAnalysis:

CommissioningAnalysis

List of all members.

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


Detailed Description

Author:
R.Bainbridge

Histogram-based analysis for connection loop.

Definition at line 16 of file FastFedCablingAnalysis.h.


Member Typedef Documentation

typedef std::map<uint32_t,uint16_t> FastFedCablingAnalysis::Candidates

Definition at line 28 of file FastFedCablingAnalysis.h.


Constructor & Destructor Documentation

FastFedCablingAnalysis::FastFedCablingAnalysis ( const uint32_t &  key  ) 

Definition at line 34 of file FastFedCablingAnalysis.cc.

References CommissioningAnalysis::fecKey(), CommissioningAnalysis::fedKey(), sistrip::invalid_, and getDQMSummary::key.

FastFedCablingAnalysis::FastFedCablingAnalysis (  ) 

Definition at line 61 of file FastFedCablingAnalysis.cc.

virtual FastFedCablingAnalysis::~FastFedCablingAnalysis (  )  [inline, virtual]

Definition at line 26 of file FastFedCablingAnalysis.h.

00026 {;}


Member Function Documentation

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 } 

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_, 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 }

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_.

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 }


Friends And Related Function Documentation

friend class FastFedCablingAlgorithm [friend]

Definition at line 30 of file FastFedCablingAnalysis.h.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:41 2009 for CMSSW by  doxygen 1.5.4