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 23 of file VpspScanAnalysis.h.

23 { ; }

Member Function Documentation

const VpspScanAnalysis::VInt & VpspScanAnalysis::adcLevel ( ) const
inline

Signal levels [ADC] for VPSP settings.

Definition at line 86 of file VpspScanAnalysis.h.

References adcLevel_.

Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().

86 { return adcLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::bottomEdge ( ) const
inline

VPSP setting where baseline leaves "D0" level.

Definition at line 89 of file VpspScanAnalysis.h.

References bottomEdge_.

Referenced by VpspScanHistosUsingDb::create().

89 { return bottomEdge_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::bottomLevel ( ) const
inline

Signal level [ADC] for "digital zero".

Definition at line 91 of file VpspScanAnalysis.h.

References bottomLevel_.

Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().

91 { return bottomLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::fraction ( ) const
inline

Not used.

Definition at line 87 of file VpspScanAnalysis.h.

References fraction_.

Referenced by VpspScanHistosUsingDb::create().

87 { 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 93 of file VpspScanAnalysis.cc.

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

93  {
94  if (iapv == 1 || iapv == 2) {
95  iapv--;
96  } else {
97  iapv = 0;
98  }
99  header(ss);
100  ss << " Monitorables for APV : " << iapv;
101  if (iapv == 0) {
102  ss << " (first of pair)";
103  } else if (iapv == 1) {
104  ss << " (second of pair)";
105  }
106  ss << std::endl;
107  ss << std::fixed << std::setprecision(2) << " VPSP setting : " << vpsp_[iapv] << std::endl
108  << " Signal level [ADC] : " << adcLevel_[iapv] << std::endl
109  << " Fraction [%] : "
110  << "(N/A)" /*fraction_[iapv]*/ << std::endl
111  << " Top edge [bin] : " << topEdge_[iapv] << std::endl
112  << " Bottom edge [bin] : " << bottomEdge_[iapv] << std::endl
113  << " Top level [ADC] : " << topLevel_[iapv] << std::endl
114  << " Bottom level [ADC] : " << bottomLevel_[iapv] << std::endl
115  << std::boolalpha << " isValid : " << isValid() << std::endl
116  << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
117  << "): ";
118  if (getErrorCodes().empty()) {
119  ss << "(none)";
120  } else {
121  VString::const_iterator istr = getErrorCodes().begin();
122  VString::const_iterator jstr = getErrorCodes().end();
123  for (; istr != jstr; ++istr) {
124  ss << *istr << " ";
125  }
126  }
127  ss << std::endl;
128 }
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 42 of file VpspScanAnalysis.cc.

References sistrip::invalid_, and vpsp_.

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

42 { vpsp_ = VInt(2, sistrip::invalid_); }
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 55 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(), castor_dqm_sourceclient_file_cfg::path, SiStripEnumsAndStrings::runType(), AlCaHLTBitMon_QueryRunRegistry::string, and overlapproblemtsosanalyzer_cfi::title.

55  {
56  SiStripFecKey fec_key(fecKey());
57  SiStripFedKey fed_key(fedKey());
58 
60 
61  std::stringstream extra1, extra2;
62  extra1 << sistrip::apv_ << "0";
63  extra2 << sistrip::apv_ << "1";
64 
66  type,
68  fed_key.key(),
70  fec_key.lldChan(),
71  extra1.str())
72  .title();
74  type,
76  fed_key.key(),
78  fec_key.lldChan(),
79  extra2.str())
80  .title();
81 
82  ss << " Summary"
83  << ":" << (isValid() ? "Valid" : "Invalid") << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/"
84  << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":"
85  << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_
86  << SiStripFecKey(fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan())
87  .path()
88  << ":" << title1 << ";" << title2 << std::endl;
89 }
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 88 of file VpspScanAnalysis.h.

References topEdge_.

Referenced by VpspScanHistosUsingDb::create().

88 { return topEdge_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::topLevel ( ) const
inline

Signal level [ADC] for "digital one".

Definition at line 90 of file VpspScanAnalysis.h.

References topLevel_.

Referenced by VpspScanHistosUsingDb::create(), and VpspScanSummaryFactory::extract().

90 { return topLevel_; }
const VpspScanAnalysis::VInt & VpspScanAnalysis::vpsp ( ) const
inline

VPSP settings for both APVs.

Definition at line 85 of file VpspScanAnalysis.h.

References vpsp_.

Referenced by VpspScanHistosUsingDb::create(), VpspScanSummaryFactory::extract(), and VpspScanHistosUsingDb::update().

85 { return vpsp_; }

Friends And Related Function Documentation

friend class VpspScanAlgorithm
friend

Definition at line 25 of file VpspScanAnalysis.h.

Member Data Documentation

VInt VpspScanAnalysis::adcLevel_
private

Definition at line 70 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::bottomEdge_
private

Definition at line 76 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::bottomLevel_
private

Definition at line 80 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::fraction_
private

Definition at line 72 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::topEdge_
private

Definition at line 74 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::topLevel_
private

Definition at line 78 of file VpspScanAnalysis.h.

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

VInt VpspScanAnalysis::vpsp_
private

VPSP settings

Definition at line 68 of file VpspScanAnalysis.h.

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