Histogram-based analysis for VPSP scan. More...
#include <VpspScanAnalysis.h>
Public Member Functions | |
const VInt & | adcLevel () const |
const VInt & | bottomEdge () const |
const VInt & | bottomLevel () const |
const VInt & | fraction () const |
bool | isValid () const |
void | print (std::stringstream &, uint32_t not_used=0) |
void | reset () |
void | summary (std::stringstream &) const |
const VInt & | topEdge () const |
const VInt & | topLevel () const |
const VInt & | vpsp () const |
VpspScanAnalysis () | |
VpspScanAnalysis (const uint32_t &key) | |
virtual | ~VpspScanAnalysis () |
Private Attributes | |
VInt | adcLevel_ |
VInt | bottomEdge_ |
VInt | bottomLevel_ |
VInt | fraction_ |
VInt | topEdge_ |
VInt | topLevel_ |
VInt | vpsp_ |
Friends | |
class | VpspScanAlgorithm |
Histogram-based analysis for VPSP scan.
Definition at line 15 of file VpspScanAnalysis.h.
VpspScanAnalysis::VpspScanAnalysis | ( | const uint32_t & | key | ) |
Definition at line 14 of file VpspScanAnalysis.cc.
: CommissioningAnalysis(key,"VpspScanAnalysis"), vpsp_(2,sistrip::invalid_), adcLevel_(2,sistrip::invalid_), fraction_(2,sistrip::invalid_), topEdge_(2,sistrip::invalid_), bottomEdge_(2,sistrip::invalid_), topLevel_(2,sistrip::invalid_), bottomLevel_(2,sistrip::invalid_) {;}
VpspScanAnalysis::VpspScanAnalysis | ( | ) |
Definition at line 27 of file VpspScanAnalysis.cc.
: CommissioningAnalysis("VpspScanAnalysis"), vpsp_(2,sistrip::invalid_), adcLevel_(2,sistrip::invalid_), fraction_(2,sistrip::invalid_), topEdge_(2,sistrip::invalid_), bottomEdge_(2,sistrip::invalid_), topLevel_(2,sistrip::invalid_), bottomLevel_(2,sistrip::invalid_) {;}
virtual VpspScanAnalysis::~VpspScanAnalysis | ( | ) | [inline, virtual] |
Definition at line 25 of file VpspScanAnalysis.h.
{;}
const VpspScanAnalysis::VInt & VpspScanAnalysis::adcLevel | ( | ) | const [inline] |
Signal levels [ADC] for VPSP settings.
Definition at line 90 of file VpspScanAnalysis.h.
References adcLevel_.
Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().
{ return adcLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::bottomEdge | ( | ) | const [inline] |
VPSP setting where baseline leaves "D0" level.
Definition at line 93 of file VpspScanAnalysis.h.
References bottomEdge_.
Referenced by VpspScanHistosUsingDb::create().
{ return bottomEdge_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::bottomLevel | ( | ) | const [inline] |
Signal level [ADC] for "digital zero".
Definition at line 95 of file VpspScanAnalysis.h.
References bottomLevel_.
Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().
{ return bottomLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::fraction | ( | ) | const [inline] |
Not used.
Definition at line 91 of file VpspScanAnalysis.h.
References fraction_.
Referenced by VpspScanHistosUsingDb::create().
{ return fraction_; }
bool VpspScanAnalysis::isValid | ( | void | ) | const [virtual] |
Identifies if analysis is valid or not.
Reimplemented from CommissioningAnalysis.
Definition at line 46 of file VpspScanAnalysis.cc.
References adcLevel_, bottomLevel_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), topLevel_, sistrip::valid_, and vpsp_.
Referenced by VpspScanHistosUsingDb::create(), VpspScanHistograms::histoAnalysis(), print(), and summary().
{ return ( vpsp_[0] < 1. * sistrip::valid_ && vpsp_[1] < 1. * sistrip::valid_ && adcLevel_[0] < 1. * sistrip::valid_ && adcLevel_[1] < 1. * sistrip::valid_ && topLevel_[0] < 1. * sistrip::valid_ && topLevel_[1] < 1. * sistrip::valid_ && bottomLevel_[0] < 1. * sistrip::valid_ && bottomLevel_[1] < 1. * sistrip::valid_ && getErrorCodes().empty() ); }
void VpspScanAnalysis::print | ( | std::stringstream & | ss, |
uint32_t | not_used = 0 |
||
) | [virtual] |
Prints analysis results.
Implements CommissioningAnalysis.
Definition at line 112 of file VpspScanAnalysis.cc.
References adcLevel_, bottomEdge_, bottomLevel_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), topEdge_, topLevel_, and vpsp_.
{ if ( iapv == 1 || iapv == 2 ) { iapv--; } else { iapv = 0; } header( ss ); ss << " Monitorables for APV : " << iapv; if ( iapv == 0 ) { ss << " (first of pair)"; } else if ( iapv == 1 ) { ss << " (second of pair)"; } ss << std::endl; ss << std::fixed << std::setprecision(2) << " VPSP setting : " << vpsp_[iapv] << std::endl << " Signal level [ADC] : " << adcLevel_[iapv] << std::endl << " Fraction [%] : " << "(N/A)" /*fraction_[iapv]*/ << std::endl << " Top edge [bin] : " << topEdge_[iapv] << std::endl << " Bottom edge [bin] : " << bottomEdge_[iapv] << std::endl << " Top level [ADC] : " << topLevel_[iapv] << std::endl << " Bottom level [ADC] : " << bottomLevel_[iapv] << std::endl << 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 VpspScanAnalysis::reset | ( | void | ) | [virtual] |
Resets analysis member data.
Implements CommissioningAnalysis.
Definition at line 40 of file VpspScanAnalysis.cc.
References sistrip::invalid_, and vpsp_.
{ vpsp_ = VInt(2,sistrip::invalid_); }
void VpspScanAnalysis::summary | ( | std::stringstream & | ss | ) | const [virtual] |
Overrides base method.
Reimplemented from CommissioningAnalysis.
Definition at line 60 of file VpspScanAnalysis.cc.
References sistrip::apv_, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), sistrip::controlView_, sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, SiStripFecKey::fecCrate(), CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), sistrip::FED_KEY, CommissioningAnalysis::fedKey(), isValid(), SiStripKey::key(), sistrip::LLD_CHAN, SiStripFecKey::lldChan(), CommissioningAnalysis::myName(), path(), ExpressReco_HICollisions_FallBack::runType, and indexGen::title.
{ SiStripFecKey fec_key( fecKey() ); SiStripFedKey fed_key( fedKey() ); sistrip::RunType type = SiStripEnumsAndStrings::runType( myName() ); std::stringstream extra1,extra2; extra1 << sistrip::apv_ << "0"; extra2 << sistrip::apv_ << "1"; std::string title1 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan(), extra1.str() ).title(); std::string title2 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan(), extra2.str() ).title(); ss << " Summary" << ":" << ( isValid() ? "Valid" : "Invalid" ) << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":" << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_ << SiStripFecKey( fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan() ).path() << ":" << title1 << ";" << title2 << std::endl; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::topEdge | ( | ) | const [inline] |
VPSP setting where baseline leaves "D1" level.
Definition at line 92 of file VpspScanAnalysis.h.
References topEdge_.
Referenced by VpspScanHistosUsingDb::create().
{ return topEdge_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::topLevel | ( | ) | const [inline] |
Signal level [ADC] for "digital one".
Definition at line 94 of file VpspScanAnalysis.h.
References topLevel_.
Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().
{ return topLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::vpsp | ( | ) | const [inline] |
VPSP settings for both APVs.
Definition at line 89 of file VpspScanAnalysis.h.
References vpsp_.
Referenced by VpspScanHistosUsingDb::create(), VpspScanSummaryFactory::extract(), and VpspScanHistosUsingDb::update().
{ return vpsp_; }
friend class VpspScanAlgorithm [friend] |
Definition at line 27 of file VpspScanAnalysis.h.
VInt VpspScanAnalysis::adcLevel_ [private] |
Definition at line 73 of file VpspScanAnalysis.h.
Referenced by adcLevel(), VpspScanAlgorithm::analyse(), isValid(), and print().
VInt VpspScanAnalysis::bottomEdge_ [private] |
Definition at line 79 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), bottomEdge(), and print().
VInt VpspScanAnalysis::bottomLevel_ [private] |
Definition at line 83 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), bottomLevel(), isValid(), and print().
VInt VpspScanAnalysis::fraction_ [private] |
Definition at line 75 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), and fraction().
VInt VpspScanAnalysis::topEdge_ [private] |
Definition at line 77 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), print(), and topEdge().
VInt VpspScanAnalysis::topLevel_ [private] |
Definition at line 81 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), isValid(), print(), and topLevel().
VInt VpspScanAnalysis::vpsp_ [private] |
VPSP settings
Definition at line 71 of file VpspScanAnalysis.h.
Referenced by VpspScanAlgorithm::analyse(), isValid(), print(), reset(), and vpsp().