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:48
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:48
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 398 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().

398  {
399 
400  if ( key() == sistrip::invalid32_ ) {
401 
402  // ---------- Set FecKey based on member data ----------
403 
404  // Initialise to null value
405  key(0);
406 
407  // Extract FEC crate
410  key( key() | (fecCrate_<<fecCrateOffset_) );
411  } else if ( fecCrate_ == 0 ) {
412  key( key() | (fecCrate_<<fecCrateOffset_) );
413  } else {
415  }
416 
417  // Extract FEC slot
420  key( key() | (fecSlot_<<fecSlotOffset_) );
421  } else if ( fecSlot_ == 0 ) {
422  key( key() | (fecSlot_<<fecSlotOffset_) );
423  } else {
424  key( key() | (fecSlotMask_<<fecSlotOffset_) );
425  }
426 
427  // Extract FEC ring
430  key( key() | (fecRing_<<fecRingOffset_) );
431  } else if ( fecRing_ == 0 ) {
432  key( key() | (fecRing_<<fecRingOffset_) );
433  } else {
434  key( key() | (fecRingMask_<<fecRingOffset_) );
435  }
436 
437  // Extract CCU addr
440  key( key() | (ccuAddr_<<ccuAddrOffset_) );
441  } else if ( ccuAddr_ == 0 ) {
442  key( key() | (ccuAddr_<<ccuAddrOffset_) );
443  } else {
444  key( key() | (ccuAddrMask_<<ccuAddrOffset_) );
445  }
446 
447  // Extract CCU chan
450  key( key() | ( (ccuChan_-(sistrip::CCU_CHAN_MIN-1)) << ccuChanOffset_ ) );
451  } else if ( ccuChan_ == 0 ) {
452  key( key() | (ccuChan_<<ccuChanOffset_) );
453  } else {
454  key( key() | (ccuChanMask_<<ccuChanOffset_) );
455  }
456 
457  // Extract LLD channel
460  key( key() | (lldChan_<<lldChanOffset_) );
461  } else if ( lldChan_ == 0 ) {
462  key( key() | (lldChan_<<lldChanOffset_) );
463  } else {
464  key( key() | (lldChanMask_<<lldChanOffset_) );
465  }
466 
467  // Extract APV I2C address
468  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
470  key( key() | ( ( firstApvOfPair( i2cAddr_ ) ? 1 : 2 ) << i2cAddrOffset_ ) ); // key encodes APV number (1 or 2)
471  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
473  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
474  }
475  } else if ( i2cAddr_ == 0 ) {
476  key( key() | (i2cAddr_<<i2cAddrOffset_) );
477  } else {
478  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
479  }
480 
481  } else {
482 
483  // ---------- Set member data based on FEC key ----------
484 
492 
498  else if ( ccuChan_ ) { ccuChan_ += (sistrip::CCU_CHAN_MIN-1); }
501  else if ( i2cAddr_ && lldChan_ != lldChanMask_ ) { i2cAddr_ = i2cAddr( lldChan_, 2-i2cAddr_ ); }
502 
503  }
504 
505 }
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 509 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().

509  {
510 
511  if ( path() == sistrip::null_ ) {
512 
513  // ---------- Set directory path based on member data ----------
514 
515  std::stringstream dir;
516 
517  dir << sistrip::root_ << sistrip::dir_
519 
520  // Add FEC crate
521  if ( fecCrate_ ) {
523 
524  // Add FEC slot
525  if ( fecSlot_ ) {
527 
528  // Add FEC ring
529  if ( fecRing_ ) {
531 
532  // Add CCU address
533  if ( ccuAddr_ ) {
535 
536  // Add CCU channel
537  if ( ccuChan_ ) {
539 
540  // Add LLD channel
541  if ( lldChan_ ) {
543 
544  // Add APV I2C address
545  if ( i2cAddr_ ) {
546  dir << sistrip::apv_ << i2cAddr_ << sistrip::dir_;
547  }
548  }
549  }
550  }
551  }
552  }
553  }
554 
555  std::string temp( dir.str() );
556  path( temp );
557 
558  } else {
559 
560  // ---------- Set member data based on directory path ----------
561 
562  fecCrate_ = 0;
563  fecSlot_ = 0;
564  fecRing_ = 0;
565  ccuAddr_ = 0;
566  ccuChan_ = 0;
567  lldChan_ = 0;
568  i2cAddr_ = 0;
569 
570  // Check if root is found
571  if ( path().find( sistrip::root_ ) == std::string::npos ) {
572  std::string temp = path();
573  path( std::string(sistrip::root_) + sistrip::dir_ + temp );
574  }
575 
576  size_t curr = 0; // current string position
577  size_t next = 0; // next string position
578  next = path().find( sistrip::controlView_, curr );
579 
580  // Extract view
581  curr = next;
582  if ( curr != std::string::npos ) {
583  next = path().find( sistrip::fecCrate_, curr );
584  std::string control_view( path(),
585  curr+(sizeof(sistrip::controlView_) - 1),
586  next-(sizeof(sistrip::dir_) - 1)-curr );
587 
588  // Extract FEC crate
589  curr = next;
590  if ( curr != std::string::npos ) {
591  next = path().find( sistrip::fecSlot_, curr );
592  std::string fec_crate( path(),
593  curr+(sizeof(sistrip::fecCrate_) - 1),
594  next-(sizeof(sistrip::dir_) - 1)-curr );
595  fecCrate_ = std::atoi( fec_crate.c_str() );
596 
597  // Extract FEC slot
598  curr = next;
599  if ( curr != std::string::npos ) {
600  next = path().find( sistrip::fecRing_, curr );
601  std::string fec_slot( path(),
602  curr+(sizeof(sistrip::fecSlot_) - 1),
603  next-(sizeof(sistrip::dir_) - 1)-curr );
604  fecSlot_ = std::atoi( fec_slot.c_str() );
605 
606  // Extract FEC ring
607  curr = next;
608  if ( curr != std::string::npos ) {
609  next = path().find( sistrip::ccuAddr_, curr );
610  std::string fec_ring( path(),
611  curr+(sizeof(sistrip::fecRing_) - 1),
612  next-(sizeof(sistrip::dir_) - 1)-curr );
613  fecRing_ = std::atoi( fec_ring.c_str() );
614 
615  // Extract CCU address
616  curr = next;
617  if ( curr != std::string::npos ) {
618  next = path().find( sistrip::ccuChan_, curr );
619  std::string ccu_addr( path(),
620  curr+(sizeof(sistrip::ccuAddr_) - 1),
621  next-(sizeof(sistrip::dir_) - 1)-curr );
622  ccuAddr_ = std::atoi( ccu_addr.c_str() );
623 
624  // Extract CCU channel
625  curr = next;
626  if ( curr != std::string::npos ) {
627  next = path().find( sistrip::lldChan_, curr );
628  std::string ccu_chan( path(),
629  curr+(sizeof(sistrip::ccuChan_) - 1),
630  next-(sizeof(sistrip::dir_) - 1)-curr );
631  ccuChan_ = std::atoi( ccu_chan.c_str() );
632 
633  // Extract LLD channel
634  curr = next;
635  if ( curr != std::string::npos ) {
636  next = path().find( sistrip::apv_, curr );
637  std::string lld_chan( path(),
638  curr+(sizeof(sistrip::lldChan_) - 1),
639  next-(sizeof(sistrip::dir_) - 1)-curr );
640  lldChan_ = std::atoi( lld_chan.c_str() );
641 
642  // Extract I2C address
643  curr = next;
644  if ( curr != std::string::npos ) {
645  next = std::string::npos;
646  std::string i2c_addr( path(),
647  curr+(sizeof(sistrip::apv_) - 1),
648  next-curr );
649  i2cAddr_ = std::atoi( i2c_addr.c_str() );
650  }
651  }
652  }
653  }
654  }
655  }
656  }
657  } else {
658  std::stringstream ss;
659  ss << sistrip::root_ << sistrip::dir_;
660  //ss << sistrip::root_ << sistrip::dir_
661  //<< sistrip::unknownView_ << sistrip::dir_;
662  std::string temp( ss.str() );
663  path( temp );
664  }
665 
666  }
667 
668 }
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
349  if ( not ( (fecCrate_ >= sistrip::FEC_CRATE_MIN &&
351  (fecCrate_ == 0) ) ) {
353 
354  // FEC slot
355  if ( not ( (fecSlot_ >= sistrip::CRATE_SLOT_MIN &&
357  ( fecSlot_ == 0 ) ) ) {
359 
360  // FEC ring
361  if ( not ( (fecRing_ >= sistrip::FEC_RING_MIN &&
363  ( fecRing_ == 0 ) ) ) {
365 
366  // CCU addr
367  if ( not ( (ccuAddr_ >= sistrip::CCU_ADDR_MIN &&
369  ( ccuAddr_ == 0 ) ) ) {
371 
372  // CCU chan
373  if ( not ( (ccuChan_ >= sistrip::CCU_CHAN_MIN &&
375  ( ccuChan_ == 0 ) ) ) {
377 
378  // LLD channel
379  if ( not ( (lldChan_ >= sistrip::LLD_CHAN_MIN &&
381  ( lldChan_ == 0 ) ) ) {
383 
384  // APV I2C address
385  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
387  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
389  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
390  }
391  } else if ( i2cAddr_ != 0 ) {
393 
394 }
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 672 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().

672  {
673 
675  channel(0);
676  if ( fecCrate_ && fecCrate_ != sistrip::invalid_ ) {
679  if ( fecSlot_ && fecSlot_ != sistrip::invalid_ ) {
681  channel(fecSlot_);
682  if ( fecRing_ && fecRing_ != sistrip::invalid_ ) {
684  channel(fecRing_);
685  if ( ccuAddr_ && ccuAddr_ != sistrip::invalid_ ) {
687  channel(ccuAddr_);
688  if ( ccuChan_ && ccuChan_ != sistrip::invalid_ ) {
690  channel(ccuChan_);
691  if ( lldChan_ && lldChan_ != sistrip::invalid_ ) {
693  channel(lldChan_);
694  if ( i2cAddr_ && i2cAddr_ != sistrip::invalid_ ) {
696  channel(i2cAddr_);
697  } else if ( i2cAddr_ == sistrip::invalid_ ) {
700  }
701  } else if ( lldChan_ == sistrip::invalid_ ) {
704  }
705  } else if ( ccuChan_ == sistrip::invalid_ ) {
708  }
709  } else if ( ccuAddr_ == sistrip::invalid_ ) {
712  }
713  } else if ( fecRing_ == sistrip::invalid_ ) {
716  }
717  } else if ( fecSlot_ == sistrip::invalid_ ) {
720  }
721  } else if ( fecCrate_ == sistrip::invalid_ ) {
724  }
725 
726 }
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:48
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:48
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 756 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<<().

756  {
757  ss << " [SiStripFecKey::print]" << std::endl
758  << std::hex
759  << " FEC key : 0x"
760  << std::setfill('0')
761  << std::setw(8) << key() << std::endl
762  << std::setfill(' ')
763  << std::dec
764  << " FEC VME crate : " << fecCrate() << std::endl
765  << " FEC VME slot : " << fecSlot() << std::endl
766  << " FEC control ring : " << fecRing() << std::endl
767  << " CCU I2C address : " << ccuAddr() << std::endl
768  << " CCU chan (FE module) : " << ccuChan() << std::endl
769  << " LaserDriver channel : " << lldChan() << std::endl
770  << " APV I2C address : " << i2cAddr() << std::endl
771  << " Directory : " << path() << std::endl
772  << " Granularity : "
774  << " Channel : " << channel() << std::endl
775  << " isValid : " << isValid();
776 }
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 730 of file SiStripFecKey.cc.

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

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

730  {
731  ss << "FEC:crate/slot/ring/CCU/module/LLD/I2C= "
732  << fecCrate() << "/"
733  << fecSlot() << "/"
734  << fecRing() << "/"
735  << ccuAddr() << "/"
736  << ccuChan() << "/"
737  << lldChan() << "/"
738  << i2cAddr();
739 // ss << " FecKey"
740 // //<< "=0x"
741 // //<< std::hex
742 // //<< std::setfill('0') << std::setw(8) << key() << std::setfill(' ')
743 // //<< std::dec
744 // //<< ", " << ( isValid() ? "Valid" : "Invalid" )
745 // << ", Crate=" << fecCrate()
746 // << ", Slot=" << fecSlot()
747 // << ", Ring=" << fecRing()
748 // << ", CCU=" << ccuAddr()
749 // << ", module=" << ccuChan()
750 // << ", LLD=" << lldChan()
751 // << ", I2C=" << i2cAddr();
752 }
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().