CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
VpspScanAnalysis Class Reference

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

#include <VpspScanAnalysis.h>

Inheritance diagram for VpspScanAnalysis:
CommissioningAnalysis

Public Member Functions

const VIntadcLevel () const
 
const VIntbottomEdge () const
 
const VIntbottomLevel () const
 
const VIntfraction () const
 
bool isValid () const override
 
void print (std::stringstream &, uint32_t not_used=0) override
 
void reset () override
 
void summary (std::stringstream &) const override
 
const VInttopEdge () const
 
const VInttopLevel () const
 
const VIntvpsp () const
 
 VpspScanAnalysis (const uint32_t &key)
 
 VpspScanAnalysis ()
 
 ~VpspScanAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
virtual void header (std::stringstream &) const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual ~CommissioningAnalysis ()
 

Private Attributes

VInt adcLevel_
 
VInt bottomEdge_
 
VInt bottomLevel_
 
VInt fraction_
 
VInt topEdge_
 
VInt topLevel_
 
VInt vpsp_
 

Friends

class VpspScanAlgorithm
 

Additional Inherited Members

- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

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 ( )
VpspScanAnalysis::~VpspScanAnalysis ( )
inlineoverride

Definition at line 25 of file VpspScanAnalysis.h.

25 {;}

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

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

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

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

91 { return fraction_; }
bool VpspScanAnalysis::isValid ( void  ) const
overridevirtual
void VpspScanAnalysis::print ( std::stringstream &  ss,
uint32_t  not_used = 0 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 112 of file VpspScanAnalysis.cc.

References adcLevel_, bottomEdge_, bottomLevel_, relativeConstraints::empty, alignBH_cfg::fixed, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), topEdge_, topLevel_, and vpsp_.

112  {
113  if ( iapv == 1 || iapv == 2 ) { iapv--; }
114  else { iapv = 0; }
115  header( ss );
116  ss << " Monitorables for APV : " << iapv;
117  if ( iapv == 0 ) { ss << " (first of pair)"; }
118  else if ( iapv == 1 ) { ss << " (second of pair)"; }
119  ss << std::endl;
120  ss << std::fixed << std::setprecision(2)
121  << " VPSP setting : " << vpsp_[iapv] << std::endl
122  << " Signal level [ADC] : " << adcLevel_[iapv] << std::endl
123  << " Fraction [%] : " << "(N/A)" /*fraction_[iapv]*/ << std::endl
124  << " Top edge [bin] : " << topEdge_[iapv] << std::endl
125  << " Bottom edge [bin] : " << bottomEdge_[iapv] << std::endl
126  << " Top level [ADC] : " << topLevel_[iapv] << std::endl
127  << " Bottom level [ADC] : " << bottomLevel_[iapv] << std::endl
128  << std::boolalpha
129  << " isValid : " << isValid() << std::endl
130  << std::noboolalpha
131  << " Error codes (found "
132  << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
133  << "): ";
134  if ( getErrorCodes().empty() ) { ss << "(none)"; }
135  else {
136  VString::const_iterator istr = getErrorCodes().begin();
137  VString::const_iterator jstr = getErrorCodes().end();
138  for ( ; istr != jstr; ++istr ) { ss << *istr << " "; }
139  }
140  ss << std::endl;
141 }
bool isValid() const override
virtual void header(std::stringstream &) const
const VString & getErrorCodes() const
void VpspScanAnalysis::reset ( void  )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 40 of file VpspScanAnalysis.cc.

References sistrip::invalid_, and vpsp_.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

40  {
42 }
std::vector< uint16_t > VInt
static const uint16_t invalid_
Definition: Constants.h:16
void VpspScanAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

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(), callgraph::path, SiStripEnumsAndStrings::runType(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

60  {
61 
62  SiStripFecKey fec_key( fecKey() );
63  SiStripFedKey fed_key( fedKey() );
64 
66 
67  std::stringstream extra1,extra2;
68  extra1 << sistrip::apv_ << "0";
69  extra2 << sistrip::apv_ << "1";
70 
72  type,
74  fed_key.key(),
76  fec_key.lldChan(),
77  extra1.str() ).title();
79  type,
81  fed_key.key(),
83  fec_key.lldChan(),
84  extra2.str() ).title();
85 
86  ss << " Summary"
87  << ":"
88  << ( isValid() ? "Valid" : "Invalid" )
89  << ":"
90  << sistrip::controlView_ << ":"
91  << fec_key.fecCrate() << "/"
92  << fec_key.fecSlot() << "/"
93  << fec_key.fecRing() << "/"
94  << fec_key.ccuAddr() << "/"
95  << fec_key.ccuChan()
96  << ":"
98  << "Collate" << sistrip::dir_
99  << SiStripFecKey( fec_key.fecCrate(),
100  fec_key.fecSlot(),
101  fec_key.fecRing(),
102  fec_key.ccuAddr(),
103  fec_key.ccuChan() ).path()
104  << ":"
105  << title1 << ";" << title2
106  << std::endl;
107 
108 }
type
Definition: HCALResponse.h:21
bool isValid() const override
const uint32_t & fedKey() const
static const char dir_[]
Utility class that holds histogram title.
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static std::string runType(const sistrip::RunType &)
static const char controlView_[]
static const char dqmRoot_[]
const uint32_t & fecKey() const
static const char apv_[]
const std::string & myName() const
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().

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

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

89 { return vpsp_; }

Friends And Related Function Documentation

friend class VpspScanAlgorithm
friend

Definition at line 27 of file VpspScanAnalysis.h.

Member Data Documentation

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