CMS 3D CMS Logo

FedCablingAnalysis Class Reference

Author:
R.Bainbridge
More...

#include <CondFormats/SiStripObjects/interface/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
 Light level [ADC].
const Candidatescandidates () const
 Container for candidate connections.
 FedCablingAnalysis ()
 FedCablingAnalysis (const uint32_t &key)
const uint16_t & fedCh () const
 FED channel.
const uint16_t & fedId () const
 FED id.
bool isValid () const
 Identifies if analysis is valid or not.
void print (std::stringstream &, uint32_t not_used=0)
 Prints analysis results.
void reset ()
 Resets analysis member data.
virtual ~FedCablingAnalysis ()

Static Public Attributes

static const float threshold_ = 100.
 Threshold to identify candidate connections.

Private Attributes

float adcLevel_
 Light level [ADC].
Candidates candidates_
 Container for candidate connections.
uint16_t fedCh_
 FED channel.
uint16_t fedId_
 FED id.

Friends

class FedCablingAlgorithm


Detailed Description

Author:
R.Bainbridge

Histogram-based analysis for connection loop.

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  ) 

Definition at line 18 of file FedCablingAnalysis.cc.

FedCablingAnalysis::FedCablingAnalysis (  ) 

Definition at line 28 of file FedCablingAnalysis.cc.

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

Definition at line 26 of file FedCablingAnalysis.h.

00026 {;}


Member Function Documentation

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

Light level [ADC].

Definition at line 86 of file FedCablingAnalysis.h.

References adcLevel_.

00086 { return adcLevel_; }

const FedCablingAnalysis::Candidates & FedCablingAnalysis::candidates (  )  const [inline]

Container for candidate connections.

Definition at line 87 of file FedCablingAnalysis.h.

References candidates_.

00087 { return candidates_; } 

const uint16_t & FedCablingAnalysis::fedCh (  )  const [inline]

FED channel.

Definition at line 85 of file FedCablingAnalysis.h.

References fedCh_.

00085 { return fedCh_; } 

const uint16_t & FedCablingAnalysis::fedId (  )  const [inline]

FED id.

Definition at line 84 of file FedCablingAnalysis.h.

References fedId_.

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

00047                                        {
00048   return ( fedId_ < sistrip::maximum_ &&
00049            fedCh_ < sistrip::maximum_ &&
00050            adcLevel_ < 1+sistrip::maximum_ &&
00051            !candidates_.empty() &&
00052            getErrorCodes().empty() );
00053 } 

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_, empty, lat::endl(), fedCh_, SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), fedId_, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), iter, and path().

00057                                                                        { 
00058   header( ss );
00059   ss <<  std::fixed << std::setprecision(2)
00060      << " Connected FED id               : " << fedId_ << std::endl 
00061      << " Connected FED channel          : " << fedCh_ << std::endl
00062      << " Signal level             [ADC] : " << adcLevel_ << std::endl;
00063   ss << " nCandidates                    : " << candidates_.size() << std::endl
00064      << " FedId/FedChannel/ADC) : ";
00065   if ( candidates_.empty() ) { ss << "(none)"; }
00066   else {
00067     Candidates::const_iterator iter;
00068     for ( iter = candidates_.begin(); iter != candidates_.end(); iter++ ) { 
00069       SiStripFedKey path( iter->first );
00070       ss << path.fedId() << "/" 
00071          << path.fedChannel() << "/" 
00072          << iter->second << " ";
00073     }
00074   }
00075   ss << std::endl;
00076   ss << std::boolalpha
00077      << " isValid                : " << isValid()  << std::endl
00078      << std::noboolalpha
00079      << " Error codes (found "  
00080      << std::setw(2) << std::setfill(' ') << getErrorCodes().size() 
00081      << ") : ";
00082   if ( getErrorCodes().empty() ) { ss << "(none)"; }
00083   else { 
00084     VString::const_iterator istr = getErrorCodes().begin();
00085     VString::const_iterator jstr = getErrorCodes().end();
00086     for ( ; istr != jstr; ++istr ) { ss << *istr << " "; }
00087   }
00088   ss << std::endl;
00089 }

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

00038                                {
00039     fedId_ = sistrip::invalid_; 
00040     fedCh_ = sistrip::invalid_;
00041     adcLevel_ = 1.*sistrip::invalid_;
00042     candidates_.clear();
00043 }


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


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