CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (const uint32_t &key)
 
 FastFedCablingAnalysis ()
 
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 uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (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

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

Definition at line 26 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 submitPVResolutionJobs::key.

46  max_(1. * sistrip::invalid_),
47  min_(1. * sistrip::invalid_) {
55  .key());
56  fedKey(key);
57 }
const uint32_t & fedKey() const
static const uint32_t invalid32_
Definition: Constants.h:15
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static const char fastCablingAnalysis_[]
tuple key
prepare the HTCondor submission files and eventually submit them
const uint32_t & fecKey() const
static const uint16_t invalid_
Definition: Constants.h:16
FastFedCablingAnalysis::FastFedCablingAnalysis ( )

Definition at line 61 of file FastFedCablingAnalysis.cc.

73  max_(1. * sistrip::invalid_),
74  min_(1. * sistrip::invalid_) {
75  ;
76 }
static const uint32_t invalid32_
Definition: Constants.h:15
static const char fastCablingAnalysis_[]
static const uint16_t invalid_
Definition: Constants.h:16
FastFedCablingAnalysis::~FastFedCablingAnalysis ( )
inlineoverride

Definition at line 24 of file FastFedCablingAnalysis.h.

24 { ; }

Member Function Documentation

bool FastFedCablingAnalysis::badTrimDac ( ) const
const uint32_t & FastFedCablingAnalysis::dcuHardId ( ) const
inline
void FastFedCablingAnalysis::header ( std::stringstream &  ss) const
overridevirtual

Header information for analysis print().

Reimplemented from CommissioningAnalysis.

Definition at line 114 of file FastFedCablingAnalysis.cc.

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(), and CommissioningAnalysis::myName().

Referenced by print().

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 }
const uint32_t & fedKey() const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint32_t & dcuId() const
const uint32_t & fecKey() const
const uint32_t & detId() const
const std::string & myName() const
const float & FastFedCablingAnalysis::highLevel ( ) const
inline

"High" light level [ADC].

Definition at line 141 of file FastFedCablingAnalysis.h.

References highMean_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

141 { return highMean_; }
const float & FastFedCablingAnalysis::highRms ( ) const
inline

Spread in "high" ligh level [ADC].

Definition at line 142 of file FastFedCablingAnalysis.h.

References highRms_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

142 { return highRms_; }
bool FastFedCablingAnalysis::isDirty ( ) const
bool FastFedCablingAnalysis::isValid ( void  ) const
overridevirtual

Identifies if analysis is valid or not.

Reimplemented from CommissioningAnalysis.

Definition at line 97 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 ntupleDataFormat._Object::_checkIsValid(), FastFedCablingHistosUsingDb::connections(), FastFedCablingHistosUsingDb::create(), FastFedCablingSummaryFactory::extract(), FastFedCablingHistograms::histoAnalysis(), print(), FastFedCablingHistograms::printAnalyses(), FastFedCablingHistograms::printSummary(), core.AutoHandle.AutoHandle::ReallyLoad(), summary(), and FastFedCablingHistosUsingDb::update().

97  {
102 }
static const uint32_t invalid32_
Definition: Constants.h:15
static const uint16_t valid_
Definition: Constants.h:17
const VString & getErrorCodes() const
const uint16_t & FastFedCablingAnalysis::lldCh ( ) const
inline

Linear Laser Driver channel.

Definition at line 140 of file FastFedCablingAnalysis.h.

References lldCh_.

Referenced by FastFedCablingHistosUsingDb::addDcuDetIds(), FastFedCablingHistosUsingDb::create(), and FastFedCablingHistosUsingDb::update().

140 { return lldCh_; }
const float & FastFedCablingAnalysis::lowLevel ( ) const
inline

"Low" light level [ADC].

Definition at line 143 of file FastFedCablingAnalysis.h.

References lowMean_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

143 { return lowMean_; }
const float & FastFedCablingAnalysis::lowRms ( ) const
inline

Spread in "low" ligh level [ADC].

Definition at line 144 of file FastFedCablingAnalysis.h.

References lowRms_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

144 { return lowRms_; }
const float & FastFedCablingAnalysis::max ( ) const
inline

Maximum light level in data [ADC].

Definition at line 145 of file FastFedCablingAnalysis.h.

References max_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

145 { return max_; }
const float & FastFedCablingAnalysis::min ( ) const
inline

Minimum light level in data [ADC].

Definition at line 146 of file FastFedCablingAnalysis.h.

References min_.

Referenced by FastFedCablingHistosUsingDb::create(), and FastFedCablingSummaryFactory::extract().

146 { return min_; }
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.

References badTrimDac(), dcuHardId_, TauDecayModes::dec, 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().

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 }
void header(std::stringstream &) const override
bool isValid() const override
static const uint16_t invalid_
Definition: Constants.h:16
const VString & getErrorCodes() const
void FastFedCablingAnalysis::reset ( void  )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 80 of file FastFedCablingAnalysis.cc.

References dcuHardId_, highMean_, highMedian_, highRms_, sistrip::invalid32_, sistrip::invalid_, lldCh_, lowMean_, lowMedian_, lowRms_, max_, midRange_, min_, and range_.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

80  {
91  max_ = 1. * sistrip::invalid_;
92  min_ = 1. * sistrip::invalid_;
93 }
static const uint32_t invalid32_
Definition: Constants.h:15
static const uint16_t invalid_
Definition: Constants.h:16
void FastFedCablingAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 147 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_, SiStripEnumsAndStrings::runType(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by FastFedCablingHistograms::printSummary().

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 }
const uint32_t & fedKey() const
static const char dir_[]
Utility class that holds histogram title.
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static std::string runType(const sistrip::RunType &)
bool isValid() const override
static const char dqmRoot_[]
const uint32_t & fecKey() const
const std::string & myName() const
static const char readoutView_[]

Friends And Related Function Documentation

friend class FastFedCablingAlgorithm
friend

Definition at line 28 of file FastFedCablingAnalysis.h.

Member Data Documentation

uint32_t FastFedCablingAnalysis::dcuHardId_
private

Extracted DCU id.

Definition at line 101 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 86 of file FastFedCablingAnalysis.h.

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

float FastFedCablingAnalysis::highMean_
private
float FastFedCablingAnalysis::highMedian_
private

Definition at line 107 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().

float FastFedCablingAnalysis::highRms_
private
uint16_t FastFedCablingAnalysis::lldCh_
private

Extracted LLD channel.

Definition at line 104 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse(), isValid(), lldCh(), print(), and reset().

float FastFedCablingAnalysis::lowMean_
private
float FastFedCablingAnalysis::lowMedian_
private

Definition at line 116 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().

float FastFedCablingAnalysis::lowRms_
private
float FastFedCablingAnalysis::max_
private
float FastFedCablingAnalysis::midRange_
private

Definition at line 128 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse(), isValid(), print(), and reset().

float FastFedCablingAnalysis::min_
private
const uint16_t FastFedCablingAnalysis::nBitsForDcuId_ = 32
static

Definition at line 92 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse().

const uint16_t FastFedCablingAnalysis::nBitsForLldCh_ = 2
static

Definition at line 95 of file FastFedCablingAnalysis.h.

Referenced by FastFedCablingAlgorithm::analyse().

float FastFedCablingAnalysis::range_
private

Definition at line 125 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 83 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 89 of file FastFedCablingAnalysis.h.

Referenced by badTrimDac().