CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends
FedCablingAnalysis Class Reference

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

#include <FedCablingAnalysis.h>

Inheritance diagram for FedCablingAnalysis:
CommissioningAnalysis

Public Types

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

Public Member Functions

const float & adcLevel () const
 
const Candidatescandidates () const
 
 FedCablingAnalysis (const uint32_t &key)
 
 FedCablingAnalysis ()
 
const uint16_t & fedCh () const
 
const uint16_t & fedId () const
 
bool isValid () const
 
void print (std::stringstream &, uint32_t not_used=0)
 
void reset ()
 
virtual ~FedCablingAnalysis ()
 
- 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
 
virtual void header (std::stringstream &) const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual void summary (std::stringstream &) const
 
virtual ~CommissioningAnalysis ()
 

Static Public Attributes

static const float threshold_ = 100.
 

Private Attributes

float adcLevel_
 
Candidates candidates_
 
uint16_t fedCh_
 
uint16_t fedId_
 

Friends

class FedCablingAlgorithm
 

Detailed Description

Histogram-based analysis for connection loop.

Author
R.Bainbridge

Definition at line 16 of file FedCablingAnalysis.h.

Member Typedef Documentation

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

Definition at line 28 of file FedCablingAnalysis.h.

Constructor & Destructor Documentation

FedCablingAnalysis::FedCablingAnalysis ( const uint32_t &  key)
FedCablingAnalysis::FedCablingAnalysis ( )
virtual FedCablingAnalysis::~FedCablingAnalysis ( )
inlinevirtual

Definition at line 26 of file FedCablingAnalysis.h.

26 {;}

Member Function Documentation

const float & FedCablingAnalysis::adcLevel ( ) const
inline

Light level [ADC].

Definition at line 86 of file FedCablingAnalysis.h.

References adcLevel_.

86 { return adcLevel_; }
const FedCablingAnalysis::Candidates & FedCablingAnalysis::candidates ( ) const
inline

Container for candidate connections.

Definition at line 87 of file FedCablingAnalysis.h.

References candidates_.

87 { return candidates_; }
const uint16_t & FedCablingAnalysis::fedCh ( ) const
inline

FED channel.

Definition at line 85 of file FedCablingAnalysis.h.

References fedCh_.

85 { return fedCh_; }
const uint16_t & FedCablingAnalysis::fedId ( ) const
inline

FED id.

Definition at line 84 of file FedCablingAnalysis.h.

References fedId_.

84 { return fedId_; }
bool FedCablingAnalysis::isValid ( void  ) const
virtual

Identifies if analysis is valid or not.

Reimplemented from CommissioningAnalysis.

Definition at line 47 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, fedCh_, fedId_, CommissioningAnalysis::getErrorCodes(), and sistrip::maximum_.

Referenced by FedCablingHistograms::histoAnalysis(), and print().

47  {
48  return ( fedId_ < sistrip::maximum_ &&
51  !candidates_.empty() &&
52  getErrorCodes().empty() );
53 }
static const uint16_t maximum_
Definition: Constants.h:20
const VString & getErrorCodes() const
void FedCablingAnalysis::print ( std::stringstream &  ss,
uint32_t  not_used = 0 
)
virtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 57 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, relativeConstraints::empty, fedCh_, SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), fedId_, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), getDQMSummary::iter, and cmsHarvester::path.

57  {
58  header( ss );
59  ss << std::fixed << std::setprecision(2)
60  << " Connected FED id : " << fedId_ << std::endl
61  << " Connected FED channel : " << fedCh_ << std::endl
62  << " Signal level [ADC] : " << adcLevel_ << std::endl;
63  ss << " nCandidates : " << candidates_.size() << std::endl
64  << " FedId/FedChannel/ADC) : ";
65  if ( candidates_.empty() ) { ss << "(none)"; }
66  else {
67  Candidates::const_iterator iter;
68  for ( iter = candidates_.begin(); iter != candidates_.end(); iter++ ) {
69  SiStripFedKey path( iter->first );
70  ss << path.fedId() << "/"
71  << path.fedChannel() << "/"
72  << iter->second << " ";
73  }
74  }
75  ss << std::endl;
76  ss << std::boolalpha
77  << " isValid : " << isValid() << std::endl
78  << std::noboolalpha
79  << " Error codes (found "
80  << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
81  << ") : ";
82  if ( getErrorCodes().empty() ) { ss << "(none)"; }
83  else {
84  VString::const_iterator istr = getErrorCodes().begin();
85  VString::const_iterator jstr = getErrorCodes().end();
86  for ( ; istr != jstr; ++istr ) { ss << *istr << " "; }
87  }
88  ss << std::endl;
89 }
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
tuple path
else: Piece not in the list, fine.
virtual void header(std::stringstream &) const
const VString & getErrorCodes() const
void FedCablingAnalysis::reset ( void  )
virtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 38 of file FedCablingAnalysis.cc.

References adcLevel_, candidates_, fedCh_, fedId_, and sistrip::invalid_.

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

38  {
42  candidates_.clear();
43 }
static const uint16_t invalid_
Definition: Constants.h:16

Friends And Related Function Documentation

friend class FedCablingAlgorithm
friend

Definition at line 30 of file FedCablingAnalysis.h.

Member Data Documentation

float FedCablingAnalysis::adcLevel_
private

Light level [ADC].

Definition at line 75 of file FedCablingAnalysis.h.

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

Candidates FedCablingAnalysis::candidates_
private

Container for candidate connections.

Definition at line 78 of file FedCablingAnalysis.h.

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

uint16_t FedCablingAnalysis::fedCh_
private

FED channel

Definition at line 72 of file FedCablingAnalysis.h.

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

uint16_t FedCablingAnalysis::fedId_
private

FED id

Definition at line 69 of file FedCablingAnalysis.h.

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

const float FedCablingAnalysis::threshold_ = 100.
static

Threshold to identify candidate connections.

Definition at line 62 of file FedCablingAnalysis.h.

Referenced by FedCablingAlgorithm::analyse().