CMS 3D CMS Logo

HGCalElectronicsId.h
Go to the documentation of this file.
1 #ifndef DataFormats_HGCalDigis_HGCalElectronicsId_h
2 #define DataFormats_HGCalDigis_HGCalElectronicsId_h
3 
4 #include <iostream>
5 #include <ostream>
6 #include <cstdint>
7 
21 public:
23  kFEDIDMask = 0x3ff,
28  };
35  };
36 
41  HGCalElectronicsId(uint16_t fedid, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
44 
48  uint32_t operator()() { return value_; }
49  uint32_t raw() { return value_; }
50  uint16_t fedId();
51  uint8_t captureBlock();
52  uint8_t econdIdx();
53  uint8_t econdeRx();
54  uint8_t halfrocChannel();
55 
56  void print(std::ostream& out = std::cout) {
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  }
62 
63 private:
64  // a 32-bit word
65  uint32_t value_;
66 };
67 
68 #endif
uint32_t operator()()
getters
Definition: value.py:1
wrapper for a 32b data word identifying a readout channel in the raw data The format is the following...
HGCalElectronicsId(const HGCalElectronicsId &o)
void print(std::ostream &out=std::cout)
HGCalElectronicsId(uint32_t value)