test
CMS 3D CMS Logo

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

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

#include <SiStripFecKey.h>

Inheritance diagram for SiStripFecKey:
SiStripKey

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

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

Additional Inherited Members

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

Detailed Description

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

Author
R.Bainbridge

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

The class provides the following member data:

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

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

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

Definition at line 45 of file SiStripFecKey.h.

Constructor & Destructor Documentation

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

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

Definition at line 13 of file SiStripFecKey.cc.

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_
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 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_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromValue()
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
void initGranularity()
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_
uint16_t lldChan_
uint16_t fecCrate_
uint16_t fecRing_
void initFromValue()
const std::string & path() const
Definition: SiStripKey.h:126
uint16_t i2cAddr_
static const uint16_t invalid_
Definition: Constants.h:16
void initGranularity()
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  if ( (&fec_key) ) {
105  key(fec_key.key());
106  path(fec_key.path());
107  granularity(fec_key.granularity());
108  fecCrate_ = fec_key.fecCrate();
109  fecSlot_ = fec_key.fecSlot();
110  fecRing_ = fec_key.fecRing();
111  ccuAddr_ = fec_key.ccuAddr();
112  ccuChan_ = fec_key.ccuChan();
113  lldChan_ = fec_key.lldChan();
114  i2cAddr_ = fec_key.i2cAddr();
115  }
116 }
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 120 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_.

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

182  :
183  SiStripKey(),
191 {;}
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 239 of file SiStripFecKey.cc.

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

Referenced by initFromKey().

239  {
240  if ( i2c_addr < sistrip::APV_I2C_MIN ||
241  i2c_addr > sistrip::APV_I2C_MAX ) {
242  return sistrip::invalid_;
243  }
244  return ( ( ( i2c_addr - sistrip::APV_I2C_MIN ) % 2 ) == 0 );
245 }
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 195 of file SiStripFecKey.cc.

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

195  {
196  if ( i2c_addr < sistrip::APV_I2C_MIN ||
197  i2c_addr > sistrip::APV_I2C_MAX ) {
198  return sistrip::invalid_;
199  }
200  return ( i2c_addr - sistrip::APV_I2C_MIN + 1 );
201 }
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 205 of file SiStripFecKey.cc.

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

205  {
206  if ( !hybrid_pos ||
207  hybrid_pos >
209  sistrip::APV_I2C_MIN + 1 ) ) {
210  return sistrip::invalid_;
211  }
212  return ( hybrid_pos + sistrip::APV_I2C_MIN - 1 );
213 }
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 217 of file SiStripFecKey.cc.

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

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

Reimplemented from SiStripKey.

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

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

Reimplemented from SiStripKey.

Definition at line 532 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_, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by SiStripFecKey().

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

Reimplemented from SiStripKey.

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

355  {
356 
357  // FEC crate
361  } else if ( fecCrate_ == 0 ) {
362  fecCrate_ = 0;
363  } else { fecCrate_ = sistrip::invalid_; }
364 
365  // FEC slot
368  fecSlot_ = fecSlot_;
369  } else if ( fecSlot_ == 0 ) {
370  fecSlot_ = 0;
371  } else { fecSlot_ = sistrip::invalid_; }
372 
373  // FEC ring
376  fecRing_ = fecRing_;
377  } else if ( fecRing_ == 0 ) {
378  fecRing_ = 0;
379  } else { fecRing_ = sistrip::invalid_; }
380 
381  // CCU addr
384  ccuAddr_ = ccuAddr_;
385  } else if ( ccuAddr_ == 0 ) {
386  ccuAddr_ = 0;
387  } else { ccuAddr_ = sistrip::invalid_; }
388 
389  // CCU chan
392  ccuChan_ = ccuChan_;
393  } else if ( ccuChan_ == 0 ) {
394  ccuChan_ = 0;
395  } else { ccuChan_ = sistrip::invalid_; }
396 
397  // LLD channel
400  lldChan_ = lldChan_;
401  } else if ( lldChan_ == 0 ) {
402  lldChan_ = 0;
403  } else { lldChan_ = sistrip::invalid_; }
404 
405  // APV I2C address
406  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
408  i2cAddr_ = i2cAddr_;
409  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
411  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
412  }
413  } else if ( i2cAddr_ == 0 ) {
414  i2cAddr_ = 0;
415  } else { i2cAddr_ = sistrip::invalid_; }
416 
417 }
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 ( )
privatevirtual

Reimplemented from SiStripKey.

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

695  {
696 
698  channel(0);
699  if ( fecCrate_ && fecCrate_ != sistrip::invalid_ ) {
702  if ( fecSlot_ && fecSlot_ != sistrip::invalid_ ) {
704  channel(fecSlot_);
705  if ( fecRing_ && fecRing_ != sistrip::invalid_ ) {
707  channel(fecRing_);
708  if ( ccuAddr_ && ccuAddr_ != sistrip::invalid_ ) {
710  channel(ccuAddr_);
711  if ( ccuChan_ && ccuChan_ != sistrip::invalid_ ) {
713  channel(ccuChan_);
714  if ( lldChan_ && lldChan_ != sistrip::invalid_ ) {
716  channel(lldChan_);
717  if ( i2cAddr_ && i2cAddr_ != sistrip::invalid_ ) {
719  channel(i2cAddr_);
720  } else if ( i2cAddr_ == sistrip::invalid_ ) {
723  }
724  } else if ( lldChan_ == sistrip::invalid_ ) {
727  }
728  } else if ( ccuChan_ == sistrip::invalid_ ) {
731  }
732  } else if ( ccuAddr_ == sistrip::invalid_ ) {
735  }
736  } else if ( fecRing_ == sistrip::invalid_ ) {
739  }
740  } else if ( fecSlot_ == sistrip::invalid_ ) {
743  }
744  } else if ( fecCrate_ == sistrip::invalid_ ) {
747  }
748 
749 }
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
virtual

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

Reimplemented from SiStripKey.

Definition at line 265 of file SiStripFecKey.cc.

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

265  {
266  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
267  if ( !(&input) ) { return false; }
268  if ( isEqual(input) ) { return true; }
269  else if ( ( fecCrate_ == 0 || input.fecCrate() == 0 ) &&
270  ( fecSlot_ == 0 || input.fecSlot() == 0 ) &&
271  ( fecRing_ == 0 || input.fecRing() == 0 ) &&
272  ( ccuAddr_ == 0 || input.ccuAddr() == 0 ) &&
273  ( lldChan_ == 0 || input.lldChan() == 0 ) &&
274  ( i2cAddr_ == 0 || input.i2cAddr() == 0 ) ) {
275  return true;
276  } else { return false; }
277 }
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
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
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 249 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().

249  {
250  const SiStripFecKey& input = dynamic_cast<const SiStripFecKey&>(key);
251  if ( !(&input) ) { return false; }
252  if ( fecCrate_ == input.fecCrate() &&
253  fecSlot_ == input.fecSlot() &&
254  fecRing_ == input.fecRing() &&
255  ccuAddr_ == input.ccuAddr() &&
256  ccuChan_ == input.ccuChan() &&
257  lldChan_ == input.lldChan() &&
258  i2cAddr_ == input.i2cAddr() ) {
259  return true;
260  } else { return false; }
261 }
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
virtual

Identifies all member data as being "invalid".

Reimplemented from SiStripKey.

Definition at line 318 of file SiStripFecKey.cc.

References sistrip::APV.

Referenced by CommissioningHistosUsingDb::detInfo().

318  {
319  return isInvalid(sistrip::APV);
320 }
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 324 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.

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

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

Reimplemented from SiStripKey.

Definition at line 281 of file SiStripFecKey.cc.

References sistrip::APV.

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

281  {
282  return isValid(sistrip::APV);
283 }
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 287 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.

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

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

228  {
229  if ( i2c_addr == 0 ) { return 0; }
230  else if ( i2c_addr < sistrip::APV_I2C_MIN ||
231  i2c_addr > sistrip::APV_I2C_MAX ) {
232  return sistrip::invalid_;
233  }
234  return ( ( i2c_addr - sistrip::APV_I2C_MIN ) / 2 + 1 );
235 }
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
virtual

A terse summary of the key

Reimplemented from SiStripKey.

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

779  {
780  ss << " [SiStripFecKey::print]" << std::endl
781  << std::hex
782  << " FEC key : 0x"
783  << std::setfill('0')
784  << std::setw(8) << key() << std::endl
785  << std::setfill(' ')
786  << std::dec
787  << " FEC VME crate : " << fecCrate() << std::endl
788  << " FEC VME slot : " << fecSlot() << std::endl
789  << " FEC control ring : " << fecRing() << std::endl
790  << " CCU I2C address : " << ccuAddr() << std::endl
791  << " CCU chan (FE module) : " << ccuChan() << std::endl
792  << " LaserDriver channel : " << lldChan() << std::endl
793  << " APV I2C address : " << i2cAddr() << std::endl
794  << " Directory : " << path() << std::endl
795  << " Granularity : "
797  << " Channel : " << channel() << std::endl
798  << " isValid : " << isValid();
799 }
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
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 753 of file SiStripFecKey.cc.

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

Referenced by FastFedCablingHistosUsingDb::connections().

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