CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

VpspScanAnalysis Class Reference

Histogram-based analysis for VPSP scan. More...

#include <VpspScanAnalysis.h>

Inheritance diagram for VpspScanAnalysis:
CommissioningAnalysis

List of all members.

Public Member Functions

const VIntadcLevel () const
const VIntbottomEdge () const
const VIntbottomLevel () const
const VIntfraction () const
bool isValid () const
void print (std::stringstream &, uint32_t not_used=0)
void reset ()
void summary (std::stringstream &) const
const VInttopEdge () const
const VInttopLevel () const
const VIntvpsp () 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

Detailed Description

Histogram-based analysis for VPSP scan.

Author:
M. Wingham, R.Bainbridge

Definition at line 15 of file VpspScanAnalysis.h.


Constructor & Destructor Documentation

VpspScanAnalysis::VpspScanAnalysis ( const uint32_t &  key)
VpspScanAnalysis::VpspScanAnalysis ( )
virtual VpspScanAnalysis::~VpspScanAnalysis ( ) [inline, virtual]

Definition at line 25 of file VpspScanAnalysis.h.

{;}

Member Function Documentation

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

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(), SiStripEnumsAndStrings::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_; }

Friends And Related Function Documentation

friend class VpspScanAlgorithm [friend]

Definition at line 27 of file VpspScanAnalysis.h.


Member Data Documentation

Definition at line 73 of file VpspScanAnalysis.h.

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

Definition at line 79 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), bottomEdge(), and print().

Definition at line 83 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), bottomLevel(), isValid(), and print().

Definition at line 75 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), and fraction().

Definition at line 77 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), print(), and topEdge().

Definition at line 81 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), isValid(), print(), and topLevel().

VPSP settings

Definition at line 71 of file VpspScanAnalysis.h.

Referenced by VpspScanAlgorithm::analyse(), isValid(), print(), reset(), and vpsp().