CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SiStripFecKey Class Reference

Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25. More...

#include <SiStripFecKey.h>

Inheritance diagram for SiStripFecKey:
SiStripKey

Public Member Functions

const uint16_t & ccuAddr () const
 
const uint16_t & ccuChan () const
 
const uint16_t & fecCrate () const
 
const uint16_t & fecRing () const
 
const uint16_t & fecSlot () const
 
const uint16_t & i2cAddr () const
 
bool isConsistent (const SiStripKey &) const
 
bool isEqual (const SiStripKey &) const
 
bool isInvalid () const
 
bool isInvalid (const sistrip::Granularity &) const
 
bool isValid () const
 
bool isValid (const sistrip::Granularity &) const
 
const uint16_t & lldChan () const
 
virtual void print (std::stringstream &ss) const
 
 SiStripFecKey (const uint16_t &fec_crate, const uint16_t &fec_slot=0, const uint16_t &fec_ring=0, const uint16_t &ccu_addr=0, const uint16_t &ccu_chan=0, const uint16_t &lld_chan=0, const uint16_t &i2c_addr=0)
 
 SiStripFecKey (const uint32_t &fec_key)
 
 SiStripFecKey (const std::string &directory_path)
 
 SiStripFecKey (const SiStripFecKey &)
 
 SiStripFecKey (const SiStripKey &)
 
 SiStripFecKey (const SiStripKey &, const sistrip::Granularity &)
 
 SiStripFecKey ()
 
virtual void terse (std::stringstream &ss) const
 
- Public Member Functions inherited from SiStripKey
const uint16_t & channel () const
 
const sistrip::Granularitygranularity () const
 
const uint32_t & key () const
 
const SiStripKeyoperator= (const SiStripKey &)
 
const std::string & path () const
 
 SiStripKey (const uint32_t &key)
 
 SiStripKey (const std::string &directory_path)
 
 SiStripKey (const SiStripKey &)
 
 SiStripKey ()
 
virtual ~SiStripKey ()
 

Static Public Member Functions

static bool firstApvOfPair (const uint16_t &i2c_addr)
 
static uint16_t hybridPos (const uint16_t &i2c_addr)
 
static uint16_t i2cAddr (const uint16_t &hybrid_pos)
 
static uint16_t i2cAddr (const uint16_t &lld_chan, const bool &first_apv_of_pair)
 
static uint16_t lldChan (const uint16_t &i2c_addr)
 

Private Member Functions

void initFromKey ()
 
void initFromPath ()
 
void initFromValue ()
 
void initGranularity ()
 

Private Attributes

uint16_t ccuAddr_
 
uint16_t ccuChan_
 
uint16_t fecCrate_
 
uint16_t fecRing_
 
uint16_t fecSlot_
 
uint16_t i2cAddr_
 
uint16_t lldChan_
 

Static Private Attributes

static const uint16_t ccuAddrMask_ = 0xFF
 
static const uint16_t ccuAddrOffset_ = 10
 
static const uint16_t ccuChanMask_ = 0x1F
 
static const uint16_t ccuChanOffset_ = 5
 
static const uint16_t fecCrateMask_ = 0x07
 
static const uint16_t fecCrateOffset_ = 27
 
static const uint16_t fecRingMask_ = 0x0F
 
static const uint16_t fecRingOffset_ = 18
 
static const uint16_t fecSlotMask_ = 0x1F
 
static const uint16_t fecSlotOffset_ = 22
 
static const uint16_t i2cAddrMask_ = 0x03
 
static const uint16_t i2cAddrOffset_ = 0
 
static const uint16_t lldChanMask_ = 0x07
 
static const uint16_t lldChanOffset_ = 2
 

Additional Inherited Members

- Protected Member Functions inherited from SiStripKey
void channel (const uint16_t &)
 
void granularity (const sistrip::Granularity &)
 
void key (const uint32_t &)
 
void path (const std::string &)
 

Detailed Description

Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.

Author
R.Bainbridge

The class allows to encode the position within a 32-bit "key" and, conversely, unpack a 32-bit key to provide the position.

The class provides the following member data:

Member data (integer in type only) with values of 0xFFFF signifies "invalid" (ie, FecSlot = 0xFFFF means "invalid FEC slot"). Data with null values signifies "all" (ie, FecSlot = 0 means "all FEC slots").

The class generates a "directory path" string according to the member data. This can be used to organise histograms / other data types when using DQM / root. Conversely, the member data can also be built using the directory path when provided as a constructor argument.

The class also provides the "granularity" to which the FEC key is unambiguous (ie, not "invalid" or "null") in defining a position within the control system.

Definition at line 45 of file SiStripFecKey.h.

Constructor & Destructor Documentation

SiStripFecKey::SiStripFecKey ( const uint16_t &  fec_crate,
const uint16_t &  fec_slot = 0,
const uint16_t &  fec_ring = 0,
const uint16_t &  ccu_addr = 0,
const uint16_t &  ccu_chan = 0,
const uint16_t &  lld_chan = 0,
const uint16_t &  i2c_addr = 0 
)

Constructor using crate, FEC, ring, CCU, module and channel.

Definition at line 13 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( const uint32_t &  fec_key)

Constructor using 32-bit "FEC key".

Definition at line 38 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( const std::string &  directory_path)

Constructor using directory path.

Definition at line 57 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( const SiStripFecKey input)

Copy constructor.

Definition at line 76 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( const SiStripKey input)

Copy constructor using base class.

Definition at line 93 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( const SiStripKey input,
const sistrip::Granularity gran 
)

Copy to level specified by granularity.

Definition at line 120 of file SiStripFecKey.cc.

SiStripFecKey::SiStripFecKey ( )

Default constructor

Definition at line 182 of file SiStripFecKey.cc.

Member Function Documentation

const uint16_t & SiStripFecKey::ccuAddr ( ) const
inline
const uint16_t & SiStripFecKey::ccuChan ( ) const
inline
const uint16_t & SiStripFecKey::fecCrate ( ) const
inline
const uint16_t & SiStripFecKey::fecRing ( ) const
inline
const uint16_t & SiStripFecKey::fecSlot ( ) const
inline
bool SiStripFecKey::firstApvOfPair ( const uint16_t &  i2c_addr)
static

Identifies if first APV of pair for given I2C addr (32-37).

Definition at line 239 of file SiStripFecKey.cc.

uint16_t SiStripFecKey::hybridPos ( const uint16_t &  i2c_addr)
static

Returns hybrid position (1-6) for a given I2C addr (32-37).

Definition at line 195 of file SiStripFecKey.cc.

const uint16_t & SiStripFecKey::i2cAddr ( ) const
inline

Returns I2C address ("invalid" if inconsistent with LLD chan.

Definition at line 210 of file SiStripFecKey.h.

uint16_t SiStripFecKey::i2cAddr ( const uint16_t &  hybrid_pos)
static

Returns I2C addr (32-37) for a given hybrid position (1-6).

Definition at line 205 of file SiStripFecKey.cc.

uint16_t SiStripFecKey::i2cAddr ( const uint16_t &  lld_chan,
const bool &  first_apv_of_pair 
)
static

Returns I2C addr (32-37) for LLD chan (1-3) and APV pos.

Definition at line 217 of file SiStripFecKey.cc.

void SiStripFecKey::initFromKey ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 421 of file SiStripFecKey.cc.

void SiStripFecKey::initFromPath ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 532 of file SiStripFecKey.cc.

void SiStripFecKey::initFromValue ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 355 of file SiStripFecKey.cc.

void SiStripFecKey::initGranularity ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 695 of file SiStripFecKey.cc.

bool SiStripFecKey::isConsistent ( const SiStripKey key) const
virtual

"Consistent" means identical and/or null (ie, "all") data.

Reimplemented from SiStripKey.

Definition at line 265 of file SiStripFecKey.cc.

bool SiStripFecKey::isEqual ( const SiStripKey key) const
virtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 249 of file SiStripFecKey.cc.

bool SiStripFecKey::isInvalid ( ) const
virtual

Identifies all member data as being "invalid".

Reimplemented from SiStripKey.

Definition at line 318 of file SiStripFecKey.cc.

bool SiStripFecKey::isInvalid ( const sistrip::Granularity gran) const
virtual

All member data to level of "Granularity" are invalid. If sistrip::Granularity is "undefined", returns true.

Reimplemented from SiStripKey.

Definition at line 324 of file SiStripFecKey.cc.

bool SiStripFecKey::isValid ( void  ) const
virtual

Identifies all member data as being "valid" or "all" (null).

Reimplemented from SiStripKey.

Definition at line 281 of file SiStripFecKey.cc.

Referenced by SummaryGeneratorControlView::fill(), and core.AutoHandle.AutoHandle::ReallyLoad().

bool SiStripFecKey::isValid ( const sistrip::Granularity gran) const
virtual

All member data to level of "Granularity" are "valid". If sistrip::Granularity is "undefined", returns false.

Reimplemented from SiStripKey.

Definition at line 287 of file SiStripFecKey.cc.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

const uint16_t & SiStripFecKey::lldChan ( ) const
inline

Returns LLD channel.

Definition at line 209 of file SiStripFecKey.h.

Referenced by CommissioningAnalysis::header(), VpspScanAnalysis::summary(), and CommissioningAnalysis::summary().

uint16_t SiStripFecKey::lldChan ( const uint16_t &  i2c_addr)
static

Returns LLD channel (1-3) for a given APV I2C addr (32-37).

Definition at line 228 of file SiStripFecKey.cc.

void SiStripFecKey::print ( std::stringstream &  ss) const
virtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 779 of file SiStripFecKey.cc.

void SiStripFecKey::terse ( std::stringstream &  ss) const
virtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 753 of file SiStripFecKey.cc.

Member Data Documentation

uint16_t SiStripFecKey::ccuAddr_
private

CCU module [0,1-126,invalid].

Definition at line 171 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::ccuAddrMask_ = 0xFF
staticprivate

Definition at line 195 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::ccuAddrOffset_ = 10
staticprivate

Definition at line 186 of file SiStripFecKey.h.

uint16_t SiStripFecKey::ccuChan_
private

FE module [0,16-31,invalid].

Definition at line 174 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::ccuChanMask_ = 0x1F
staticprivate

Definition at line 196 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::ccuChanOffset_ = 5
staticprivate

Definition at line 187 of file SiStripFecKey.h.

uint16_t SiStripFecKey::fecCrate_
private

FEC crate [0,1-4,invalid].

Definition at line 162 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecCrateMask_ = 0x07
staticprivate

Definition at line 192 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecCrateOffset_ = 27
staticprivate

Definition at line 183 of file SiStripFecKey.h.

uint16_t SiStripFecKey::fecRing_
private

FEC ring [0,1-8,invalid].

Definition at line 168 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecRingMask_ = 0x0F
staticprivate

Definition at line 194 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecRingOffset_ = 18
staticprivate

Definition at line 185 of file SiStripFecKey.h.

uint16_t SiStripFecKey::fecSlot_
private

FEC slot [0,2-21,invalid].

Definition at line 165 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecSlotMask_ = 0x1F
staticprivate

Definition at line 193 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::fecSlotOffset_ = 22
staticprivate

Definition at line 184 of file SiStripFecKey.h.

uint16_t SiStripFecKey::i2cAddr_
private

APV I2C address [0,32-37,invalid].

Definition at line 180 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::i2cAddrMask_ = 0x03
staticprivate

Definition at line 198 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::i2cAddrOffset_ = 0
staticprivate

Definition at line 189 of file SiStripFecKey.h.

uint16_t SiStripFecKey::lldChan_
private

LLD channel [0,1-3,invalid].

Definition at line 177 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::lldChanMask_ = 0x07
staticprivate

Definition at line 197 of file SiStripFecKey.h.

const uint16_t SiStripFecKey::lldChanOffset_ = 2
staticprivate

Definition at line 188 of file SiStripFecKey.h.