CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

CommissioningAnalysis Class Reference

Abstract base for derived classes that provide analysis of commissioning histograms. More...

#include <CommissioningAnalysis.h>

Inheritance diagram for CommissioningAnalysis:
ApvLatencyAnalysis ApvTimingAnalysis CalibrationAnalysis DaqScopeModeAnalysis FastFedCablingAnalysis FedCablingAnalysis FedTimingAnalysis NoiseAnalysis OptoScanAnalysis PedestalsAnalysis PedsFullNoiseAnalysis PedsOnlyAnalysis SamplingAnalysis VpspScanAnalysis

List of all members.

Public Types

typedef std::vector< float > VFloat
typedef std::vector< uint16_t > VInt
typedef std::vector< std::string > VString
typedef std::vector< VFloatVVFloat
typedef std::vector< VIntVVInt

Public Member Functions

virtual void addErrorCode (const std::string &error)
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 CommissioningAnalysis (const std::string &my_name)
void dcuId (const uint32_t &)
const uint32_t & dcuId () const
void detId (const uint32_t &)
const uint32_t & detId () const
const uint32_t & fecKey () const
void fecKey (const uint32_t &)
void fedKey (const uint32_t &)
const uint32_t & fedKey () const
const VStringgetErrorCodes () const
virtual void header (std::stringstream &) const
virtual bool isValid () const
const std::string & myName () const
virtual void print (std::stringstream &, uint32_t not_used=0)=0
virtual void reset ()=0
void setErrorCodes (const VString &errors)
virtual void summary (std::stringstream &) const
virtual ~CommissioningAnalysis ()

Private Member Functions

 CommissioningAnalysis ()

Private Attributes

uint32_t dcuId_
uint32_t detId_
VString errors_
uint32_t fecKey_
uint32_t fedKey_
std::string myName_

Detailed Description

Abstract base for derived classes that provide analysis of commissioning histograms.

Author:
M.Wingham, R.Bainbridge

Definition at line 18 of file CommissioningAnalysis.h.


Member Typedef Documentation

typedef std::vector<float> CommissioningAnalysis::VFloat

Definition at line 33 of file CommissioningAnalysis.h.

typedef std::vector<uint16_t> CommissioningAnalysis::VInt

Definition at line 37 of file CommissioningAnalysis.h.

typedef std::vector<std::string> CommissioningAnalysis::VString

Definition at line 41 of file CommissioningAnalysis.h.

typedef std::vector<VFloat> CommissioningAnalysis::VVFloat

Definition at line 35 of file CommissioningAnalysis.h.

typedef std::vector<VInt> CommissioningAnalysis::VVInt

Definition at line 39 of file CommissioningAnalysis.h.


Constructor & Destructor Documentation

CommissioningAnalysis::CommissioningAnalysis ( const uint32_t &  key,
const std::string &  my_name 
)
CommissioningAnalysis::CommissioningAnalysis ( const std::string &  my_name)
virtual CommissioningAnalysis::~CommissioningAnalysis ( ) [inline, virtual]

Definition at line 29 of file CommissioningAnalysis.h.

{;}
CommissioningAnalysis::CommissioningAnalysis ( ) [inline, private]

Private default constructor.

Definition at line 105 of file CommissioningAnalysis.h.

{;}

Member Function Documentation

void CommissioningAnalysis::addErrorCode ( const std::string &  error) [inline, virtual]
const uint32_t & CommissioningAnalysis::dcuId ( ) const [inline]
void CommissioningAnalysis::dcuId ( const uint32_t &  dcu_id) [inline]

Sets DCU id.

Definition at line 146 of file CommissioningAnalysis.h.

References dcuId_.

{ dcuId_ = dcu_id; }
const uint32_t & CommissioningAnalysis::detId ( ) const [inline]
void CommissioningAnalysis::detId ( const uint32_t &  det_id) [inline]

Sets DetId.

Definition at line 147 of file CommissioningAnalysis.h.

References detId_.

{ detId_ = det_id; }
const uint32_t & CommissioningAnalysis::fecKey ( ) const [inline]
void CommissioningAnalysis::fecKey ( const uint32_t &  key) [inline]

Sets FEC key (encodes control structure).

Definition at line 143 of file CommissioningAnalysis.h.

References fecKey_, and combine::key.

{ fecKey_ = key; }
const uint32_t & CommissioningAnalysis::fedKey ( ) const [inline]
void CommissioningAnalysis::fedKey ( const uint32_t &  key) [inline]

Sets FED key (encodes readout structure).

Definition at line 144 of file CommissioningAnalysis.h.

References fedKey_, and combine::key.

{ fedKey_ = key; }
const CommissioningAnalysis::VString & CommissioningAnalysis::getErrorCodes ( ) const [inline]
void CommissioningAnalysis::header ( std::stringstream &  ss) const [virtual]

Header information for analysis print().

Reimplemented in FastFedCablingAnalysis.

Definition at line 32 of file CommissioningAnalysis.cc.

References SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), dcuId_, detId_, SiStripFecKey::fecCrate(), SiStripFedKey::feChan(), fecKey_, SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), SiStripFedKey::fedChannel(), SiStripFedKey::fedId(), fedKey_, SiStripFedKey::feUnit(), SiStripFecKey::lldChan(), and myName().

Referenced by PedestalsAnalysis::print(), DaqScopeModeAnalysis::print(), SamplingAnalysis::print(), FedTimingAnalysis::print(), VpspScanAnalysis::print(), ApvLatencyAnalysis::print(), NoiseAnalysis::print(), ApvTimingAnalysis::print(), FedCablingAnalysis::print(), OptoScanAnalysis::print(), PedsFullNoiseAnalysis::print(), CalibrationAnalysis::print(), and PedsOnlyAnalysis::print().

                                                              { 
  ss << "[" << myName() << "] Monitorables (65535 means \"invalid\"):" << std::endl;

  //summary(ss);

  SiStripFecKey fec_key( fecKey_ );
  ss << " Crate/FEC/Ring/CCU/Mod/LLD     : " 
     << fec_key.fecCrate() << "/" 
     << fec_key.fecSlot() << "/" 
     << fec_key.fecRing() << "/" 
     << fec_key.ccuAddr() << "/" 
     << fec_key.ccuChan() << "/" 
     << fec_key.lldChan() 
     << std::endl;

  SiStripFedKey fed_key( fedKey_ );
  ss << " FedId/FeUnit/FeChan/FedChannel : " 
     << fed_key.fedId() << "/" 
     << fed_key.feUnit() << "/" 
     << fed_key.feChan() << "/"
     << fed_key.fedChannel()
     << std::endl;
  // if ( fed_key.fedChannel() != sistrip::invalid_ ) { ss << fed_key.fedChannel(); }
  // else { ss << "(invalid)"; }
  // ss << std::endl;
  
//   ss << " FecKey/Fedkey (hex)            : 0x" 
//      << std::hex 
//      << std::setw(8) << std::setfill('0') << fecKey_
//      << " / 0x" 
//      << std::setw(8) << std::setfill('0') << fedKey_
//      << std::dec
//      << std::endl;
  
  ss << " FecKey (hex/dec)               : 0x" 
     << std::hex 
     << std::setw(8) << std::setfill('0') << fecKey_ 
     << " / "
     << std::dec
     << std::setw(10) << std::setfill(' ') << fecKey_ 
     << std::endl;

  ss << " FedKey (hex/dec)               : 0x" 
     << std::hex 
     << std::setw(8) << std::setfill('0') << fedKey_ 
     << " / "
     << std::dec
     << std::setw(10) << std::setfill(' ') << fedKey_ 
     << std::endl;
  
  ss << " DcuId (hex/dec)                : 0x" 
     << std::hex 
     << std::setw(8) << std::setfill('0') << dcuId_ 
     << " / "
     << std::dec
     << std::setw(10) << std::setfill(' ') << dcuId_ 
     << std::endl;

  ss << " DetId (hex/dec)                : 0x" 
     << std::hex 
     << std::setw(8) << std::setfill('0') << detId_ 
     << " / "
     << std::dec
     << std::setw(10) << std::setfill(' ') << detId_ 
     << std::endl;
  
}
virtual bool CommissioningAnalysis::isValid ( void  ) const [inline, virtual]
const std::string & CommissioningAnalysis::myName ( void  ) const [inline]
virtual void CommissioningAnalysis::print ( std::stringstream &  ,
uint32_t  not_used = 0 
) [pure virtual]
virtual void CommissioningAnalysis::reset ( ) [pure virtual]
void CommissioningAnalysis::setErrorCodes ( const VString errors) [inline]

Sets error codes generated by analyses.

Definition at line 149 of file CommissioningAnalysis.h.

References ExpressReco_HICollisions_FallBack::errors, and errors_.

{ errors_ = errors; }
void CommissioningAnalysis::summary ( std::stringstream &  ss) const [virtual]

Navigate information for analysis print().

Reimplemented in FastFedCablingAnalysis, NoiseAnalysis, OptoScanAnalysis, PedestalsAnalysis, PedsFullNoiseAnalysis, PedsOnlyAnalysis, and VpspScanAnalysis.

Definition at line 102 of file CommissioningAnalysis.cc.

References SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), sistrip::controlView_, sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, SiStripFecKey::fecCrate(), fecKey_, SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), sistrip::FED_KEY, fedKey(), isValid(), sistrip::LLD_CHAN, SiStripFecKey::lldChan(), myName(), path(), ExpressReco_HICollisions_FallBack::runType, and indexGen::title.

                                                               { 

  SiStripFecKey fec_key( fecKey_ );
  
  sistrip::RunType type = SiStripEnumsAndStrings::runType( myName() );
  std::string title = SiStripHistoTitle( sistrip::EXPERT_HISTO, 
                                         type,
                                         sistrip::FED_KEY, 
                                         fedKey(),
                                         sistrip::LLD_CHAN, 
                                         fec_key.lldChan() ).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()
     << ":"
     << title
     << std::endl;
  
}

Member Data Documentation

uint32_t CommissioningAnalysis::dcuId_ [private]

DCU Id.

Definition at line 118 of file CommissioningAnalysis.h.

Referenced by dcuId(), and header().

uint32_t CommissioningAnalysis::detId_ [private]

DetId.

Definition at line 121 of file CommissioningAnalysis.h.

Referenced by detId(), and header().

Error codes.

Definition at line 127 of file CommissioningAnalysis.h.

Referenced by addErrorCode(), getErrorCodes(), and setErrorCodes().

uint32_t CommissioningAnalysis::fecKey_ [private]

FEC key object.

Definition at line 112 of file CommissioningAnalysis.h.

Referenced by fecKey(), header(), and summary().

uint32_t CommissioningAnalysis::fedKey_ [private]

FEC key object.

Definition at line 115 of file CommissioningAnalysis.h.

Referenced by fedKey(), and header().

std::string CommissioningAnalysis::myName_ [private]

Object name.

Definition at line 124 of file CommissioningAnalysis.h.

Referenced by myName().