CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Friends
SiStripThreshold::Data Struct Reference

#include <SiStripThreshold.h>

Public Member Functions

void encode (const uint16_t &strip, const float &lTh, const float &hTh)
 
void encode (const uint16_t &strip, const float &lTh, const float &hTh, const float &cTh)
 
float getClusth () const
 
uint16_t getFirstStrip () const
 
float getHth () const
 
float getLth () const
 
bool operator< (const Data &d) const
 
bool operator== (const Data &d) const
 
void print (std::stringstream &ss) const
 

Public Attributes

uint8_t clusTh
 
uint16_t FirstStrip_and_Hth
 
uint8_t lowTh
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 44 of file SiStripThreshold.h.

Member Function Documentation

◆ encode() [1/2]

void SiStripThreshold::Data::encode ( const uint16_t &  strip,
const float &  lTh,
const float &  hTh 
)
inline

Definition at line 46 of file SiStripThreshold.h.

References clusTh, FirstStrip_and_Hth, sistrip::FirstThStripMask_, sistrip::FirstThStripShift_, sistrip::HighThStripMask_, lowTh, sistrip::LowThStripMask_, and nano_mu_digi_cff::strip.

Referenced by encode().

46  {
48  ((uint32_t)(hTh * 5.0 + 0.5) & sistrip::HighThStripMask_);
49 
50  lowTh = ((uint32_t)(lTh * 5.0 + 0.5) & sistrip::LowThStripMask_);
51  clusTh = 0; //put as default;
52  }
static const uint32_t FirstThStripShift_
static const uint32_t HighThStripMask_
static const uint32_t LowThStripMask_
static const uint32_t FirstThStripMask_

◆ encode() [2/2]

void SiStripThreshold::Data::encode ( const uint16_t &  strip,
const float &  lTh,
const float &  hTh,
const float &  cTh 
)
inline

Definition at line 54 of file SiStripThreshold.h.

References clusTh, encode(), and nano_mu_digi_cff::strip.

54  {
55  encode(strip, lTh, hTh);
56  clusTh = (uint8_t)(cTh * 10 + .5);
57  }
void encode(const uint16_t &strip, const float &lTh, const float &hTh)

◆ getClusth()

float SiStripThreshold::Data::getClusth ( ) const
inline

Definition at line 62 of file SiStripThreshold.h.

References clusTh.

Referenced by print().

62 { return clusTh / 10.0; }

◆ getFirstStrip()

uint16_t SiStripThreshold::Data::getFirstStrip ( ) const
inline

Definition at line 59 of file SiStripThreshold.h.

References FirstStrip_and_Hth, and sistrip::FirstThStripShift_.

Referenced by print().

static const uint32_t FirstThStripShift_

◆ getHth()

float SiStripThreshold::Data::getHth ( ) const
inline

◆ getLth()

float SiStripThreshold::Data::getLth ( ) const
inline

◆ operator<()

bool SiStripThreshold::Data::operator< ( const Data d) const
inline

Definition at line 67 of file SiStripThreshold.h.

References ztail::d, and FirstStrip_and_Hth.

67 { return (FirstStrip_and_Hth < d.FirstStrip_and_Hth); }
d
Definition: ztail.py:151

◆ operator==()

bool SiStripThreshold::Data::operator== ( const Data d) const
inline

Definition at line 64 of file SiStripThreshold.h.

References clusTh, ztail::d, getHth(), and lowTh.

64  {
65  return (getHth() == d.getHth()) && (lowTh == d.lowTh) && (clusTh == d.clusTh);
66  }
d
Definition: ztail.py:151

◆ print()

void SiStripThreshold::Data::print ( std::stringstream &  ss) const
inline

Definition at line 69 of file SiStripThreshold.h.

References getClusth(), getFirstStrip(), getHth(), getLth(), and contentValuesCheck::ss.

69  {
70  ss << "firstStrip: " << getFirstStrip() << " \t"
71  << "lTh: "
72  << " " << getLth() << " \t"
73  << "hTh: "
74  << " " << getHth() << " \t"
75  << "cTh: "
76  << " " << getClusth() << " \t";
77  }
uint16_t getFirstStrip() const

◆ serialize()

template<class Archive >
void SiStripThreshold::Data::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 83 of file SiStripThreshold.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 83 of file SiStripThreshold.h.

Member Data Documentation

◆ clusTh

uint8_t SiStripThreshold::Data::clusTh

Definition at line 81 of file SiStripThreshold.h.

Referenced by encode(), getClusth(), and operator==().

◆ FirstStrip_and_Hth

uint16_t SiStripThreshold::Data::FirstStrip_and_Hth

Definition at line 79 of file SiStripThreshold.h.

Referenced by encode(), getFirstStrip(), getHth(), and operator<().

◆ lowTh

uint8_t SiStripThreshold::Data::lowTh

Definition at line 80 of file SiStripThreshold.h.

Referenced by encode(), getLth(), and operator==().