Histogram-based analysis for connection loop. More...
#include <FedCablingAnalysis.h>
Public Types | |
typedef std::map< uint32_t, uint16_t > | Candidates |
Public Member Functions | |
const float & | adcLevel () const |
const Candidates & | candidates () 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 |
Histogram-based analysis for connection loop.
Definition at line 16 of file FedCablingAnalysis.h.
typedef std::map<uint32_t,uint16_t> FedCablingAnalysis::Candidates |
Definition at line 28 of file FedCablingAnalysis.h.
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.
{;}
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] |
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 scaleCards::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_.
{ fedId_ = sistrip::invalid_; fedCh_ = sistrip::invalid_; adcLevel_ = 1.*sistrip::invalid_; candidates_.clear(); }
friend class FedCablingAlgorithm [friend] |
Definition at line 30 of file FedCablingAnalysis.h.
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().