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 
22 public:
24  kZsideMask = 0x1,
25  kLocalFEDIDMask = 0x3ff,
30  };
38  };
39 
44  explicit HGCalElectronicsId(
45  bool zside, uint16_t localfedid, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
46  explicit HGCalElectronicsId(uint32_t value) : value_(value) {}
47 
52  uint32_t operator()() const { return value_; }
53  bool operator<(const HGCalElectronicsId& oth) const { return value_ < oth.value_; }
54  bool operator==(const HGCalElectronicsId& oth) const { return value_ == oth.value_; }
55  uint32_t raw() const { return value_; }
56  bool zSide() const;
57  uint16_t localFEDId() const;
58  uint8_t captureBlock() const;
59  uint8_t econdIdx() const;
60  uint8_t econdeRx() const;
61  uint8_t halfrocChannel() const;
62  uint8_t rocChannel() const;
63  uint8_t cmWord() const;
64  bool isCM() const;
65  void print(std::ostream& out = std::cout) const {
66  out << "Raw=0x" << std::hex << raw() << std::dec << std::endl
67  << "\tLocal FED-ID: " << (uint32_t)localFEDId() << " Capture Block: " << (uint32_t)captureBlock()
68  << " ECON-D idx: " << (uint32_t)econdIdx() << " eRx: " << (uint32_t)econdeRx()
69  << " 1/2 ROC ch.: " << (uint32_t)halfrocChannel() << " isCM=" << isCM() << " zSide=" << zSide() << std::endl;
70  }
71 
72 private:
73  // a 32-bit word
74  uint32_t value_;
75 };
76 
77 #endif
uint32_t raw() const
uint8_t cmWord() const
uint8_t halfrocChannel() const
uint8_t rocChannel() const
uint8_t econdIdx() const
uint8_t captureBlock() const
bool operator<(const HGCalElectronicsId &oth) const
void print(std::ostream &out=std::cout) const
uint16_t localFEDId() const
int zside(DetId const &)
bool operator==(const HGCalElectronicsId &oth) 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(uint32_t value)
uint32_t operator()() const
getters
uint8_t econdeRx() const