CMS 3D CMS Logo

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 override
 
bool isEqual (const SiStripKey &) const override
 
bool isInvalid () const override
 
bool isInvalid (const sistrip::Granularity &) const override
 
bool isValid () const override
 
bool isValid (const sistrip::Granularity &) const override
 
const uint16_t & lldChan () const
 
void print (std::stringstream &ss) const override
 
 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 ()
 
void terse (std::stringstream &ss) const override
 
- 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 () override
 
void initFromPath () override
 
void initFromValue () override
 
void initGranularity () override
 

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.

References initFromKey(), initFromPath(), initFromValue(), and initGranularity().

19  :
20  SiStripKey(),
21  fecCrate_(fec_crate),
22  fecSlot_(fec_slot),
23  fecRing_(fec_ring),
24  ccuAddr_(ccu_addr),
25  ccuChan_(ccu_chan),
26  lldChan_(lld_chan),
27  i2cAddr_(i2c_addr)
28 {
29  // order is important!
30  initFromValue();
31  initFromKey();
32  initFromPath();
34 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
void initGranularity() override
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromPath() override
uint16_t i2cAddr_
void initFromValue() override
void initFromKey() override
SiStripFecKey::SiStripFecKey ( const uint32_t &  fec_key)

Constructor using 32-bit "FEC key".

Definition at line 38 of file SiStripFecKey.cc.

References initFromKey(), initFromPath(), initFromValue(), and initGranularity().

38  :
39  SiStripKey(fec_key),
47 {
48  // order is important!
49  initFromKey();
50  initFromValue();
51  initFromPath();
53 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
void initGranularity() override
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromPath() override
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
void initFromValue() override
void initFromKey() override
SiStripFecKey::SiStripFecKey ( const std::string &  directory_path)

Constructor using directory path.

Definition at line 57 of file SiStripFecKey.cc.

References initFromKey(), initFromPath(), initFromValue(), and initGranularity().

57  :
66 {
67  // order is important!
68  initFromPath();
69  initFromValue();
70  initFromKey();
72 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
void initGranularity() override
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromPath() override
const std::string & path() const
Definition: SiStripKey.h:126
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
void initFromValue() override
void initFromKey() override
SiStripFecKey::SiStripFecKey ( const SiStripFecKey input)

Copy constructor.

Definition at line 76 of file SiStripFecKey.cc.

References SiStripKey::granularity(), SiStripKey::key(), and SiStripKey::path().

76  :
77  SiStripKey(),
78  fecCrate_(input.fecCrate()),
79  fecSlot_(input.fecSlot()),
80  fecRing_(input.fecRing()),
81  ccuAddr_(input.ccuAddr()),
82  ccuChan_(input.ccuChan()),
83  lldChan_(input.lldChan()),
84  i2cAddr_(input.i2cAddr())
85 {
86  key(input.key());
87  path(input.path());
88  granularity(input.granularity());
89 }
uint16_t ccuAddr_
const uint16_t & fecRing() const
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
const uint32_t & key() const
Definition: SiStripKey.h:125
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:127
const std::string & path() const
Definition: SiStripKey.h:126
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const
SiStripFecKey::SiStripFecKey ( const SiStripKey input)

Copy constructor using base class.

Definition at line 93 of file SiStripFecKey.cc.

References ccuAddr(), ccuAddr_, ccuChan(), ccuChan_, fecCrate(), fecCrate_, fecRing(), fecRing_, fecSlot(), fecSlot_, SiStripKey::granularity(), i2cAddr(), i2cAddr_, input, SiStripKey::key(), lldChan(), lldChan_, and SiStripKey::path().

93  :
94  SiStripKey(),
102 {
103  const SiStripFecKey& fec_key = dynamic_cast<const SiStripFecKey&>(input);
104  key(fec_key.key());
105  path(fec_key.path());
106  granularity(fec_key.granularity());
107  fecCrate_ = fec_key.fecCrate();
108  fecSlot_ = fec_key.fecSlot();
109  fecRing_ = fec_key.fecRing();
110  ccuAddr_ = fec_key.ccuAddr();
111  ccuChan_ = fec_key.ccuChan();
112  lldChan_ = fec_key.lldChan();
113  i2cAddr_ = fec_key.i2cAddr();
114 }
uint16_t ccuAddr_
const uint16_t & fecRing() const
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
static std::string const input
Definition: EdmProvDump.cc:44
const uint32_t & key() const
Definition: SiStripKey.h:125
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:127
const std::string & path() const
Definition: SiStripKey.h:126
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & ccuChan() const
SiStripFecKey::SiStripFecKey ( const SiStripKey input,
const sistrip::Granularity gran 
)

Copy to level specified by granularity.

Definition at line 118 of file SiStripFecKey.cc.

References sistrip::APV, sistrip::CCU_ADDR, sistrip::CCU_CHAN, ccuAddr(), ccuAddr_, ccuChan(), ccuChan_, sistrip::FEC_CRATE, sistrip::FEC_RING, sistrip::FEC_SLOT, fecCrate(), fecCrate_, fecRing(), fecRing_, fecSlot(), fecSlot_, i2cAddr(), i2cAddr_, initFromKey(), initFromPath(), initFromValue(), initGranularity(), input, sistrip::LLD_CHAN, lldChan(), and lldChan_.

119  :
120  SiStripKey(),
121  fecCrate_(0),
122  fecSlot_(0),
123  fecRing_(0),
124  ccuAddr_(0),
125  ccuChan_(0),
126  lldChan_(0),
127  i2cAddr_(0)
128 {
129  const SiStripFecKey& fec_key = dynamic_cast<const SiStripFecKey&>(input);
130  if ( gran == sistrip::FEC_CRATE || gran == sistrip::FEC_SLOT ||
131  gran == sistrip::FEC_RING || gran == sistrip::CCU_ADDR ||
132  gran == sistrip::CCU_CHAN || gran == sistrip::LLD_CHAN ||
133  gran == sistrip::APV ) {
134  fecCrate_ = fec_key.fecCrate();
135  }
136 
137  if ( gran == sistrip::FEC_SLOT || gran == sistrip::FEC_RING ||
138  gran == sistrip::CCU_ADDR || gran == sistrip::CCU_CHAN ||
139  gran == sistrip::LLD_CHAN || gran == sistrip::APV ) {
140  fecSlot_ = fec_key.fecSlot();
141  }
142 
143  if ( gran == sistrip::FEC_RING || gran == sistrip::CCU_ADDR ||
144  gran == sistrip::CCU_CHAN || gran == sistrip::LLD_CHAN ||
145  gran == sistrip::APV ) {
146  fecRing_ = fec_key.fecRing();
147  }
148 
149  if ( gran == sistrip::CCU_ADDR || gran == sistrip::CCU_CHAN ||
150  gran == sistrip::LLD_CHAN || gran == sistrip::APV ) {
151  ccuAddr_ = fec_key.ccuAddr();
152  }
153 
154  if ( gran == sistrip::CCU_CHAN || gran == sistrip::LLD_CHAN ||
155  gran == sistrip::APV ) {
156  ccuChan_ = fec_key.ccuChan();
157  }
158 
159  if ( gran == sistrip::LLD_CHAN || gran == sistrip::APV ) {
160  lldChan_ = fec_key.lldChan();
161  }
162 
163  if ( gran == sistrip::APV ) {
164  i2cAddr_ = fec_key.i2cAddr();
165  }
166 
167  initFromValue();
168  initFromKey();
169  initFromPath();
170  initGranularity();
171 }
uint16_t ccuAddr_
const uint16_t & fecRing() const
uint16_t fecSlot_
uint16_t ccuChan_
void initGranularity() override
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
static std::string const input
Definition: EdmProvDump.cc:44
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
void initFromPath() override
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
void initFromValue() override
void initFromKey() override
const uint16_t & ccuChan() const
SiStripFecKey::SiStripFecKey ( )

Default constructor

Definition at line 175 of file SiStripFecKey.cc.

175  :
176  SiStripKey(),
184 {;}
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16

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 232 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, and sistrip::invalid_.

Referenced by initFromKey().

232  {
233  if ( i2c_addr < sistrip::APV_I2C_MIN ||
234  i2c_addr > sistrip::APV_I2C_MAX ) {
235  return sistrip::invalid_;
236  }
237  return ( ( ( i2c_addr - sistrip::APV_I2C_MIN ) % 2 ) == 0 );
238 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APV_I2C_MAX
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 188 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, and sistrip::invalid_.

188  {
189  if ( i2c_addr < sistrip::APV_I2C_MIN ||
190  i2c_addr > sistrip::APV_I2C_MAX ) {
191  return sistrip::invalid_;
192  }
193  return ( i2c_addr - sistrip::APV_I2C_MIN + 1 );
194 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APV_I2C_MAX
const uint16_t & SiStripFecKey::i2cAddr ( ) const
inline
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 198 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, and sistrip::invalid_.

198  {
199  if ( !hybrid_pos ||
200  hybrid_pos >
202  sistrip::APV_I2C_MIN + 1 ) ) {
203  return sistrip::invalid_;
204  }
205  return ( hybrid_pos + sistrip::APV_I2C_MIN - 1 );
206 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APV_I2C_MAX
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 210 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MIN, sistrip::APVS_PER_CHAN, sistrip::invalid_, sistrip::LLD_CHAN_MAX, and sistrip::LLD_CHAN_MIN.

211  {
212  if ( lld_chan < sistrip::LLD_CHAN_MIN ||
213  lld_chan > sistrip::LLD_CHAN_MAX ) {
214  return sistrip::invalid_;
215  }
216  return ( sistrip::APV_I2C_MIN + lld_chan * sistrip::APVS_PER_CHAN - (first_apv?2:1) );
217 }
static const uint16_t APV_I2C_MIN
static const uint16_t LLD_CHAN_MIN
static const uint16_t LLD_CHAN_MAX
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APVS_PER_CHAN
void SiStripFecKey::initFromKey ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 412 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, sistrip::CCU_ADDR_MAX, sistrip::CCU_ADDR_MIN, sistrip::CCU_CHAN_MAX, sistrip::CCU_CHAN_MIN, ccuAddr_, ccuAddrMask_, ccuAddrOffset_, ccuChan_, ccuChanMask_, ccuChanOffset_, sistrip::CRATE_SLOT_MAX, sistrip::CRATE_SLOT_MIN, sistrip::FEC_CRATE_MAX, sistrip::FEC_CRATE_MIN, sistrip::FEC_RING_MAX, sistrip::FEC_RING_MIN, fecCrate_, fecCrateMask_, fecCrateOffset_, fecRing_, fecRingMask_, fecRingOffset_, fecSlot_, fecSlotMask_, fecSlotOffset_, firstApvOfPair(), i2cAddr(), i2cAddr_, i2cAddrMask_, i2cAddrOffset_, sistrip::invalid32_, sistrip::invalid_, SiStripKey::key(), sistrip::LLD_CHAN_MAX, sistrip::LLD_CHAN_MIN, lldChan(), lldChan_, lldChanMask_, and lldChanOffset_.

Referenced by SiStripFecKey().

412  {
413 
414  if ( key() == sistrip::invalid32_ ) {
415 
416  // ---------- Set FecKey based on member data ----------
417 
418  // Initialise to null value
419  key(0);
420 
421  // Extract FEC crate
424  key( key() | (fecCrate_<<fecCrateOffset_) );
425  } else if ( fecCrate_ == 0 ) {
426  key( key() | (fecCrate_<<fecCrateOffset_) );
427  } else {
429  }
430 
431  // Extract FEC slot
434  key( key() | (fecSlot_<<fecSlotOffset_) );
435  } else if ( fecSlot_ == 0 ) {
436  key( key() | (fecSlot_<<fecSlotOffset_) );
437  } else {
438  key( key() | (fecSlotMask_<<fecSlotOffset_) );
439  }
440 
441  // Extract FEC ring
444  key( key() | (fecRing_<<fecRingOffset_) );
445  } else if ( fecRing_ == 0 ) {
446  key( key() | (fecRing_<<fecRingOffset_) );
447  } else {
448  key( key() | (fecRingMask_<<fecRingOffset_) );
449  }
450 
451  // Extract CCU addr
454  key( key() | (ccuAddr_<<ccuAddrOffset_) );
455  } else if ( ccuAddr_ == 0 ) {
456  key( key() | (ccuAddr_<<ccuAddrOffset_) );
457  } else {
458  key( key() | (ccuAddrMask_<<ccuAddrOffset_) );
459  }
460 
461  // Extract CCU chan
464  key( key() | ( (ccuChan_-(sistrip::CCU_CHAN_MIN-1)) << ccuChanOffset_ ) );
465  } else if ( ccuChan_ == 0 ) {
466  key( key() | (ccuChan_<<ccuChanOffset_) );
467  } else {
468  key( key() | (ccuChanMask_<<ccuChanOffset_) );
469  }
470 
471  // Extract LLD channel
474  key( key() | (lldChan_<<lldChanOffset_) );
475  } else if ( lldChan_ == 0 ) {
476  key( key() | (lldChan_<<lldChanOffset_) );
477  } else {
478  key( key() | (lldChanMask_<<lldChanOffset_) );
479  }
480 
481  // Extract APV I2C address
482  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
484  key( key() | ( ( firstApvOfPair( i2cAddr_ ) ? 1 : 2 ) << i2cAddrOffset_ ) ); // key encodes APV number (1 or 2)
485  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
487  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
488  }
489  } else if ( i2cAddr_ == 0 ) {
490  key( key() | (i2cAddr_<<i2cAddrOffset_) );
491  } else {
492  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
493  }
494 
495  } else {
496 
497  // ---------- Set member data based on FEC key ----------
498 
506 
512  else if ( ccuChan_ ) { ccuChan_ += (sistrip::CCU_CHAN_MIN-1); }
515  else if ( i2cAddr_ && lldChan_ != lldChanMask_ ) { i2cAddr_ = i2cAddr( lldChan_, 2-i2cAddr_ ); }
516 
517  }
518 
519 }
uint16_t ccuAddr_
static const uint16_t ccuChanOffset_
static const uint16_t APV_I2C_MIN
static const uint16_t ccuChanMask_
static const uint16_t i2cAddrOffset_
static const uint16_t CCU_ADDR_MAX
static const uint16_t CCU_CHAN_MAX
uint16_t fecSlot_
static const uint16_t CCU_CHAN_MIN
static const uint32_t invalid32_
Definition: Constants.h:15
uint16_t ccuChan_
static const uint16_t LLD_CHAN_MIN
static const uint16_t LLD_CHAN_MAX
static const uint16_t fecSlotMask_
uint16_t lldChan_
static const uint16_t fecRingOffset_
uint16_t fecCrate_
static const uint16_t FEC_CRATE_MIN
uint16_t fecRing_
const uint16_t & lldChan() const
static const uint16_t CRATE_SLOT_MAX
const uint16_t & i2cAddr() const
static const uint16_t fecCrateMask_
static const uint16_t FEC_RING_MAX
const uint32_t & key() const
Definition: SiStripKey.h:125
static const uint16_t FEC_CRATE_MAX
static bool firstApvOfPair(const uint16_t &i2c_addr)
static const uint16_t lldChanOffset_
static const uint16_t CCU_ADDR_MIN
static const uint16_t FEC_RING_MIN
static const uint16_t lldChanMask_
static const uint16_t CRATE_SLOT_MIN
static const uint16_t fecSlotOffset_
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t ccuAddrMask_
static const uint16_t APV_I2C_MAX
static const uint16_t i2cAddrMask_
static const uint16_t fecRingMask_
static const uint16_t fecCrateOffset_
static const uint16_t ccuAddrOffset_
void SiStripFecKey::initFromPath ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 523 of file SiStripFecKey.cc.

References sistrip::apv_, sistrip::ccuAddr_, ccuAddr_, sistrip::ccuChan_, ccuChan_, sistrip::controlView_, dir, sistrip::dir_, sistrip::fecCrate_, fecCrate_, sistrip::fecRing_, fecRing_, sistrip::fecSlot_, fecSlot_, spr::find(), i2cAddr_, sistrip::lldChan_, lldChan_, GetRecoTauVFromDQM_MC_cff::next, sistrip::null_, SiStripKey::path(), sistrip::root_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by SiStripFecKey().

523  {
524 
525  if ( path() == sistrip::null_ ) {
526 
527  // ---------- Set directory path based on member data ----------
528 
529  std::stringstream dir;
530 
531  dir << sistrip::root_ << sistrip::dir_
533 
534  // Add FEC crate
535  if ( fecCrate_ ) {
537 
538  // Add FEC slot
539  if ( fecSlot_ ) {
541 
542  // Add FEC ring
543  if ( fecRing_ ) {
545 
546  // Add CCU address
547  if ( ccuAddr_ ) {
549 
550  // Add CCU channel
551  if ( ccuChan_ ) {
553 
554  // Add LLD channel
555  if ( lldChan_ ) {
557 
558  // Add APV I2C address
559  if ( i2cAddr_ ) {
560  dir << sistrip::apv_ << i2cAddr_ << sistrip::dir_;
561  }
562  }
563  }
564  }
565  }
566  }
567  }
568 
569  std::string temp( dir.str() );
570  path( temp );
571 
572  } else {
573 
574  // ---------- Set member data based on directory path ----------
575 
576  fecCrate_ = 0;
577  fecSlot_ = 0;
578  fecRing_ = 0;
579  ccuAddr_ = 0;
580  ccuChan_ = 0;
581  lldChan_ = 0;
582  i2cAddr_ = 0;
583 
584  // Check if root is found
585  if ( path().find( sistrip::root_ ) == std::string::npos ) {
586  std::string temp = path();
587  path( std::string(sistrip::root_) + sistrip::dir_ + temp );
588  }
589 
590  size_t curr = 0; // current string position
591  size_t next = 0; // next string position
592  next = path().find( sistrip::controlView_, curr );
593 
594  // Extract view
595  curr = next;
596  if ( curr != std::string::npos ) {
597  next = path().find( sistrip::fecCrate_, curr );
598  std::string control_view( path(),
599  curr+(sizeof(sistrip::controlView_) - 1),
600  next-(sizeof(sistrip::dir_) - 1)-curr );
601 
602  // Extract FEC crate
603  curr = next;
604  if ( curr != std::string::npos ) {
605  next = path().find( sistrip::fecSlot_, curr );
606  std::string fec_crate( path(),
607  curr+(sizeof(sistrip::fecCrate_) - 1),
608  next-(sizeof(sistrip::dir_) - 1)-curr );
609  fecCrate_ = std::atoi( fec_crate.c_str() );
610 
611  // Extract FEC slot
612  curr = next;
613  if ( curr != std::string::npos ) {
614  next = path().find( sistrip::fecRing_, curr );
615  std::string fec_slot( path(),
616  curr+(sizeof(sistrip::fecSlot_) - 1),
617  next-(sizeof(sistrip::dir_) - 1)-curr );
618  fecSlot_ = std::atoi( fec_slot.c_str() );
619 
620  // Extract FEC ring
621  curr = next;
622  if ( curr != std::string::npos ) {
623  next = path().find( sistrip::ccuAddr_, curr );
624  std::string fec_ring( path(),
625  curr+(sizeof(sistrip::fecRing_) - 1),
626  next-(sizeof(sistrip::dir_) - 1)-curr );
627  fecRing_ = std::atoi( fec_ring.c_str() );
628 
629  // Extract CCU address
630  curr = next;
631  if ( curr != std::string::npos ) {
632  next = path().find( sistrip::ccuChan_, curr );
633  std::string ccu_addr( path(),
634  curr+(sizeof(sistrip::ccuAddr_) - 1),
635  next-(sizeof(sistrip::dir_) - 1)-curr );
636  ccuAddr_ = std::atoi( ccu_addr.c_str() );
637 
638  // Extract CCU channel
639  curr = next;
640  if ( curr != std::string::npos ) {
641  next = path().find( sistrip::lldChan_, curr );
642  std::string ccu_chan( path(),
643  curr+(sizeof(sistrip::ccuChan_) - 1),
644  next-(sizeof(sistrip::dir_) - 1)-curr );
645  ccuChan_ = std::atoi( ccu_chan.c_str() );
646 
647  // Extract LLD channel
648  curr = next;
649  if ( curr != std::string::npos ) {
650  next = path().find( sistrip::apv_, curr );
651  std::string lld_chan( path(),
652  curr+(sizeof(sistrip::lldChan_) - 1),
653  next-(sizeof(sistrip::dir_) - 1)-curr );
654  lldChan_ = std::atoi( lld_chan.c_str() );
655 
656  // Extract I2C address
657  curr = next;
658  if ( curr != std::string::npos ) {
659  next = std::string::npos;
660  std::string i2c_addr( path(),
661  curr+(sizeof(sistrip::apv_) - 1),
662  next-curr );
663  i2cAddr_ = std::atoi( i2c_addr.c_str() );
664  }
665  }
666  }
667  }
668  }
669  }
670  }
671  } else {
672  std::stringstream ss;
673  ss << sistrip::root_ << sistrip::dir_;
674  //ss << sistrip::root_ << sistrip::dir_
675  //<< sistrip::unknownView_ << sistrip::dir_;
676  std::string temp( ss.str() );
677  path( temp );
678  }
679 
680  }
681 
682 }
uint16_t ccuAddr_
static const char dir_[]
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
static const char fecSlot_[]
static const char ccuChan_[]
static const char ccuAddr_[]
static const char lldChan_[]
static const char controlView_[]
static const char fecCrate_[]
const std::string & path() const
Definition: SiStripKey.h:126
static const char apv_[]
uint16_t i2cAddr_
static const char fecRing_[]
static const char root_[]
dbl *** dir
Definition: mlp_gen.cc:35
static const char null_[]
Definition: Constants.h:22
void SiStripFecKey::initFromValue ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 346 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, sistrip::CCU_ADDR_MAX, sistrip::CCU_ADDR_MIN, sistrip::CCU_CHAN_MAX, sistrip::CCU_CHAN_MIN, ccuAddr_, ccuChan_, sistrip::CRATE_SLOT_MAX, sistrip::CRATE_SLOT_MIN, sistrip::FEC_CRATE_MAX, sistrip::FEC_CRATE_MIN, sistrip::FEC_RING_MAX, sistrip::FEC_RING_MIN, fecCrate_, fecRing_, fecSlot_, i2cAddr_, i2cAddrMask_, i2cAddrOffset_, sistrip::invalid_, SiStripKey::key(), sistrip::LLD_CHAN_MAX, sistrip::LLD_CHAN_MIN, lldChan(), and lldChan_.

Referenced by SiStripFecKey().

346  {
347 
348  // FEC crate
352  } else if ( fecCrate_ == 0 ) {
353  fecCrate_ = 0;
354  } else { fecCrate_ = sistrip::invalid_; }
355 
356  // FEC slot
359  fecSlot_ = fecSlot_;
360  } else if ( fecSlot_ == 0 ) {
361  fecSlot_ = 0;
362  } else { fecSlot_ = sistrip::invalid_; }
363 
364  // FEC ring
367  fecRing_ = fecRing_;
368  } else if ( fecRing_ == 0 ) {
369  fecRing_ = 0;
370  } else { fecRing_ = sistrip::invalid_; }
371 
372  // CCU addr
375  ccuAddr_ = ccuAddr_;
376  } else if ( ccuAddr_ == 0 ) {
377  ccuAddr_ = 0;
378  } else { ccuAddr_ = sistrip::invalid_; }
379 
380  // CCU chan
383  ccuChan_ = ccuChan_;
384  } else if ( ccuChan_ == 0 ) {
385  ccuChan_ = 0;
386  } else { ccuChan_ = sistrip::invalid_; }
387 
388  // LLD channel
391  lldChan_ = lldChan_;
392  } else if ( lldChan_ == 0 ) {
393  lldChan_ = 0;
394  } else { lldChan_ = sistrip::invalid_; }
395 
396  // APV I2C address
397  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
399  i2cAddr_ = i2cAddr_;
400  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
402  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
403  }
404  } else if ( i2cAddr_ == 0 ) {
405  i2cAddr_ = 0;
406  } else { i2cAddr_ = sistrip::invalid_; }
407 
408 }
uint16_t ccuAddr_
static const uint16_t APV_I2C_MIN
static const uint16_t i2cAddrOffset_
static const uint16_t CCU_ADDR_MAX
static const uint16_t CCU_CHAN_MAX
uint16_t fecSlot_
static const uint16_t CCU_CHAN_MIN
uint16_t ccuChan_
static const uint16_t LLD_CHAN_MIN
static const uint16_t LLD_CHAN_MAX
uint16_t lldChan_
uint16_t fecCrate_
static const uint16_t FEC_CRATE_MIN
uint16_t fecRing_
const uint16_t & lldChan() const
static const uint16_t CRATE_SLOT_MAX
static const uint16_t FEC_RING_MAX
const uint32_t & key() const
Definition: SiStripKey.h:125
static const uint16_t FEC_CRATE_MAX
static const uint16_t CCU_ADDR_MIN
static const uint16_t FEC_RING_MIN
static const uint16_t CRATE_SLOT_MIN
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APV_I2C_MAX
static const uint16_t i2cAddrMask_
void SiStripFecKey::initGranularity ( )
overrideprivatevirtual

Reimplemented from SiStripKey.

Definition at line 686 of file SiStripFecKey.cc.

References sistrip::APV, sistrip::CCU_ADDR, sistrip::CCU_CHAN, ccuAddr_, ccuChan_, SiStripKey::channel(), sistrip::FEC_CRATE, sistrip::FEC_RING, sistrip::FEC_SLOT, sistrip::FEC_SYSTEM, fecCrate_, fecRing_, fecSlot_, SiStripKey::granularity(), i2cAddr_, sistrip::invalid_, sistrip::LLD_CHAN, lldChan_, and sistrip::UNKNOWN_GRAN.

Referenced by SiStripFecKey().

686  {
687 
689  channel(0);
690  if ( fecCrate_ && fecCrate_ != sistrip::invalid_ ) {
693  if ( fecSlot_ && fecSlot_ != sistrip::invalid_ ) {
695  channel(fecSlot_);
696  if ( fecRing_ && fecRing_ != sistrip::invalid_ ) {
698  channel(fecRing_);
699  if ( ccuAddr_ && ccuAddr_ != sistrip::invalid_ ) {
701  channel(ccuAddr_);
702  if ( ccuChan_ && ccuChan_ != sistrip::invalid_ ) {
704  channel(ccuChan_);
705  if ( lldChan_ && lldChan_ != sistrip::invalid_ ) {
707  channel(lldChan_);
708  if ( i2cAddr_ && i2cAddr_ != sistrip::invalid_ ) {
710  channel(i2cAddr_);
711  } else if ( i2cAddr_ == sistrip::invalid_ ) {
714  }
715  } else if ( lldChan_ == sistrip::invalid_ ) {
718  }
719  } else if ( ccuChan_ == sistrip::invalid_ ) {
722  }
723  } else if ( ccuAddr_ == sistrip::invalid_ ) {
726  }
727  } else if ( fecRing_ == sistrip::invalid_ ) {
730  }
731  } else if ( fecSlot_ == sistrip::invalid_ ) {
734  }
735  } else if ( fecCrate_ == sistrip::invalid_ ) {
738  }
739 
740 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:127
const uint16_t & channel() const
Definition: SiStripKey.h:128
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
bool SiStripFecKey::isConsistent ( const SiStripKey key) const
overridevirtual

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

Reimplemented from SiStripKey.

Definition at line 257 of file SiStripFecKey.cc.

References ccuAddr(), ccuAddr_, fecCrate(), fecCrate_, fecRing(), fecRing_, fecSlot(), fecSlot_, i2cAddr(), i2cAddr_, input, isEqual(), SiStripKey::key(), lldChan(), and lldChan_.

257  {
258  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
259  if ( isEqual(input) ) { return true; }
260  else if ( ( fecCrate_ == 0 || input.fecCrate() == 0 ) &&
261  ( fecSlot_ == 0 || input.fecSlot() == 0 ) &&
262  ( fecRing_ == 0 || input.fecRing() == 0 ) &&
263  ( ccuAddr_ == 0 || input.ccuAddr() == 0 ) &&
264  ( lldChan_ == 0 || input.lldChan() == 0 ) &&
265  ( i2cAddr_ == 0 || input.i2cAddr() == 0 ) ) {
266  return true;
267  } else { return false; }
268 }
uint16_t ccuAddr_
const uint16_t & fecRing() const
uint16_t fecSlot_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const uint16_t & lldChan() const
bool isEqual(const SiStripKey &) const override
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
static std::string const input
Definition: EdmProvDump.cc:44
const uint32_t & key() const
Definition: SiStripKey.h:125
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
bool SiStripFecKey::isEqual ( const SiStripKey key) const
overridevirtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 242 of file SiStripFecKey.cc.

References ccuAddr(), ccuAddr_, ccuChan(), ccuChan_, fecCrate(), fecCrate_, fecRing(), fecRing_, fecSlot(), fecSlot_, i2cAddr(), i2cAddr_, input, SiStripKey::key(), lldChan(), and lldChan_.

Referenced by isConsistent().

242  {
243  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
244  if ( fecCrate_ == input.fecCrate() &&
245  fecSlot_ == input.fecSlot() &&
246  fecRing_ == input.fecRing() &&
247  ccuAddr_ == input.ccuAddr() &&
248  ccuChan_ == input.ccuChan() &&
249  lldChan_ == input.lldChan() &&
250  i2cAddr_ == input.i2cAddr() ) {
251  return true;
252  } else { return false; }
253 }
uint16_t ccuAddr_
const uint16_t & fecRing() const
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
static std::string const input
Definition: EdmProvDump.cc:44
const uint32_t & key() const
Definition: SiStripKey.h:125
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const
bool SiStripFecKey::isInvalid ( ) const
overridevirtual

Identifies all member data as being "invalid".

Reimplemented from SiStripKey.

Definition at line 309 of file SiStripFecKey.cc.

References sistrip::APV.

Referenced by CommissioningHistosUsingDb::detInfo().

309  {
310  return isInvalid(sistrip::APV);
311 }
bool isInvalid() const override
bool SiStripFecKey::isInvalid ( const sistrip::Granularity gran) const
overridevirtual

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

Reimplemented from SiStripKey.

Definition at line 315 of file SiStripFecKey.cc.

References sistrip::APV, sistrip::CCU_ADDR, sistrip::CCU_CHAN, ccuAddr_, ccuChan_, sistrip::FEC_CRATE, sistrip::FEC_RING, sistrip::FEC_SYSTEM, fecCrate_, fecRing_, fecSlot_, i2cAddr_, sistrip::invalid_, sistrip::LLD_CHAN, lldChan_, sistrip::UNDEFINED_GRAN, and sistrip::UNKNOWN_GRAN.

315  {
316  if ( gran == sistrip::FEC_SYSTEM ) { return false; }
317  else if ( gran == sistrip::UNDEFINED_GRAN ||
318  gran == sistrip::UNKNOWN_GRAN ) { return false; }
319 
320  if ( fecCrate_ == sistrip::invalid_ ) {
321  if ( gran == sistrip::FEC_CRATE ) { return true; }
322  if ( fecSlot_ == sistrip::invalid_ ) {
323  if ( gran == sistrip::FEC_RING ) { return true; }
324  if ( fecRing_ == sistrip::invalid_ ) {
325  if ( gran == sistrip::FEC_RING ) { return true; }
326  if ( ccuAddr_ == sistrip::invalid_ ) {
327  if ( gran == sistrip::CCU_ADDR ) { return true; }
328  if ( ccuChan_ == sistrip::invalid_ ) {
329  if ( gran == sistrip::CCU_CHAN ) { return true; }
330  if ( lldChan_ == sistrip::invalid_ ) {
331  if ( gran == sistrip::LLD_CHAN ) { return true; }
332  if ( i2cAddr_ == sistrip::invalid_ ) {
333  if ( gran == sistrip::APV ) { return true; }
334  }
335  }
336  }
337  }
338  }
339  }
340  }
341  return false;
342 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
bool SiStripFecKey::isValid ( void  ) const
overridevirtual
bool SiStripFecKey::isValid ( const sistrip::Granularity gran) const
overridevirtual

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

Reimplemented from SiStripKey.

Definition at line 278 of file SiStripFecKey.cc.

References sistrip::APV, sistrip::CCU_ADDR, sistrip::CCU_CHAN, ccuAddr_, ccuChan_, sistrip::FEC_CRATE, sistrip::FEC_RING, sistrip::FEC_SYSTEM, fecCrate_, fecRing_, fecSlot_, i2cAddr_, sistrip::invalid_, sistrip::LLD_CHAN, lldChan_, sistrip::UNDEFINED_GRAN, and sistrip::UNKNOWN_GRAN.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

278  {
279  if ( gran == sistrip::FEC_SYSTEM ) { return true; }
280  else if ( gran == sistrip::UNDEFINED_GRAN ||
281  gran == sistrip::UNKNOWN_GRAN ) { return false; }
282 
283  if ( fecCrate_ != sistrip::invalid_ ) {
284  if ( gran == sistrip::FEC_CRATE ) { return true; }
285  if ( fecSlot_ != sistrip::invalid_ ) {
286  if ( gran == sistrip::FEC_RING ) { return true; }
287  if ( fecRing_ != sistrip::invalid_ ) {
288  if ( gran == sistrip::FEC_RING ) { return true; }
289  if ( ccuAddr_ != sistrip::invalid_ ) {
290  if ( gran == sistrip::CCU_ADDR ) { return true; }
291  if ( ccuChan_ != sistrip::invalid_ ) {
292  if ( gran == sistrip::CCU_CHAN ) { return true; }
293  if ( lldChan_ != sistrip::invalid_ ) {
294  if ( gran == sistrip::LLD_CHAN ) { return true; }
295  if ( i2cAddr_ != sistrip::invalid_ ) {
296  if ( gran == sistrip::APV ) { return true; }
297  }
298  }
299  }
300  }
301  }
302  }
303  }
304  return false;
305 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & SiStripFecKey::lldChan ( ) const
inline
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 221 of file SiStripFecKey.cc.

References sistrip::APV_I2C_MAX, sistrip::APV_I2C_MIN, and sistrip::invalid_.

221  {
222  if ( i2c_addr == 0 ) { return 0; }
223  else if ( i2c_addr < sistrip::APV_I2C_MIN ||
224  i2c_addr > sistrip::APV_I2C_MAX ) {
225  return sistrip::invalid_;
226  }
227  return ( ( i2c_addr - sistrip::APV_I2C_MIN ) / 2 + 1 );
228 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t APV_I2C_MAX
void SiStripFecKey::print ( std::stringstream &  ss) const
overridevirtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 770 of file SiStripFecKey.cc.

References ccuAddr(), ccuChan(), SiStripKey::channel(), TauDecayModes::dec, fecCrate(), fecRing(), fecSlot(), SiStripEnumsAndStrings::granularity(), SiStripKey::granularity(), i2cAddr(), isValid(), SiStripKey::key(), lldChan(), and SiStripKey::path().

Referenced by operator<<().

770  {
771  ss << " [SiStripFecKey::print]" << std::endl
772  << std::hex
773  << " FEC key : 0x"
774  << std::setfill('0')
775  << std::setw(8) << key() << std::endl
776  << std::setfill(' ')
777  << std::dec
778  << " FEC VME crate : " << fecCrate() << std::endl
779  << " FEC VME slot : " << fecSlot() << std::endl
780  << " FEC control ring : " << fecRing() << std::endl
781  << " CCU I2C address : " << ccuAddr() << std::endl
782  << " CCU chan (FE module) : " << ccuChan() << std::endl
783  << " LaserDriver channel : " << lldChan() << std::endl
784  << " APV I2C address : " << i2cAddr() << std::endl
785  << " Directory : " << path() << std::endl
786  << " Granularity : "
788  << " Channel : " << channel() << std::endl
789  << " isValid : " << isValid();
790 }
const uint16_t & fecRing() const
static std::string granularity(const sistrip::Granularity &)
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
const uint32_t & key() const
Definition: SiStripKey.h:125
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:127
const std::string & path() const
Definition: SiStripKey.h:126
const uint16_t & fecCrate() const
const uint16_t & channel() const
Definition: SiStripKey.h:128
const uint16_t & ccuAddr() const
bool isValid() const override
const uint16_t & ccuChan() const
void SiStripFecKey::terse ( std::stringstream &  ss) const
overridevirtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 744 of file SiStripFecKey.cc.

References ccuAddr(), ccuChan(), fecCrate(), fecRing(), fecSlot(), i2cAddr(), and lldChan().

Referenced by FastFedCablingHistosUsingDb::connections(), and SiStripCondObjBuilderFromDb::SkipDeviceDescription::dump().

744  {
745  ss << "FEC:crate/slot/ring/CCU/module/LLD/I2C= "
746  << fecCrate() << "/"
747  << fecSlot() << "/"
748  << fecRing() << "/"
749  << ccuAddr() << "/"
750  << ccuChan() << "/"
751  << lldChan() << "/"
752  << i2cAddr();
753 // ss << " FecKey"
754 // //<< "=0x"
755 // //<< std::hex
756 // //<< std::setfill('0') << std::setw(8) << key() << std::setfill(' ')
757 // //<< std::dec
758 // //<< ", " << ( isValid() ? "Valid" : "Invalid" )
759 // << ", Crate=" << fecCrate()
760 // << ", Slot=" << fecSlot()
761 // << ", Ring=" << fecRing()
762 // << ", CCU=" << ccuAddr()
763 // << ", module=" << ccuChan()
764 // << ", LLD=" << lldChan()
765 // << ", I2C=" << i2cAddr();
766 }
const uint16_t & fecRing() const
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
const uint16_t & fecCrate() const
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const

Member Data Documentation

uint16_t SiStripFecKey::ccuAddr_
private

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

Definition at line 171 of file SiStripFecKey.h.

Referenced by ccuAddr(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFecKey().

const uint16_t SiStripFecKey::ccuAddrMask_ = 0xFF
staticprivate

Definition at line 195 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::ccuAddrOffset_ = 10
staticprivate

Definition at line 186 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::ccuChan_
private

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

Definition at line 174 of file SiStripFecKey.h.

Referenced by ccuChan(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isEqual(), isInvalid(), isValid(), and SiStripFecKey().

const uint16_t SiStripFecKey::ccuChanMask_ = 0x1F
staticprivate

Definition at line 196 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::ccuChanOffset_ = 5
staticprivate

Definition at line 187 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::fecCrate_
private
const uint16_t SiStripFecKey::fecCrateMask_ = 0x07
staticprivate

Definition at line 192 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecCrateOffset_ = 27
staticprivate

Definition at line 183 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::fecRing_
private
const uint16_t SiStripFecKey::fecRingMask_ = 0x0F
staticprivate

Definition at line 194 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecRingOffset_ = 18
staticprivate

Definition at line 185 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::fecSlot_
private

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

Definition at line 165 of file SiStripFecKey.h.

Referenced by fecSlot(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFecKey().

const uint16_t SiStripFecKey::fecSlotMask_ = 0x1F
staticprivate

Definition at line 193 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecSlotOffset_ = 22
staticprivate

Definition at line 184 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::i2cAddr_
private

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

Definition at line 180 of file SiStripFecKey.h.

Referenced by i2cAddr(), initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), and SiStripFecKey().

const uint16_t SiStripFecKey::i2cAddrMask_ = 0x03
staticprivate

Definition at line 198 of file SiStripFecKey.h.

Referenced by initFromKey(), and initFromValue().

const uint16_t SiStripFecKey::i2cAddrOffset_ = 0
staticprivate

Definition at line 189 of file SiStripFecKey.h.

Referenced by initFromKey(), and initFromValue().

uint16_t SiStripFecKey::lldChan_
private

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

Definition at line 177 of file SiStripFecKey.h.

Referenced by initFromKey(), initFromPath(), initFromValue(), initGranularity(), isConsistent(), isEqual(), isInvalid(), isValid(), lldChan(), and SiStripFecKey().

const uint16_t SiStripFecKey::lldChanMask_ = 0x07
staticprivate

Definition at line 197 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::lldChanOffset_ = 2
staticprivate

Definition at line 188 of file SiStripFecKey.h.

Referenced by initFromKey().