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_, SiStripKey::path(), and groupFilesInBlocks::temp.

94  :
95  SiStripKey(),
103 {
104  SiStripKey& temp = const_cast<SiStripKey&>(input);
105  SiStripFecKey& fec_key = dynamic_cast<SiStripFecKey&>(temp);
106  if ( (&fec_key) ) {
107  key(fec_key.key());
108  path(fec_key.path());
109  granularity(fec_key.granularity());
110  fecCrate_ = fec_key.fecCrate();
111  fecSlot_ = fec_key.fecSlot();
112  fecRing_ = fec_key.fecRing();
113  ccuAddr_ = fec_key.ccuAddr();
114  ccuChan_ = fec_key.ccuChan();
115  lldChan_ = fec_key.lldChan();
116  i2cAddr_ = fec_key.i2cAddr();
117  }
118 }
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
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:24
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 122 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(), lldChan_, and groupFilesInBlocks::temp.

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

185  :
186  SiStripKey(),
194 {;}
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 242 of file SiStripFecKey.cc.

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

Referenced by initFromKey().

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

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

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

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

208  {
209  if ( !hybrid_pos ||
210  hybrid_pos >
212  sistrip::APV_I2C_MIN + 1 ) ) {
213  return sistrip::invalid_;
214  }
215  return ( hybrid_pos + sistrip::APV_I2C_MIN - 1 );
216 }
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 220 of file SiStripFecKey.cc.

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

221  {
222  if ( lld_chan < sistrip::LLD_CHAN_MIN ||
223  lld_chan > sistrip::LLD_CHAN_MAX ) {
224  return sistrip::invalid_;
225  }
226  return ( sistrip::APV_I2C_MIN + lld_chan * sistrip::APVS_PER_CHAN - (first_apv?2:1) );
227 }
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 426 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().

426  {
427 
428  if ( key() == sistrip::invalid32_ ) {
429 
430  // ---------- Set FecKey based on member data ----------
431 
432  // Initialise to null value
433  key(0);
434 
435  // Extract FEC crate
438  key( key() | (fecCrate_<<fecCrateOffset_) );
439  } else if ( fecCrate_ == 0 ) {
440  key( key() | (fecCrate_<<fecCrateOffset_) );
441  } else {
443  }
444 
445  // Extract FEC slot
448  key( key() | (fecSlot_<<fecSlotOffset_) );
449  } else if ( fecSlot_ == 0 ) {
450  key( key() | (fecSlot_<<fecSlotOffset_) );
451  } else {
452  key( key() | (fecSlotMask_<<fecSlotOffset_) );
453  }
454 
455  // Extract FEC ring
458  key( key() | (fecRing_<<fecRingOffset_) );
459  } else if ( fecRing_ == 0 ) {
460  key( key() | (fecRing_<<fecRingOffset_) );
461  } else {
462  key( key() | (fecRingMask_<<fecRingOffset_) );
463  }
464 
465  // Extract CCU addr
468  key( key() | (ccuAddr_<<ccuAddrOffset_) );
469  } else if ( ccuAddr_ == 0 ) {
470  key( key() | (ccuAddr_<<ccuAddrOffset_) );
471  } else {
472  key( key() | (ccuAddrMask_<<ccuAddrOffset_) );
473  }
474 
475  // Extract CCU chan
478  key( key() | ( (ccuChan_-(sistrip::CCU_CHAN_MIN-1)) << ccuChanOffset_ ) );
479  } else if ( ccuChan_ == 0 ) {
480  key( key() | (ccuChan_<<ccuChanOffset_) );
481  } else {
482  key( key() | (ccuChanMask_<<ccuChanOffset_) );
483  }
484 
485  // Extract LLD channel
488  key( key() | (lldChan_<<lldChanOffset_) );
489  } else if ( lldChan_ == 0 ) {
490  key( key() | (lldChan_<<lldChanOffset_) );
491  } else {
492  key( key() | (lldChanMask_<<lldChanOffset_) );
493  }
494 
495  // Extract APV I2C address
496  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
498  key( key() | ( ( firstApvOfPair( i2cAddr_ ) ? 1 : 2 ) << i2cAddrOffset_ ) ); // key encodes APV number (1 or 2)
499  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
501  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
502  }
503  } else if ( i2cAddr_ == 0 ) {
504  key( key() | (i2cAddr_<<i2cAddrOffset_) );
505  } else {
506  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
507  }
508 
509  } else {
510 
511  // ---------- Set member data based on FEC key ----------
512 
520 
526  else if ( ccuChan_ ) { ccuChan_ += (sistrip::CCU_CHAN_MIN-1); }
529  else if ( i2cAddr_ && lldChan_ != lldChanMask_ ) { i2cAddr_ = i2cAddr( lldChan_, 2-i2cAddr_ ); }
530 
531  }
532 
533 }
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 537 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_, and groupFilesInBlocks::temp.

Referenced by SiStripFecKey().

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

360  {
361 
362  // FEC crate
366  } else if ( fecCrate_ == 0 ) {
367  fecCrate_ = 0;
368  } else { fecCrate_ = sistrip::invalid_; }
369 
370  // FEC slot
373  fecSlot_ = fecSlot_;
374  } else if ( fecSlot_ == 0 ) {
375  fecSlot_ = 0;
376  } else { fecSlot_ = sistrip::invalid_; }
377 
378  // FEC ring
381  fecRing_ = fecRing_;
382  } else if ( fecRing_ == 0 ) {
383  fecRing_ = 0;
384  } else { fecRing_ = sistrip::invalid_; }
385 
386  // CCU addr
389  ccuAddr_ = ccuAddr_;
390  } else if ( ccuAddr_ == 0 ) {
391  ccuAddr_ = 0;
392  } else { ccuAddr_ = sistrip::invalid_; }
393 
394  // CCU chan
397  ccuChan_ = ccuChan_;
398  } else if ( ccuChan_ == 0 ) {
399  ccuChan_ = 0;
400  } else { ccuChan_ = sistrip::invalid_; }
401 
402  // LLD channel
405  lldChan_ = lldChan_;
406  } else if ( lldChan_ == 0 ) {
407  lldChan_ = 0;
408  } else { lldChan_ = sistrip::invalid_; }
409 
410  // APV I2C address
411  if ( i2cAddr_ >= sistrip::APV_I2C_MIN &&
413  i2cAddr_ = i2cAddr_;
414  if ( lldChan_ && lldChan( i2cAddr_ ) != lldChan_ ) {
416  key( key() | (i2cAddrMask_<<i2cAddrOffset_) );
417  }
418  } else if ( i2cAddr_ == 0 ) {
419  i2cAddr_ = 0;
420  } else { i2cAddr_ = sistrip::invalid_; }
421 
422 }
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 700 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().

700  {
701 
703  channel(0);
704  if ( fecCrate_ && fecCrate_ != sistrip::invalid_ ) {
707  if ( fecSlot_ && fecSlot_ != sistrip::invalid_ ) {
709  channel(fecSlot_);
710  if ( fecRing_ && fecRing_ != sistrip::invalid_ ) {
712  channel(fecRing_);
713  if ( ccuAddr_ && ccuAddr_ != sistrip::invalid_ ) {
715  channel(ccuAddr_);
716  if ( ccuChan_ && ccuChan_ != sistrip::invalid_ ) {
718  channel(ccuChan_);
719  if ( lldChan_ && lldChan_ != sistrip::invalid_ ) {
721  channel(lldChan_);
722  if ( i2cAddr_ && i2cAddr_ != sistrip::invalid_ ) {
724  channel(i2cAddr_);
725  } else if ( i2cAddr_ == sistrip::invalid_ ) {
728  }
729  } else if ( lldChan_ == sistrip::invalid_ ) {
732  }
733  } else if ( ccuChan_ == sistrip::invalid_ ) {
736  }
737  } else if ( ccuAddr_ == sistrip::invalid_ ) {
740  }
741  } else if ( fecRing_ == sistrip::invalid_ ) {
744  }
745  } else if ( fecSlot_ == sistrip::invalid_ ) {
748  }
749  } else if ( fecCrate_ == sistrip::invalid_ ) {
752  }
753 
754 }
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 269 of file SiStripFecKey.cc.

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

269  {
270  SiStripKey& temp = const_cast<SiStripKey&>(key);
271  SiStripFecKey& input = dynamic_cast<SiStripFecKey&>(temp);
272  if ( !(&input) ) { return false; }
273  if ( isEqual(input) ) { return true; }
274  else if ( ( fecCrate_ == 0 || input.fecCrate() == 0 ) &&
275  ( fecSlot_ == 0 || input.fecSlot() == 0 ) &&
276  ( fecRing_ == 0 || input.fecRing() == 0 ) &&
277  ( ccuAddr_ == 0 || input.ccuAddr() == 0 ) &&
278  ( lldChan_ == 0 || input.lldChan() == 0 ) &&
279  ( i2cAddr_ == 0 || input.i2cAddr() == 0 ) ) {
280  return true;
281  } else { return false; }
282 }
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
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:24
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 252 of file SiStripFecKey.cc.

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

Referenced by isConsistent().

252  {
253  SiStripKey& temp = const_cast<SiStripKey&>(key);
254  SiStripFecKey& input = dynamic_cast<SiStripFecKey&>(temp);
255  if ( !(&input) ) { return false; }
256  if ( fecCrate_ == input.fecCrate() &&
257  fecSlot_ == input.fecSlot() &&
258  fecRing_ == input.fecRing() &&
259  ccuAddr_ == input.ccuAddr() &&
260  ccuChan_ == input.ccuChan() &&
261  lldChan_ == input.lldChan() &&
262  i2cAddr_ == input.i2cAddr() ) {
263  return true;
264  } else { return false; }
265 }
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
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:24
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 323 of file SiStripFecKey.cc.

References sistrip::APV.

Referenced by CommissioningHistosUsingDb::detInfo().

323  {
324  return isInvalid(sistrip::APV);
325 }
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 329 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.

329  {
330  if ( gran == sistrip::FEC_SYSTEM ) { return false; }
331  else if ( gran == sistrip::UNDEFINED_GRAN ||
332  gran == sistrip::UNKNOWN_GRAN ) { return false; }
333 
334  if ( fecCrate_ == sistrip::invalid_ ) {
335  if ( gran == sistrip::FEC_CRATE ) { return true; }
336  if ( fecSlot_ == sistrip::invalid_ ) {
337  if ( gran == sistrip::FEC_RING ) { return true; }
338  if ( fecRing_ == sistrip::invalid_ ) {
339  if ( gran == sistrip::FEC_RING ) { return true; }
340  if ( ccuAddr_ == sistrip::invalid_ ) {
341  if ( gran == sistrip::CCU_ADDR ) { return true; }
342  if ( ccuChan_ == sistrip::invalid_ ) {
343  if ( gran == sistrip::CCU_CHAN ) { return true; }
344  if ( lldChan_ == sistrip::invalid_ ) {
345  if ( gran == sistrip::LLD_CHAN ) { return true; }
346  if ( i2cAddr_ == sistrip::invalid_ ) {
347  if ( gran == sistrip::APV ) { return true; }
348  }
349  }
350  }
351  }
352  }
353  }
354  }
355  return false;
356 }
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 286 of file SiStripFecKey.cc.

References sistrip::APV.

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

286  {
287  return isValid(sistrip::APV);
288 }
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 292 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.

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

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

231  {
232  if ( i2c_addr == 0 ) { return 0; }
233  else 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 + 1 );
238 }
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 784 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<<().

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

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

Referenced by FastFedCablingHistosUsingDb::connections().

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