CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends
FastFedCablingAnalysis Class Reference

Histogram-based analysis for connection loop. More...

#include <FastFedCablingAnalysis.h>

Inheritance diagram for FastFedCablingAnalysis:
CommissioningAnalysis

Public Types

typedef std::map< uint32_t, uint16_t > Candidates
 
- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

Public Member Functions

bool badTrimDac () const
 
const uint32_t & dcuHardId () const
 
 FastFedCablingAnalysis ()
 
 FastFedCablingAnalysis (const uint32_t &key)
 
void header (std::stringstream &) const override
 
const float & highLevel () const
 
const float & highRms () const
 
bool isDirty () const
 
bool isValid () const override
 
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) override
 
void reset () override
 
void summary (std::stringstream &) const override
 
 ~FastFedCablingAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const std::string &my_name)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual ~CommissioningAnalysis ()
 

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
 

Detailed Description

Histogram-based analysis for connection loop.

Author
R.Bainbridge

Definition at line 16 of file FastFedCablingAnalysis.h.

Member Typedef Documentation

◆ Candidates

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

Definition at line 26 of file FastFedCablingAnalysis.h.

Constructor & Destructor Documentation

◆ FastFedCablingAnalysis() [1/2]

FastFedCablingAnalysis::FastFedCablingAnalysis ( const uint32_t &  key)

◆ FastFedCablingAnalysis() [2/2]

FastFedCablingAnalysis::FastFedCablingAnalysis ( )

◆ ~FastFedCablingAnalysis()

FastFedCablingAnalysis::~FastFedCablingAnalysis ( )
inlineoverride

Definition at line 24 of file FastFedCablingAnalysis.h.

24 { ; }

Member Function Documentation

◆ badTrimDac()

bool FastFedCablingAnalysis::badTrimDac ( ) const

Identifies if TrimDAQ setting is valid or not.

Definition at line 110 of file FastFedCablingAnalysis.cc.

110 { return (lowMean_ < trimDacThreshold_); }

References lowMean_, and trimDacThreshold_.

Referenced by print().

◆ dcuHardId()

const uint32_t & FastFedCablingAnalysis::dcuHardId ( ) const
inline

DCU hardware id (32-bits).

Definition at line 139 of file FastFedCablingAnalysis.h.

139 { return dcuHardId_; }

References dcuHardId_.

◆ header()

void FastFedCablingAnalysis::header ( std::stringstream &  ss) const
overridevirtual

Header information for analysis print().

Reimplemented from CommissioningAnalysis.

Definition at line 114 of file FastFedCablingAnalysis.cc.

114  {
115  ss << "[" << myName() << "] Monitorables (65535 means \"invalid\"):" << std::endl;
116 
117  //summary(ss);
118 
119  SiStripFecKey fec_key(fecKey());
120  if (fec_key.isValid()) {
121  ss << " Crate/FEC/Ring/CCU/Mod/LLD : " << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/"
122  << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/" << fec_key.lldChan()
123  << std::endl;
124  } else {
125  ss << " Crate/FEC/Ring/CCU/Mod/LLD : (invalid)" << std::endl;
126  }
127 
128  SiStripFedKey fed_key(fedKey());
129  ss << " FedId/FeUnit/FeChan/FedChannel : " << fed_key.fedId() << "/" << fed_key.feUnit() << "/" << fed_key.feChan()
130  << "/" << fed_key.fedChannel() << std::endl;
131  // if ( fed_key.fedChannel() != sistrip::invalid_ ) { ss << fed_key.fedChannel(); }
132  // else { ss << "(invalid)"; }
133  // ss << std::endl;
134 
135  ss << " FecKey/Fedkey (hex) : 0x" << std::hex << std::setw(8) << std::setfill('0') << fecKey() << " / 0x"
136  << std::setw(8) << std::setfill('0') << fedKey() << std::dec << std::endl;
137 
138  ss << " DcuId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << dcuId() << " / "
139  << std::dec << std::setw(10) << std::setfill(' ') << dcuId() << std::endl;
140 
141  ss << " DetId (hex/dec) : 0x" << std::hex << std::setw(8) << std::setfill('0') << detId() << " / "
142  << std::dec << std::setw(10) << std::setfill(' ') << detId() << std::endl;
143 }

References SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), CommissioningAnalysis::dcuId(), TauDecayModes::dec, CommissioningAnalysis::detId(), SiStripFecKey::fecCrate(), SiStripFedKey::feChan(), CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), CommissioningAnalysis::fedKey(), SiStripFedKey::feUnit(), SiStripFecKey::isValid(), SiStripFecKey::lldChan(), CommissioningAnalysis::myName(), and contentValuesCheck::ss.

Referenced by print().

◆ highLevel()

const float & FastFedCablingAnalysis::highLevel ( ) const
inline

"High" light level [ADC].

Definition at line 141 of file FastFedCablingAnalysis.h.

141 { return highMean_; }

References highMean_.

◆ highRms()

const float & FastFedCablingAnalysis::highRms ( ) const
inline

Spread in "high" ligh level [ADC].

Definition at line 142 of file FastFedCablingAnalysis.h.

142 { return highRms_; }

References highRms_.

◆ isDirty()

bool FastFedCablingAnalysis::isDirty ( ) const

Identifies if fibre is dirty or not.

Definition at line 106 of file FastFedCablingAnalysis.cc.

106 { return (highMean_ < dirtyThreshold_); }

References dirtyThreshold_, and highMean_.

Referenced by print().

◆ isValid()

bool FastFedCablingAnalysis::isValid ( void  ) const
overridevirtual

◆ lldCh()

const uint16_t & FastFedCablingAnalysis::lldCh ( ) const
inline

Linear Laser Driver channel.

Definition at line 140 of file FastFedCablingAnalysis.h.

140 { return lldCh_; }

References lldCh_.

◆ lowLevel()

const float & FastFedCablingAnalysis::lowLevel ( ) const
inline

"Low" light level [ADC].

Definition at line 143 of file FastFedCablingAnalysis.h.

143 { return lowMean_; }

References lowMean_.

◆ lowRms()

const float & FastFedCablingAnalysis::lowRms ( ) const
inline

Spread in "low" ligh level [ADC].

Definition at line 144 of file FastFedCablingAnalysis.h.

144 { return lowRms_; }

References lowRms_.

◆ max()

const float & FastFedCablingAnalysis::max ( ) const
inline

Maximum light level in data [ADC].

Definition at line 145 of file FastFedCablingAnalysis.h.

145 { return max_; }

References max_.

◆ min()

const float & FastFedCablingAnalysis::min ( ) const
inline

Minimum light level in data [ADC].

Definition at line 146 of file FastFedCablingAnalysis.h.

146 { return min_; }

References min_.

◆ print()

void FastFedCablingAnalysis::print ( std::stringstream &  ss,
uint32_t  not_used = 0 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 165 of file FastFedCablingAnalysis.cc.

165  {
166  header(ss);
167  ss << std::fixed << std::setprecision(2) << " DCU id extracted from histo : 0x" << std::hex << std::setw(8)
168  << std::setfill('0') << dcuHardId_ << std::endl
169  << std::dec << " LLD chan extracted from histo : " << (lldCh_ > 3 ? sistrip::invalid_ : lldCh_) << std::endl
170  << " \"High\" level (mean+/-rms) [ADC] : " << highMean_ << " +/- " << highRms_ << std::endl
171  << " \"Low\" level (mean+/-rms) [ADC] : " << lowMean_ << " +/- " << lowRms_ << std::endl
172  << " Median \"high\" level [ADC] : " << highMedian_ << std::endl
173  << " Median \"low\" level [ADC] : " << lowMedian_ << std::endl
174  << " Range [ADC] : " << range_ << std::endl
175  << " Mid-range level [ADC] : " << midRange_ << std::endl
176  << " Maximum level [ADC] : " << max_ << std::endl
177  << " Minimum level [ADC] : " << min_ << std::endl;
178  ss << std::boolalpha << " isValid : " << isValid() << std::endl
179  << " isDirty : " << isDirty() << std::endl
180  << " badTrimDac : " << badTrimDac() << std::endl
181  << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
182  << ") : ";
183  if (getErrorCodes().empty()) {
184  ss << "(none)";
185  } else {
186  VString::const_iterator istr = getErrorCodes().begin();
187  VString::const_iterator jstr = getErrorCodes().end();
188  for (; istr != jstr; ++istr) {
189  ss << *istr << " ";
190  }
191  }
192  ss << std::endl;
193 }

References badTrimDac(), dcuHardId_, TauDecayModes::dec, relativeConstraints::empty, alignBH_cfg::fixed, CommissioningAnalysis::getErrorCodes(), header(), highMean_, highMedian_, highRms_, sistrip::invalid_, isDirty(), isValid(), lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, range_, and contentValuesCheck::ss.

◆ reset()

void FastFedCablingAnalysis::reset ( void  )
overridevirtual

◆ summary()

void FastFedCablingAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 147 of file FastFedCablingAnalysis.cc.

147  {
148  SiStripFecKey fec_key(fecKey());
149  SiStripFedKey fed_key(fedKey());
150 
154  sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan())
155  .title();
156 
157  ss << " Summary"
158  << ":" << (isValid() ? "Valid" : "Invalid") << ":" << sistrip::readoutView_ << ":" << fed_key.fedId() << "/"
159  << fed_key.feUnit() << "/" << fed_key.feChan() << ":" << sistrip::dqmRoot_ << sistrip::dir_ << "Collate"
160  << sistrip::dir_ << fed_key.path() << ":" << title << std::endl;
161 }

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_, SiStripEnumsAndStrings::runType(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Friends And Related Function Documentation

◆ FastFedCablingAlgorithm

friend class FastFedCablingAlgorithm
friend

Definition at line 28 of file FastFedCablingAnalysis.h.

Member Data Documentation

◆ dcuHardId_

uint32_t FastFedCablingAnalysis::dcuHardId_
private

Extracted DCU id.

Definition at line 101 of file FastFedCablingAnalysis.h.

Referenced by dcuHardId(), isValid(), print(), and reset().

◆ dirtyThreshold_

const float FastFedCablingAnalysis::dirtyThreshold_ = 800
static

Level [ADC] below which fibre is defined as "dirty".

Definition at line 86 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingHistosUsingDb::create(), and isDirty().

◆ highMean_

float FastFedCablingAnalysis::highMean_
private

Definition at line 110 of file FastFedCablingAnalysis.h.

Referenced by highLevel(), isDirty(), isValid(), print(), and reset().

◆ highMedian_

float FastFedCablingAnalysis::highMedian_
private

Definition at line 107 of file FastFedCablingAnalysis.h.

Referenced by isValid(), print(), and reset().

◆ highRms_

float FastFedCablingAnalysis::highRms_
private

Definition at line 113 of file FastFedCablingAnalysis.h.

Referenced by highRms(), isValid(), print(), and reset().

◆ lldCh_

uint16_t FastFedCablingAnalysis::lldCh_
private

Extracted LLD channel.

Definition at line 104 of file FastFedCablingAnalysis.h.

Referenced by isValid(), lldCh(), print(), and reset().

◆ lowMean_

float FastFedCablingAnalysis::lowMean_
private

Definition at line 119 of file FastFedCablingAnalysis.h.

Referenced by badTrimDac(), isValid(), lowLevel(), print(), and reset().

◆ lowMedian_

float FastFedCablingAnalysis::lowMedian_
private

Definition at line 116 of file FastFedCablingAnalysis.h.

Referenced by isValid(), print(), and reset().

◆ lowRms_

float FastFedCablingAnalysis::lowRms_
private

Definition at line 122 of file FastFedCablingAnalysis.h.

Referenced by isValid(), lowRms(), print(), and reset().

◆ max_

float FastFedCablingAnalysis::max_
private

Definition at line 131 of file FastFedCablingAnalysis.h.

Referenced by isValid(), max(), print(), and reset().

◆ midRange_

float FastFedCablingAnalysis::midRange_
private

Definition at line 128 of file FastFedCablingAnalysis.h.

Referenced by isValid(), print(), and reset().

◆ min_

float FastFedCablingAnalysis::min_
private

Definition at line 134 of file FastFedCablingAnalysis.h.

Referenced by isValid(), min(), print(), and reset().

◆ nBitsForDcuId_

const uint16_t FastFedCablingAnalysis::nBitsForDcuId_ = 32
static

Definition at line 92 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse().

◆ nBitsForLldCh_

const uint16_t FastFedCablingAnalysis::nBitsForLldCh_ = 2
static

Definition at line 95 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse().

◆ range_

float FastFedCablingAnalysis::range_
private

Definition at line 125 of file FastFedCablingAnalysis.h.

Referenced by isValid(), print(), and reset().

◆ threshold_

const float FastFedCablingAnalysis::threshold_ = 100.
static

Threshold to identify digital high from digital low.

Definition at line 83 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse(), and FastFedCablingHistosUsingDb::create().

◆ trimDacThreshold_

const float FastFedCablingAnalysis::trimDacThreshold_ = 10
static

Level [ADC] below which TrimDAC setting is defined as "bad".

Definition at line 89 of file FastFedCablingAnalysis.h.

Referenced by badTrimDac().

CommissioningAnalysis::getErrorCodes
const VString & getErrorCodes() const
Definition: CommissioningAnalysis.h:131
SiStripEnumsAndStrings::runType
static std::string runType(const sistrip::RunType &)
Definition: SiStripEnumsAndStrings.cc:39
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
FastFedCablingAnalysis::dcuHardId_
uint32_t dcuHardId_
Definition: FastFedCablingAnalysis.h:101
FastFedCablingAnalysis::lowMean_
float lowMean_
Definition: FastFedCablingAnalysis.h:119
FastFedCablingAnalysis::range_
float range_
Definition: FastFedCablingAnalysis.h:125
sistrip::invalid32_
static const uint32_t invalid32_
Definition: Constants.h:15
FastFedCablingAnalysis::lldCh_
uint16_t lldCh_
Definition: FastFedCablingAnalysis.h:104
CommissioningAnalysis::fedKey
const uint32_t & fedKey() const
Definition: CommissioningAnalysis.h:134
sistrip::dir_
static const char dir_[]
Definition: ConstantsForDqm.h:17
FastFedCablingAnalysis::highMedian_
float highMedian_
Definition: FastFedCablingAnalysis.h:107
CommissioningAnalysis::dcuId
const uint32_t & dcuId() const
Definition: CommissioningAnalysis.h:136
FastFedCablingAnalysis::highRms_
float highRms_
Definition: FastFedCablingAnalysis.h:113
sistrip::RunType
RunType
Definition: ConstantsForRunType.h:70
SiStripFedKey
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
FastFedCablingAnalysis::lowRms_
float lowRms_
Definition: FastFedCablingAnalysis.h:122
FastFedCablingAnalysis::trimDacThreshold_
static const float trimDacThreshold_
Definition: FastFedCablingAnalysis.h:89
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
FastFedCablingAnalysis::lowMedian_
float lowMedian_
Definition: FastFedCablingAnalysis.h:116
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
FastFedCablingAnalysis::highMean_
float highMean_
Definition: FastFedCablingAnalysis.h:110
CommissioningAnalysis::CommissioningAnalysis
CommissioningAnalysis()
Definition: CommissioningAnalysis.h:105
sistrip::fastCablingAnalysis_
static const char fastCablingAnalysis_[]
Definition: ConstantsForCommissioningAnalysis.h:26
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
FastFedCablingAnalysis::badTrimDac
bool badTrimDac() const
Definition: FastFedCablingAnalysis.cc:110
CommissioningAnalysis::detId
const uint32_t & detId() const
Definition: CommissioningAnalysis.h:137
FastFedCablingAnalysis::header
void header(std::stringstream &) const override
Definition: FastFedCablingAnalysis.cc:114
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
sistrip::dqmRoot_
static const char dqmRoot_[]
Definition: ConstantsForDqm.h:28
FastFedCablingAnalysis::max_
float max_
Definition: FastFedCablingAnalysis.h:131
FastFedCablingAnalysis::isDirty
bool isDirty() const
Definition: FastFedCablingAnalysis.cc:106
CommissioningAnalysis::fecKey
const uint32_t & fecKey() const
Definition: CommissioningAnalysis.h:133
FastFedCablingAnalysis::min_
float min_
Definition: FastFedCablingAnalysis.h:134
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
FastFedCablingAnalysis::dirtyThreshold_
static const float dirtyThreshold_
Definition: FastFedCablingAnalysis.h:86
FastFedCablingAnalysis::midRange_
float midRange_
Definition: FastFedCablingAnalysis.h:128
CommissioningAnalysis::myName
const std::string & myName() const
Definition: CommissioningAnalysis.h:139
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
sistrip::readoutView_
static const char readoutView_[]
Definition: ConstantsForView.h:20
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
crabWrapper.key
key
Definition: crabWrapper.py:19
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78
FastFedCablingAnalysis::isValid
bool isValid() const override
Definition: FastFedCablingAnalysis.cc:97