|
LDMX Software
|
Tracker DAQ map: the correspondence between an electronics sensor address (feb, hybrid) and the detector layer it reads, plus the strip transform that turns a physical channel (pchannel) into a sensor strip index. More...
#include <TrackerDaqMap.h>
Classes | |
| struct | SensorInfo |
| Everything the mapper needs to know about one physical sensor. More... | |
Public Member Functions | |
| bool | has (uint8_t feb, uint8_t hybrid) const |
| True if the map has an entry for this electronics sensor. | |
| const SensorInfo & | at (uint8_t feb, uint8_t hybrid) const |
| Look up the sensor read by (feb, hybrid). | |
| std::size_t | size () const |
| Number of sensors in the map. | |
| const std::map< uint16_t, SensorInfo > & | sensors () const |
| All sensors, keyed by (feb << 8) | hybrid. | |
Static Public Member Functions | |
| static TrackerDaqMap | fromJsonFile (const std::string &path) |
| Load a DAQ map from a JSON file. | |
Static Private Member Functions | |
| static uint16_t | key (uint8_t feb, uint8_t hybrid) |
Private Attributes | |
| std::map< uint16_t, SensorInfo > | sensors_ |
| key = (feb << 8) | hybrid | |
Tracker DAQ map: the correspondence between an electronics sensor address (feb, hybrid) and the detector layer it reads, plus the strip transform that turns a physical channel (pchannel) into a sensor strip index.
Definition at line 15 of file TrackerDaqMap.h.
| const TrackerDaqMap::SensorInfo & tracking::reco::TrackerDaqMap::at | ( | uint8_t | feb, |
| uint8_t | hybrid ) const |
Look up the sensor read by (feb, hybrid).
| framework::exception::Exception | if there is no such entry; callers that want to skip unmapped sensors must guard with has() first. |
Definition at line 65 of file TrackerDaqMap.cxx.
References sensors_.
Referenced by tracking::reco::SiStripWaveformFitProcessor::produce().
|
static |
Load a DAQ map from a JSON file.
Expected schema:
Extra keys (e.g. "station", "orientation", "_comment") are ignored.
| framework::exception::Exception | if the file cannot be opened, is not valid JSON, lacks a non-empty "sensors" array, has a malformed entry, or defines the same (feb, hybrid) twice. There is no silent empty-map failure mode. |
Definition at line 10 of file TrackerDaqMap.cxx.
References sensors_.
Referenced by tracking::reco::SiStripWaveformFitProcessor::onProcessStart().
|
inline |
True if the map has an entry for this electronics sensor.
Definition at line 46 of file TrackerDaqMap.h.
References sensors_.
Referenced by tracking::reco::SiStripWaveformFitProcessor::produce().
|
inlinestaticprivate |
Definition at line 66 of file TrackerDaqMap.h.
|
inline |
All sensors, keyed by (feb << 8) | hybrid.
For consumers that need to index by something other than the electronics address (e.g. build a layer_id -> n_strips lookup).
Definition at line 63 of file TrackerDaqMap.h.
References sensors_.
|
inline |
Number of sensors in the map.
Definition at line 58 of file TrackerDaqMap.h.
References sensors_.
Referenced by tracking::reco::SiStripWaveformFitProcessor::onProcessStart().
|
private |
key = (feb << 8) | hybrid
Definition at line 70 of file TrackerDaqMap.h.
Referenced by at(), fromJsonFile(), has(), sensors(), and size().