CMS 3D CMS Logo

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

List of all members.

Public Types

typedef std::map< uint32_t,
uint16_t > 
Candidates

Public Member Functions

const float & adcLevel () const
const Candidatescandidates () const
 FedCablingAnalysis ()
 FedCablingAnalysis (const uint32_t &key)
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 ()

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 ( ) [inline, virtual]

Definition at line 26 of file FedCablingAnalysis.h.

{;}

Member Function Documentation

const float & FedCablingAnalysis::adcLevel ( ) const [inline]

Light level [ADC].

Definition at line 86 of file FedCablingAnalysis.h.

References adcLevel_.

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

Container for candidate connections.

Definition at line 87 of file FedCablingAnalysis.h.

References candidates_.

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

FED channel.

Definition at line 85 of file FedCablingAnalysis.h.

References fedCh_.

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

FED id.

Definition at line 84 of file FedCablingAnalysis.h.

References fedId_.

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

                                       {
  return ( fedId_ < sistrip::maximum_ &&
           fedCh_ < sistrip::maximum_ &&
           adcLevel_ < 1+sistrip::maximum_ &&
           !candidates_.empty() &&
           getErrorCodes().empty() );
} 
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(), and getHLTPrescaleColumns::path.

                                                                       { 
  header( ss );
  ss <<  std::fixed << std::setprecision(2)
     << " Connected FED id               : " << fedId_ << std::endl 
     << " Connected FED channel          : " << fedCh_ << std::endl
     << " Signal level             [ADC] : " << adcLevel_ << std::endl;
  ss << " nCandidates                    : " << candidates_.size() << std::endl
     << " FedId/FedChannel/ADC) : ";
  if ( candidates_.empty() ) { ss << "(none)"; }
  else {
    Candidates::const_iterator iter;
    for ( iter = candidates_.begin(); iter != candidates_.end(); iter++ ) { 
      SiStripFedKey path( iter->first );
      ss << path.fedId() << "/" 
         << path.fedChannel() << "/" 
         << iter->second << " ";
    }
  }
  ss << std::endl;
  ss << std::boolalpha
     << " isValid                : " << isValid()  << std::endl
     << std::noboolalpha
     << " Error codes (found "  
     << std::setw(2) << std::setfill(' ') << getErrorCodes().size() 
     << ") : ";
  if ( getErrorCodes().empty() ) { ss << "(none)"; }
  else { 
    VString::const_iterator istr = getErrorCodes().begin();
    VString::const_iterator jstr = getErrorCodes().end();
    for ( ; istr != jstr; ++istr ) { ss << *istr << " "; }
  }
  ss << std::endl;
}
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_.


Friends And Related Function Documentation

friend class FedCablingAlgorithm [friend]

Definition at line 30 of file FedCablingAnalysis.h.


Member Data Documentation

Light level [ADC].

Definition at line 75 of file FedCablingAnalysis.h.

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

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