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  explicit HGCalElectronicsId(
42  uint16_t fedid, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
43  explicit HGCalElectronicsId(uint32_t value) : value_(value) {}
45 
49  uint32_t operator()() const { return value_; }
50  bool operator<(const HGCalElectronicsId& oth) const { return value_ < oth.value_; }
51  uint32_t raw() const { return value_; }
52  uint16_t fedId() const;
53  uint8_t captureBlock() const;
54  uint8_t econdIdx() const;
55  uint8_t econdeRx() const;
56  uint8_t halfrocChannel() const;
57 
58  void print(std::ostream& out = std::cout) const {
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  }
64 
65 private:
66  // a 32-bit word
67  uint32_t value_;
68 };
69 
70 #endif
uint32_t raw() const
uint8_t halfrocChannel() const
uint16_t fedId() const
uint8_t econdIdx() const
uint8_t captureBlock() const
bool operator<(const HGCalElectronicsId &oth) const
void print(std::ostream &out=std::cout) const
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)
HGCalElectronicsId(uint32_t value)
uint32_t operator()() const
getters
uint8_t econdeRx() const