CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HGCalElectronicsId Class Reference

wrapper for a 32b data word identifying a readout channel in the raw data The format is the following: Reserved: b'[28,31] FED ID: b'[18,27] Capture Block ID: b'[14,17] ECON-D idx: b'[10,13] ECON-D eRx: b'[6,9] 1/2 ROC channel number: b'[0-5] More...

#include <HGCalElectronicsId.h>

Public Types

enum  HGCalElectronicsIdMask {
  kFEDIDMask = 0x3ff, kCaptureBlockMask = 0xf, kECONDIdxMask = 0xf, kECONDeRxMask = 0xf,
  kHalfROCChannelMask = 0x3f
}
 
enum  HGCalElectronicsIdShift {
  kFEDIDShift = 18, kCaptureBlockShift = 14, kECONDIdxShift = 10, kECONDeRxShift = 6,
  kHalfROCChannelShift = 0
}
 

Public Member Functions

uint8_t captureBlock () const
 
uint8_t econdeRx () const
 
uint8_t econdIdx () const
 
uint16_t fedId () const
 
uint8_t halfrocChannel () const
 
 HGCalElectronicsId ()
 CTOR. More...
 
 HGCalElectronicsId (uint16_t fedid, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch)
 
 HGCalElectronicsId (uint32_t value)
 
 HGCalElectronicsId (const HGCalElectronicsId &o)
 
uint32_t operator() () const
 getters More...
 
bool operator< (const HGCalElectronicsId &oth) const
 
void print (std::ostream &out=std::cout) const
 
uint32_t raw () const
 

Private Attributes

uint32_t value_
 

Detailed Description

wrapper for a 32b data word identifying a readout channel in the raw data The format is the following: Reserved: b'[28,31] FED ID: b'[18,27] Capture Block ID: b'[14,17] ECON-D idx: b'[10,13] ECON-D eRx: b'[6,9] 1/2 ROC channel number: b'[0-5]

Definition at line 20 of file HGCalElectronicsId.h.

Member Enumeration Documentation

◆ HGCalElectronicsIdMask

Enumerator
kFEDIDMask 
kCaptureBlockMask 
kECONDIdxMask 
kECONDeRxMask 
kHalfROCChannelMask 

Definition at line 22 of file HGCalElectronicsId.h.

◆ HGCalElectronicsIdShift

Enumerator
kFEDIDShift 
kCaptureBlockShift 
kECONDIdxShift 
kECONDeRxShift 
kHalfROCChannelShift 

Definition at line 29 of file HGCalElectronicsId.h.

Constructor & Destructor Documentation

◆ HGCalElectronicsId() [1/4]

HGCalElectronicsId::HGCalElectronicsId ( )
inline

CTOR.

Definition at line 40 of file HGCalElectronicsId.h.

40 : value_(0) {}

◆ HGCalElectronicsId() [2/4]

HGCalElectronicsId::HGCalElectronicsId ( uint16_t  fedid,
uint8_t  captureblock,
uint8_t  econdidx,
uint8_t  econderx,
uint8_t  halfrocch 
)
explicit

◆ HGCalElectronicsId() [3/4]

HGCalElectronicsId::HGCalElectronicsId ( uint32_t  value)
inlineexplicit

Definition at line 43 of file HGCalElectronicsId.h.

43 : value_(value) {}
Definition: value.py:1

◆ HGCalElectronicsId() [4/4]

HGCalElectronicsId::HGCalElectronicsId ( const HGCalElectronicsId o)
inline

Definition at line 44 of file HGCalElectronicsId.h.

Member Function Documentation

◆ captureBlock()

uint8_t HGCalElectronicsId::captureBlock ( ) const

◆ econdeRx()

uint8_t HGCalElectronicsId::econdeRx ( ) const

◆ econdIdx()

uint8_t HGCalElectronicsId::econdIdx ( ) const

◆ fedId()

uint16_t HGCalElectronicsId::fedId ( ) const

◆ halfrocChannel()

uint8_t HGCalElectronicsId::halfrocChannel ( ) const

◆ operator()()

uint32_t HGCalElectronicsId::operator() ( ) const
inline

getters

Definition at line 49 of file HGCalElectronicsId.h.

References value_.

49 { return value_; }

◆ operator<()

bool HGCalElectronicsId::operator< ( const HGCalElectronicsId oth) const
inline

Definition at line 50 of file HGCalElectronicsId.h.

References value_.

50 { return value_ < oth.value_; }

◆ print()

void HGCalElectronicsId::print ( std::ostream &  out = std::cout) const
inline

Definition at line 58 of file HGCalElectronicsId.h.

References captureBlock(), TauDecayModes::dec, econdeRx(), econdIdx(), fedId(), halfrocChannel(), MillePedeFileConverter_cfg::out, and raw().

58  {
59  out << "Raw=0x" << std::hex << raw() << std::dec << std::endl
60  << "\tFED-ID: " << (uint32_t)fedId() << " Capture Block: " << (uint32_t)captureBlock()
61  << " ECON-D idx: " << (uint32_t)econdIdx() << " eRx: " << (uint32_t)econdeRx()
62  << " 1/2 ROC ch.: " << (uint32_t)halfrocChannel() << std::endl;
63  }
uint32_t raw() const
uint8_t halfrocChannel() const
uint16_t fedId() const
uint8_t econdIdx() const
uint8_t captureBlock() const
uint8_t econdeRx() const

◆ raw()

uint32_t HGCalElectronicsId::raw ( ) const
inline

Definition at line 51 of file HGCalElectronicsId.h.

References value_.

Referenced by print().

51 { return value_; }

Member Data Documentation

◆ value_

uint32_t HGCalElectronicsId::value_
private