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 ()
 
uint8_t econdeRx ()
 
uint8_t econdIdx ()
 
uint16_t fedId ()
 
uint8_t halfrocChannel ()
 
 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() ()
 getters More...
 
void print (std::ostream &out=std::cout)
 
uint32_t raw ()
 

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 
)

◆ HGCalElectronicsId() [3/4]

HGCalElectronicsId::HGCalElectronicsId ( uint32_t  value)
inline

Definition at line 42 of file HGCalElectronicsId.h.

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

◆ HGCalElectronicsId() [4/4]

HGCalElectronicsId::HGCalElectronicsId ( const HGCalElectronicsId o)
inline

Definition at line 43 of file HGCalElectronicsId.h.

Member Function Documentation

◆ captureBlock()

uint8_t HGCalElectronicsId::captureBlock ( )

◆ econdeRx()

uint8_t HGCalElectronicsId::econdeRx ( )

◆ econdIdx()

uint8_t HGCalElectronicsId::econdIdx ( )

◆ fedId()

uint16_t HGCalElectronicsId::fedId ( )

◆ halfrocChannel()

uint8_t HGCalElectronicsId::halfrocChannel ( )

◆ operator()()

uint32_t HGCalElectronicsId::operator() ( )
inline

getters

Definition at line 48 of file HGCalElectronicsId.h.

References value_.

48 { return value_; }

◆ print()

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

Definition at line 56 of file HGCalElectronicsId.h.

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

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

◆ raw()

uint32_t HGCalElectronicsId::raw ( )
inline

Definition at line 49 of file HGCalElectronicsId.h.

References value_.

Referenced by print().

49 { return value_; }

Member Data Documentation

◆ value_

uint32_t HGCalElectronicsId::value_
private