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() [1/2]

VpspScanAnalysis::VpspScanAnalysis ( const uint32_t &  key)

Definition at line 14 of file VpspScanAnalysis.cc.

15  : CommissioningAnalysis(key, "VpspScanAnalysis"),
23  ;
24 }
key
prepare the HTCondor submission files and eventually submit them
static const uint16_t invalid_
Definition: Constants.h:16

◆ VpspScanAnalysis() [2/2]

VpspScanAnalysis::VpspScanAnalysis ( )

◆ ~VpspScanAnalysis()

VpspScanAnalysis::~VpspScanAnalysis ( )
inlineoverride

Definition at line 23 of file VpspScanAnalysis.h.

23 { ; }

Member Function Documentation

◆ adcLevel()

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

Signal levels [ADC] for VPSP settings.

Definition at line 86 of file VpspScanAnalysis.h.

References adcLevel_.

86 { return adcLevel_; }

◆ bottomEdge()

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

VPSP setting where baseline leaves "D0" level.

Definition at line 89 of file VpspScanAnalysis.h.

References bottomEdge_.

89 { return bottomEdge_; }

◆ bottomLevel()

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

Signal level [ADC] for "digital zero".

Definition at line 91 of file VpspScanAnalysis.h.

References bottomLevel_.

91 { return bottomLevel_; }

◆ fraction()

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

Not used.

Definition at line 87 of file VpspScanAnalysis.h.

References fraction_.

87 { return fraction_; }

◆ isValid()

bool VpspScanAnalysis::isValid ( void  ) const
overridevirtual

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 ntupleDataFormat._Object::_checkIsValid(), print(), core.AutoHandle.AutoHandle::ReallyLoad(), and summary().

46  {
47  return (vpsp_[0] < 1. * sistrip::valid_ && vpsp_[1] < 1. * sistrip::valid_ && adcLevel_[0] < 1. * sistrip::valid_ &&
48  adcLevel_[1] < 1. * sistrip::valid_ && topLevel_[0] < 1. * sistrip::valid_ &&
49  topLevel_[1] < 1. * sistrip::valid_ && bottomLevel_[0] < 1. * sistrip::valid_ &&
51 }
const VString & getErrorCodes() const
static const uint16_t valid_
Definition: Constants.h:17

◆ print()

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(), contentValuesCheck::ss, 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 }
const VString & getErrorCodes() const
bool isValid() const override
virtual void header(std::stringstream &) const

◆ reset()

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

◆ summary()

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(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::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 }
bool isValid() const override
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 &)
const std::string & myName() const
static const char controlView_[]
static const char dqmRoot_[]
const uint32_t & fecKey() const
const uint32_t & fedKey() const
static const char apv_[]

◆ topEdge()

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

VPSP setting where baseline leaves "D1" level.

Definition at line 88 of file VpspScanAnalysis.h.

References topEdge_.

88 { return topEdge_; }

◆ topLevel()

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

Signal level [ADC] for "digital one".

Definition at line 90 of file VpspScanAnalysis.h.

References topLevel_.

90 { return topLevel_; }

◆ vpsp()

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

VPSP settings for both APVs.

Definition at line 85 of file VpspScanAnalysis.h.

References vpsp_.

85 { return vpsp_; }

Friends And Related Function Documentation

◆ VpspScanAlgorithm

friend class VpspScanAlgorithm
friend

Definition at line 25 of file VpspScanAnalysis.h.

Member Data Documentation

◆ adcLevel_

VInt VpspScanAnalysis::adcLevel_
private

Definition at line 70 of file VpspScanAnalysis.h.

Referenced by adcLevel(), isValid(), and print().

◆ bottomEdge_

VInt VpspScanAnalysis::bottomEdge_
private

Definition at line 76 of file VpspScanAnalysis.h.

Referenced by bottomEdge(), and print().

◆ bottomLevel_

VInt VpspScanAnalysis::bottomLevel_
private

Definition at line 80 of file VpspScanAnalysis.h.

Referenced by bottomLevel(), isValid(), and print().

◆ fraction_

VInt VpspScanAnalysis::fraction_
private

Definition at line 72 of file VpspScanAnalysis.h.

Referenced by fraction().

◆ topEdge_

VInt VpspScanAnalysis::topEdge_
private

Definition at line 74 of file VpspScanAnalysis.h.

Referenced by print(), and topEdge().

◆ topLevel_

VInt VpspScanAnalysis::topLevel_
private

Definition at line 78 of file VpspScanAnalysis.h.

Referenced by isValid(), print(), and topLevel().

◆ vpsp_

VInt VpspScanAnalysis::vpsp_
private

VPSP settings

Definition at line 68 of file VpspScanAnalysis.h.

Referenced by isValid(), print(), reset(), and vpsp().