LDMX Software
|
Identifies a location in the Ecal readout chain. More...
#include <EcalElectronicsID.h>
Public Types | |
typedef PackedIndex< 38, 48, 97 > | Index |
Public Types inherited from ldmx::DetectorID | |
typedef uint32_t | RawValue |
Public Member Functions | |
EcalElectronicsID () | |
Empty ECAL id (but not null!) | |
EcalElectronicsID (RawValue rawid) | |
Create from raw number. | |
EcalElectronicsID (const DetectorID id) | |
Create from a DetectorID, but check. | |
EcalElectronicsID (unsigned int fiber, unsigned int elink, unsigned int channel) | |
Create from pieces. | |
int | fiber () const |
Get the value of the fiber from the ID. | |
int | elink () const |
Get the value of the elink from the ID. | |
int | channel () const |
Get the value of the channel from the ID. | |
unsigned int | index () const |
Get the compact index value. | |
Public Member Functions inherited from ldmx::DetectorID | |
DetectorID () | |
Class constructor for a null DetectorID. | |
DetectorID (RawValue rawid) | |
Class constructor from a raw 32-bit integer. | |
DetectorID (SubdetectorIDType sdtype, RawValue raw_subpayload) | |
Class constructor from a subdetector id and a subdetector-specific section (masked to. | |
bool | null () const |
SubdetectorIDType | subdet () const |
RawValue | raw () const |
void | setRawValue (RawValue rawValue) |
Set the raw value of the detector ID. | |
bool | operator< (const DetectorID &id) const |
bool | operator== (const DetectorID &id) const |
bool | operator!= (const DetectorID &id) const |
Static Public Member Functions | |
static EcalElectronicsID | idFromIndex (unsigned int index) |
Construct an electronics id from an index. | |
Static Public Attributes | |
static const RawValue | INDEX_MASK {0xFFFFFF} |
static const unsigned int | MAX_INDEX {38 * 48 * 200} |
Static Public Attributes inherited from ldmx::DetectorID | |
static const RawValue | SUBDETECTORID_MASK {0x3F} |
static const RawValue | SUBDETECTORID_SHIFT {26} |
static const RawValue | SUBDETECTOR_PAYLOAD_MASK {0x3FFFFFF} |
Additional Inherited Members | |
Protected Attributes inherited from ldmx::DetectorID | |
RawValue | id_ |
The raw, packed value of the ID. | |
Identifies a location in the Ecal readout chain.
– fiber : optical fiber number (backend number), range assumed O(0-96) – elink : electronic link number, range assumed O(0-47) – channel : channel-on-elink, range O(0-37)
For transient use only i.e. we use this ID to help translate the digitized data coming off the detector into spatially-important EcalIDs.
Definition at line 27 of file EcalElectronicsID.h.
typedef PackedIndex<38, 48, 97> ldmx::EcalElectronicsID::Index |
Definition at line 31 of file EcalElectronicsID.h.
|
inline |
Empty ECAL id (but not null!)
Definition at line 38 of file EcalElectronicsID.h.
|
inline |
Create from raw number.
Importantly, this is NOT the PackedIndex value, it is the entire raw value including the subsystem ID.
Definition at line 46 of file EcalElectronicsID.h.
|
inline |
Create from a DetectorID, but check.
Definition at line 53 of file EcalElectronicsID.h.
|
inline |
Create from pieces.
Definition at line 60 of file EcalElectronicsID.h.
References channel(), elink(), fiber(), ldmx::DetectorID::id_, and index().
|
inline |
Get the value of the channel from the ID.
Definition at line 95 of file EcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by EcalElectronicsID().
|
inline |
Get the value of the elink from the ID.
Definition at line 90 of file EcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by EcalElectronicsID().
|
inline |
Get the value of the fiber from the ID.
Definition at line 85 of file EcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by EcalElectronicsID().
|
inlinestatic |
Construct an electronics id from an index.
This looks ugly (and it is) because we already have a constructor that uses the unsigned int type. This means we need a different static method for translating something we know to be an EID index rather than a full DetID raw value.
Definition at line 75 of file EcalElectronicsID.h.
References ldmx::DetectorID::id_, and index().
|
inline |
Get the compact index value.
Definition at line 100 of file EcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by EcalElectronicsID(), and idFromIndex().
|
static |
Definition at line 29 of file EcalElectronicsID.h.
|
static |
Definition at line 33 of file EcalElectronicsID.h.