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

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

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

Constructor using 32-bit "FEC key".

Definition at line 39 of file SiStripFecKey.cc.

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

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

Constructor using directory path.

Definition at line 58 of file SiStripFecKey.cc.

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

58  :
67 {
68  // order is important!
69  initFromPath();
70  initFromValue();
71  initFromKey();
73 }
uint16_t ccuAddr_
uint16_t fecSlot_
uint16_t ccuChan_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromValue()
const std::string & path() const
Definition: SiStripKey.h:127
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:17
void initGranularity()
SiStripFecKey::SiStripFecKey ( const SiStripFecKey input)

Copy constructor.

Definition at line 77 of file SiStripFecKey.cc.

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

77  :
78  SiStripKey(),
79  fecCrate_(input.fecCrate()),
80  fecSlot_(input.fecSlot()),
81  fecRing_(input.fecRing()),
82  ccuAddr_(input.ccuAddr()),
83  ccuChan_(input.ccuChan()),
84  lldChan_(input.lldChan()),
85  i2cAddr_(input.i2cAddr())
86 {
87  key(input.key());
88  path(input.path());
89  granularity(input.granularity());
90 }
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:126
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:128
const std::string & path() const
Definition: SiStripKey.h:127
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 94 of file SiStripFecKey.cc.

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

94  :
95  SiStripKey(),
103 {
104  const SiStripFecKey& fec_key = dynamic_cast<const SiStripFecKey&>(input);
105  if ( (&fec_key) ) {
106  key(fec_key.key());
107  path(fec_key.path());
108  granularity(fec_key.granularity());
109  fecCrate_ = fec_key.fecCrate();
110  fecSlot_ = fec_key.fecSlot();
111  fecRing_ = fec_key.fecRing();
112  ccuAddr_ = fec_key.ccuAddr();
113  ccuChan_ = fec_key.ccuChan();
114  lldChan_ = fec_key.lldChan();
115  i2cAddr_ = fec_key.i2cAddr();
116  }
117 }
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:126
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:46
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:128
const std::string & path() const
Definition: SiStripKey.h:127
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
static const uint16_t invalid_
Definition: Constants.h:17
const uint16_t & ccuChan() const
SiStripFecKey::SiStripFecKey ( const SiStripKey input,
const sistrip::Granularity gran 
)

Copy to level specified by granularity.

Definition at line 121 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(), LaserDQM_cfg::input, sistrip::LLD_CHAN, lldChan(), and lldChan_.

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

Default constructor

Definition at line 183 of file SiStripFecKey.cc.

183  :
184  SiStripKey(),
192 {;}
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:17

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

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

Referenced by initFromKey().

240  {
241  if ( i2c_addr < sistrip::APV_I2C_MIN ||
242  i2c_addr > sistrip::APV_I2C_MAX ) {
243  return sistrip::invalid_;
244  }
245  return ( ( ( i2c_addr - sistrip::APV_I2C_MIN ) % 2 ) == 0 );
246 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:17
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 196 of file SiStripFecKey.cc.

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

196  {
197  if ( i2c_addr < sistrip::APV_I2C_MIN ||
198  i2c_addr > sistrip::APV_I2C_MAX ) {
199  return sistrip::invalid_;
200  }
201  return ( i2c_addr - sistrip::APV_I2C_MIN + 1 );
202 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:17
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 206 of file SiStripFecKey.cc.

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

206  {
207  if ( !hybrid_pos ||
208  hybrid_pos >
210  sistrip::APV_I2C_MIN + 1 ) ) {
211  return sistrip::invalid_;
212  }
213  return ( hybrid_pos + sistrip::APV_I2C_MIN - 1 );
214 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:17
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 218 of file SiStripFecKey.cc.

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

219  {
220  if ( lld_chan < sistrip::LLD_CHAN_MIN ||
221  lld_chan > sistrip::LLD_CHAN_MAX ) {
222  return sistrip::invalid_;
223  }
224  return ( sistrip::APV_I2C_MIN + lld_chan * sistrip::APVS_PER_CHAN - (first_apv?2:1) );
225 }
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:17
static const uint16_t APVS_PER_CHAN
void SiStripFecKey::initFromKey ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 422 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().

422  {
423 
424  if ( key() == sistrip::invalid32_ ) {
425 
426  // ---------- Set FecKey based on member data ----------
427 
428  // Initialise to null value
429  key(0);
430 
431  // Extract FEC crate
434  key( key() | (fecCrate_<<fecCrateOffset_) );
435  } else if ( fecCrate_ == 0 ) {
436  key( key() | (fecCrate_<<fecCrateOffset_) );
437  } else {
439  }
440 
441  // Extract FEC slot
444  key( key() | (fecSlot_<<fecSlotOffset_) );
445  } else if ( fecSlot_ == 0 ) {
446  key( key() | (fecSlot_<<fecSlotOffset_) );
447  } else {
448  key( key() | (fecSlotMask_<<fecSlotOffset_) );
449  }
450 
451  // Extract FEC ring
454  key( key() | (fecRing_<<fecRingOffset_) );
455  } else if ( fecRing_ == 0 ) {
456  key( key() | (fecRing_<<fecRingOffset_) );
457  } else {
458  key( key() | (fecRingMask_<<fecRingOffset_) );
459  }
460 
461  // Extract CCU addr
464  key( key() | (ccuAddr_<<ccuAddrOffset_) );
465  } else if ( ccuAddr_ == 0 ) {
466  key( key() | (ccuAddr_<<ccuAddrOffset_) );
467  } else {
468  key( key() | (ccuAddrMask_<<ccuAddrOffset_) );
469  }
470 
471  // Extract CCU chan
474  key( key() | ( (ccuChan_-(sistrip::CCU_CHAN_MIN-1)) << ccuChanOffset_ ) );
475  } else if ( ccuChan_ == 0 ) {
476  key( key() | (ccuChan_<<ccuChanOffset_) );
477  } else {
478  key( key() | (ccuChanMask_<<ccuChanOffset_) );
479  }
480 
481  // Extract LLD channel
484  key( key() | (lldChan_<<lldChanOffset_) );
485  } else if ( lldChan_ == 0 ) {
486  key( key() | (lldChan_<<lldChanOffset_) );
487  } else {
488  key( key() | (lldChanMask_<<lldChanOffset_) );
489  }
490 
491  // Extract APV I2C address
492  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
494  key( key() | ( ( firstApvOfPair( i2cAddr_ ) ? 1 : 2 ) << i2cAddrOffset_ ) ); // key encodes APV number (1 or 2)
495  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
497  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
498  }
499  } else if ( i2cAddr_ == 0 ) {
500  key( key() | (i2cAddr_<<i2cAddrOffset_) );
501  } else {
502  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
503  }
504 
505  } else {
506 
507  // ---------- Set member data based on FEC key ----------
508 
516 
522  else if ( ccuChan_ ) { ccuChan_ += (sistrip::CCU_CHAN_MIN-1); }
525  else if ( i2cAddr_ && lldChan_ != lldChanMask_ ) { i2cAddr_ = i2cAddr( lldChan_, 2-i2cAddr_ ); }
526 
527  }
528 
529 }
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:16
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:126
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:17
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 ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 533 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_, sistrip::null_, SiStripKey::path(), sistrip::root_, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by SiStripFecKey().

533  {
534 
535  if ( path() == sistrip::null_ ) {
536 
537  // ---------- Set directory path based on member data ----------
538 
539  std::stringstream dir;
540 
541  dir << sistrip::root_ << sistrip::dir_
543 
544  // Add FEC crate
545  if ( fecCrate_ ) {
547 
548  // Add FEC slot
549  if ( fecSlot_ ) {
551 
552  // Add FEC ring
553  if ( fecRing_ ) {
555 
556  // Add CCU address
557  if ( ccuAddr_ ) {
559 
560  // Add CCU channel
561  if ( ccuChan_ ) {
563 
564  // Add LLD channel
565  if ( lldChan_ ) {
567 
568  // Add APV I2C address
569  if ( i2cAddr_ ) {
570  dir << sistrip::apv_ << i2cAddr_ << sistrip::dir_;
571  }
572  }
573  }
574  }
575  }
576  }
577  }
578 
579  std::string temp( dir.str() );
580  path( temp );
581 
582  } else {
583 
584  // ---------- Set member data based on directory path ----------
585 
586  fecCrate_ = 0;
587  fecSlot_ = 0;
588  fecRing_ = 0;
589  ccuAddr_ = 0;
590  ccuChan_ = 0;
591  lldChan_ = 0;
592  i2cAddr_ = 0;
593 
594  // Check if root is found
595  if ( path().find( sistrip::root_ ) == std::string::npos ) {
596  std::string temp = path();
597  path( std::string(sistrip::root_) + sistrip::dir_ + temp );
598  }
599 
600  size_t curr = 0; // current string position
601  size_t next = 0; // next string position
602  next = path().find( sistrip::controlView_, curr );
603 
604  // Extract view
605  curr = next;
606  if ( curr != std::string::npos ) {
607  next = path().find( sistrip::fecCrate_, curr );
608  std::string control_view( path(),
609  curr+(sizeof(sistrip::controlView_) - 1),
610  next-(sizeof(sistrip::dir_) - 1)-curr );
611 
612  // Extract FEC crate
613  curr = next;
614  if ( curr != std::string::npos ) {
615  next = path().find( sistrip::fecSlot_, curr );
616  std::string fec_crate( path(),
617  curr+(sizeof(sistrip::fecCrate_) - 1),
618  next-(sizeof(sistrip::dir_) - 1)-curr );
619  fecCrate_ = std::atoi( fec_crate.c_str() );
620 
621  // Extract FEC slot
622  curr = next;
623  if ( curr != std::string::npos ) {
624  next = path().find( sistrip::fecRing_, curr );
625  std::string fec_slot( path(),
626  curr+(sizeof(sistrip::fecSlot_) - 1),
627  next-(sizeof(sistrip::dir_) - 1)-curr );
628  fecSlot_ = std::atoi( fec_slot.c_str() );
629 
630  // Extract FEC ring
631  curr = next;
632  if ( curr != std::string::npos ) {
633  next = path().find( sistrip::ccuAddr_, curr );
634  std::string fec_ring( path(),
635  curr+(sizeof(sistrip::fecRing_) - 1),
636  next-(sizeof(sistrip::dir_) - 1)-curr );
637  fecRing_ = std::atoi( fec_ring.c_str() );
638 
639  // Extract CCU address
640  curr = next;
641  if ( curr != std::string::npos ) {
642  next = path().find( sistrip::ccuChan_, curr );
643  std::string ccu_addr( path(),
644  curr+(sizeof(sistrip::ccuAddr_) - 1),
645  next-(sizeof(sistrip::dir_) - 1)-curr );
646  ccuAddr_ = std::atoi( ccu_addr.c_str() );
647 
648  // Extract CCU channel
649  curr = next;
650  if ( curr != std::string::npos ) {
651  next = path().find( sistrip::lldChan_, curr );
652  std::string ccu_chan( path(),
653  curr+(sizeof(sistrip::ccuChan_) - 1),
654  next-(sizeof(sistrip::dir_) - 1)-curr );
655  ccuChan_ = std::atoi( ccu_chan.c_str() );
656 
657  // Extract LLD channel
658  curr = next;
659  if ( curr != std::string::npos ) {
660  next = path().find( sistrip::apv_, curr );
661  std::string lld_chan( path(),
662  curr+(sizeof(sistrip::lldChan_) - 1),
663  next-(sizeof(sistrip::dir_) - 1)-curr );
664  lldChan_ = std::atoi( lld_chan.c_str() );
665 
666  // Extract I2C address
667  curr = next;
668  if ( curr != std::string::npos ) {
669  next = std::string::npos;
670  std::string i2c_addr( path(),
671  curr+(sizeof(sistrip::apv_) - 1),
672  next-curr );
673  i2cAddr_ = std::atoi( i2c_addr.c_str() );
674  }
675  }
676  }
677  }
678  }
679  }
680  }
681  } else {
682  std::stringstream ss;
683  ss << sistrip::root_ << sistrip::dir_;
684  //ss << sistrip::root_ << sistrip::dir_
685  //<< sistrip::unknownView_ << sistrip::dir_;
686  std::string temp( ss.str() );
687  path( temp );
688  }
689 
690  }
691 
692 }
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:7
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:127
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:23
void SiStripFecKey::initFromValue ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 356 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().

356  {
357 
358  // FEC crate
362  } else if ( fecCrate_ == 0 ) {
363  fecCrate_ = 0;
364  } else { fecCrate_ = sistrip::invalid_; }
365 
366  // FEC slot
369  fecSlot_ = fecSlot_;
370  } else if ( fecSlot_ == 0 ) {
371  fecSlot_ = 0;
372  } else { fecSlot_ = sistrip::invalid_; }
373 
374  // FEC ring
377  fecRing_ = fecRing_;
378  } else if ( fecRing_ == 0 ) {
379  fecRing_ = 0;
380  } else { fecRing_ = sistrip::invalid_; }
381 
382  // CCU addr
385  ccuAddr_ = ccuAddr_;
386  } else if ( ccuAddr_ == 0 ) {
387  ccuAddr_ = 0;
388  } else { ccuAddr_ = sistrip::invalid_; }
389 
390  // CCU chan
393  ccuChan_ = ccuChan_;
394  } else if ( ccuChan_ == 0 ) {
395  ccuChan_ = 0;
396  } else { ccuChan_ = sistrip::invalid_; }
397 
398  // LLD channel
401  lldChan_ = lldChan_;
402  } else if ( lldChan_ == 0 ) {
403  lldChan_ = 0;
404  } else { lldChan_ = sistrip::invalid_; }
405 
406  // APV I2C address
407  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
409  i2cAddr_ = i2cAddr_;
410  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
412  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
413  }
414  } else if ( i2cAddr_ == 0 ) {
415  i2cAddr_ = 0;
416  } else { i2cAddr_ = sistrip::invalid_; }
417 
418 }
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:126
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:17
static const uint16_t APV_I2C_MAX
static const uint16_t i2cAddrMask_
void SiStripFecKey::initGranularity ( )
privatevirtual

Reimplemented from SiStripKey.

Definition at line 696 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().

696  {
697 
699  channel(0);
700  if ( fecCrate_ && fecCrate_ != sistrip::invalid_ ) {
703  if ( fecSlot_ && fecSlot_ != sistrip::invalid_ ) {
705  channel(fecSlot_);
706  if ( fecRing_ && fecRing_ != sistrip::invalid_ ) {
708  channel(fecRing_);
709  if ( ccuAddr_ && ccuAddr_ != sistrip::invalid_ ) {
711  channel(ccuAddr_);
712  if ( ccuChan_ && ccuChan_ != sistrip::invalid_ ) {
714  channel(ccuChan_);
715  if ( lldChan_ && lldChan_ != sistrip::invalid_ ) {
717  channel(lldChan_);
718  if ( i2cAddr_ && i2cAddr_ != sistrip::invalid_ ) {
720  channel(i2cAddr_);
721  } else if ( i2cAddr_ == sistrip::invalid_ ) {
724  }
725  } else if ( lldChan_ == sistrip::invalid_ ) {
728  }
729  } else if ( ccuChan_ == sistrip::invalid_ ) {
732  }
733  } else if ( ccuAddr_ == sistrip::invalid_ ) {
736  }
737  } else if ( fecRing_ == sistrip::invalid_ ) {
740  }
741  } else if ( fecSlot_ == sistrip::invalid_ ) {
744  }
745  } else if ( fecCrate_ == sistrip::invalid_ ) {
748  }
749 
750 }
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:128
const uint16_t & channel() const
Definition: SiStripKey.h:129
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:17
bool SiStripFecKey::isConsistent ( const SiStripKey key) const
virtual

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

Reimplemented from SiStripKey.

Definition at line 266 of file SiStripFecKey.cc.

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

266  {
267  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
268  if ( !(&input) ) { return false; }
269  if ( isEqual(input) ) { return true; }
270  else if ( ( fecCrate_ == 0 || input.fecCrate() == 0 ) &&
271  ( fecSlot_ == 0 || input.fecSlot() == 0 ) &&
272  ( fecRing_ == 0 || input.fecRing() == 0 ) &&
273  ( ccuAddr_ == 0 || input.ccuAddr() == 0 ) &&
274  ( lldChan_ == 0 || input.lldChan() == 0 ) &&
275  ( i2cAddr_ == 0 || input.i2cAddr() == 0 ) ) {
276  return true;
277  } else { return false; }
278 }
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
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
const uint32_t & key() const
Definition: SiStripKey.h:126
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:46
const uint16_t & fecCrate() const
bool isEqual(const SiStripKey &) const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
bool SiStripFecKey::isEqual ( const SiStripKey key) const
virtual

Identifies key objects with identical member data.

Reimplemented from SiStripKey.

Definition at line 250 of file SiStripFecKey.cc.

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

Referenced by isConsistent().

250  {
251  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
252  if ( !(&input) ) { return false; }
253  if ( fecCrate_ == input.fecCrate() &&
254  fecSlot_ == input.fecSlot() &&
255  fecRing_ == input.fecRing() &&
256  ccuAddr_ == input.ccuAddr() &&
257  ccuChan_ == input.ccuChan() &&
258  lldChan_ == input.lldChan() &&
259  i2cAddr_ == input.i2cAddr() ) {
260  return true;
261  } else { return false; }
262 }
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:126
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:46
const uint16_t & fecCrate() const
uint16_t i2cAddr_
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const
bool SiStripFecKey::isInvalid ( ) const
virtual

Identifies all member data as being "invalid".

Reimplemented from SiStripKey.

Definition at line 319 of file SiStripFecKey.cc.

References sistrip::APV.

Referenced by CommissioningHistosUsingDb::detInfo().

319  {
320  return isInvalid(sistrip::APV);
321 }
bool isInvalid() const
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 325 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.

325  {
326  if ( gran == sistrip::FEC_SYSTEM ) { return false; }
327  else if ( gran == sistrip::UNDEFINED_GRAN ||
328  gran == sistrip::UNKNOWN_GRAN ) { return false; }
329 
330  if ( fecCrate_ == sistrip::invalid_ ) {
331  if ( gran == sistrip::FEC_CRATE ) { return true; }
332  if ( fecSlot_ == sistrip::invalid_ ) {
333  if ( gran == sistrip::FEC_RING ) { return true; }
334  if ( fecRing_ == sistrip::invalid_ ) {
335  if ( gran == sistrip::FEC_RING ) { return true; }
336  if ( ccuAddr_ == sistrip::invalid_ ) {
337  if ( gran == sistrip::CCU_ADDR ) { return true; }
338  if ( ccuChan_ == sistrip::invalid_ ) {
339  if ( gran == sistrip::CCU_CHAN ) { return true; }
340  if ( lldChan_ == sistrip::invalid_ ) {
341  if ( gran == sistrip::LLD_CHAN ) { return true; }
342  if ( i2cAddr_ == sistrip::invalid_ ) {
343  if ( gran == sistrip::APV ) { return true; }
344  }
345  }
346  }
347  }
348  }
349  }
350  }
351  return false;
352 }
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:17
bool SiStripFecKey::isValid ( void  ) const
virtual

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

Reimplemented from SiStripKey.

Definition at line 282 of file SiStripFecKey.cc.

References sistrip::APV.

Referenced by CommissioningHistosUsingDb::buildDetInfo(), SummaryGeneratorControlView::fill(), FastFedCablingAnalysis::header(), and print().

282  {
283  return isValid(sistrip::APV);
284 }
bool isValid() const
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 288 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.

288  {
289  if ( gran == sistrip::FEC_SYSTEM ) { return true; }
290  else if ( gran == sistrip::UNDEFINED_GRAN ||
291  gran == sistrip::UNKNOWN_GRAN ) { return false; }
292 
293  if ( fecCrate_ != sistrip::invalid_ ) {
294  if ( gran == sistrip::FEC_CRATE ) { return true; }
295  if ( fecSlot_ != sistrip::invalid_ ) {
296  if ( gran == sistrip::FEC_RING ) { return true; }
297  if ( fecRing_ != sistrip::invalid_ ) {
298  if ( gran == sistrip::FEC_RING ) { return true; }
299  if ( ccuAddr_ != sistrip::invalid_ ) {
300  if ( gran == sistrip::CCU_ADDR ) { return true; }
301  if ( ccuChan_ != sistrip::invalid_ ) {
302  if ( gran == sistrip::CCU_CHAN ) { return true; }
303  if ( lldChan_ != sistrip::invalid_ ) {
304  if ( gran == sistrip::LLD_CHAN ) { return true; }
305  if ( i2cAddr_ != sistrip::invalid_ ) {
306  if ( gran == sistrip::APV ) { return true; }
307  }
308  }
309  }
310  }
311  }
312  }
313  }
314  return false;
315 }
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:17
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 229 of file SiStripFecKey.cc.

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

229  {
230  if ( i2c_addr == 0 ) { return 0; }
231  else if ( i2c_addr < sistrip::APV_I2C_MIN ||
232  i2c_addr > sistrip::APV_I2C_MAX ) {
233  return sistrip::invalid_;
234  }
235  return ( ( i2c_addr - sistrip::APV_I2C_MIN ) / 2 + 1 );
236 }
static const uint16_t APV_I2C_MIN
static const uint16_t invalid_
Definition: Constants.h:17
static const uint16_t APV_I2C_MAX
void SiStripFecKey::print ( std::stringstream &  ss) const
virtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 780 of file SiStripFecKey.cc.

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

Referenced by operator<<().

780  {
781  ss << " [SiStripFecKey::print]" << std::endl
782  << std::hex
783  << " FEC key : 0x"
784  << std::setfill('0')
785  << std::setw(8) << key() << std::endl
786  << std::setfill(' ')
787  << std::dec
788  << " FEC VME crate : " << fecCrate() << std::endl
789  << " FEC VME slot : " << fecSlot() << std::endl
790  << " FEC control ring : " << fecRing() << std::endl
791  << " CCU I2C address : " << ccuAddr() << std::endl
792  << " CCU chan (FE module) : " << ccuChan() << std::endl
793  << " LaserDriver channel : " << lldChan() << std::endl
794  << " APV I2C address : " << i2cAddr() << std::endl
795  << " Directory : " << path() << std::endl
796  << " Granularity : "
798  << " Channel : " << channel() << std::endl
799  << " isValid : " << isValid();
800 }
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:126
const sistrip::Granularity & granularity() const
Definition: SiStripKey.h:128
const std::string & path() const
Definition: SiStripKey.h:127
const uint16_t & fecCrate() const
const uint16_t & channel() const
Definition: SiStripKey.h:129
const uint16_t & ccuAddr() const
bool isValid() const
const uint16_t & ccuChan() const
void SiStripFecKey::terse ( std::stringstream &  ss) const
virtual

A terse summary of the key

Reimplemented from SiStripKey.

Definition at line 754 of file SiStripFecKey.cc.

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

Referenced by FastFedCablingHistosUsingDb::connections().

754  {
755  ss << "FEC:crate/slot/ring/CCU/module/LLD/I2C= "
756  << fecCrate() << "/"
757  << fecSlot() << "/"
758  << fecRing() << "/"
759  << ccuAddr() << "/"
760  << ccuChan() << "/"
761  << lldChan() << "/"
762  << i2cAddr();
763 // ss << " FecKey"
764 // //<< "=0x"
765 // //<< std::hex
766 // //<< std::setfill('0') << std::setw(8) << key() << std::setfill(' ')
767 // //<< std::dec
768 // //<< ", " << ( isValid() ? "Valid" : "Invalid" )
769 // << ", Crate=" << fecCrate()
770 // << ", Slot=" << fecSlot()
771 // << ", Ring=" << fecRing()
772 // << ", CCU=" << ccuAddr()
773 // << ", module=" << ccuChan()
774 // << ", LLD=" << lldChan()
775 // << ", I2C=" << i2cAddr();
776 }
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 172 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 196 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::ccuAddrOffset_ = 10
staticprivate

Definition at line 187 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::ccuChan_
private

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

Definition at line 175 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 197 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::ccuChanOffset_ = 5
staticprivate

Definition at line 188 of file SiStripFecKey.h.

Referenced by initFromKey().

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

Definition at line 193 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecCrateOffset_ = 27
staticprivate

Definition at line 184 of file SiStripFecKey.h.

Referenced by initFromKey().

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

Definition at line 195 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecRingOffset_ = 18
staticprivate

Definition at line 186 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::fecSlot_
private

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

Definition at line 166 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 194 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::fecSlotOffset_ = 22
staticprivate

Definition at line 185 of file SiStripFecKey.h.

Referenced by initFromKey().

uint16_t SiStripFecKey::i2cAddr_
private

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

Definition at line 181 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 199 of file SiStripFecKey.h.

Referenced by initFromKey(), and initFromValue().

const uint16_t SiStripFecKey::i2cAddrOffset_ = 0
staticprivate

Definition at line 190 of file SiStripFecKey.h.

Referenced by initFromKey(), and initFromValue().

uint16_t SiStripFecKey::lldChan_
private

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

Definition at line 178 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 198 of file SiStripFecKey.h.

Referenced by initFromKey().

const uint16_t SiStripFecKey::lldChanOffset_ = 2
staticprivate

Definition at line 189 of file SiStripFecKey.h.

Referenced by initFromKey().