1 #ifndef DATAFORMATS_HCALDETID_HCALELECTRONICSID_H 2 #define DATAFORMATS_HCALDETID_HCALELECTRONICSID_H 1 45 ((spigot&0xF)<<5) | ((dccid&0x1F)<<9)))
51 ((spigot&0xF)<<5) | ((dccid&0x1F)<<9))) {
58 ((slot&0xF)<<9) | ((crate&0x3F)<<13))) {
constexpr HcalElectronicsId(int slbChan, int slbSite, int spigot, int dccid, int crate, int slot, int tb)
constexpr uint32_t rawId() const
constexpr void setHTR(int crate, int slot, int tb)
constexpr int operator<(const HcalElectronicsId &id) const
Compare the id to another id for use in a map.
constexpr uint32_t operator()()
constexpr int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
static int slbChan(const HcalTriggerPrimitiveSample &theSample)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
constexpr HcalElectronicsId(int crate, int slot, int fiber, int fc, bool isTrigger)
constexpr HcalElectronicsId()
constexpr HcalElectronicsId(uint32_t id)
constexpr bool isUTCAid() const
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
constexpr int linearIndex() const
get a fast, compact, unique index for linear lookups
constexpr bool isVMEid() const
std::string slbChannelCode() const
get the HTR-wide slb channel code (letter plus number)
constexpr HcalElectronicsId(int fiberChan, int fiberIndex, int spigot, int dccid)
constexpr int htrSlot() const
get the htr slot
constexpr int readoutVMECrateId() const
get the readout VME crate number
constexpr int operator==(const HcalElectronicsId &id) const
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
constexpr int crateId() const
get the readout VME crate number
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
constexpr int subtype() const
get subtype for this channel (valid for uTCA only)
std::ostream & operator<<(std::ostream &, const HcalElectronicsId &)
static const int maxDCCId
constexpr int slot() const
get the htr or uHTR slot
static const int maxLinearIndex
constexpr int operator!=(const HcalElectronicsId &id) const
constexpr int htrChanId() const
get the HTR channel id (1-24)
constexpr int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
uint32_t hcalElectronicsId_
constexpr bool isTriggerChainId() const
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
Readout chain identification for Hcal.