83 std::vector<uint8_t>
GetAsicList(uint16_t equipmentId);
91 size_t GetNumChans(uint16_t equipmentId, uint16_t asicId);
115 void InitComponentMap(
const std::map<uint32_t, std::vector<uint16_t>>& map);
119 const std::map<
size_t, std::map<
size_t, std::map<
size_t, std::tuple<int32_t, bool, int16_t, uint16_t>>>>&
138 std::map<uint16_t, std::map<uint8_t, std::vector<ChanMapping>>>
fChannelMap = {};
144 "Maps equipment, ASIC and channel to pad address, mask flag and DAQ offset",
204 std::map<uint16_t, std::array<ChanDescriptor, NFASPMOD* NFASPCH>>
fCalibMap = {};
209 "Maps of FEE calibration: mask, DAQ time offset, etc.",
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
std::string PrintCalibMap()
Debug output of readout map.
std::map< uint16_t, std::array< ChanDescriptor, NFASPMOD *NFASPCH > > fCalibMap
reference signal [ADU] to which the FEE gain is refereed
CBM_YAML_PROPERTIES(yaml::Property(&ReadoutCalib::fSystemCalibSignal, "sCalib", "System wide calibrating signal for TRD2D"), yaml::Property(&ReadoutCalib::fCalibMap, "calibMap", "Maps of FEE calibration: mask, DAQ time offset, etc.", YAML::Hex))
ChanDescriptor GetChannelFeeCalib(uint16_t modId, uint16_t padId)
Retrieve calibration for one channel.
~ReadoutCalib()
Destructor.
float GetSystemCalibSignal()
Get system reference signal for calibration.
ReadoutCalib()
Constructor.
std::vector< uint8_t > GetAsicList(uint16_t equipmentId)
Number of ASICS of a component.
ChanMapping ChanMap(uint16_t equipId, uint16_t asic, uint16_t chan)
API: Mapping from component, asic and channel to tuple (pad address, R pairing flag,...
int64_t fSystemTimeOffset
std::map< uint16_t, CompMapping > fReadoutMap
ReadoutSetup()
Constructor.
std::map< uint16_t, std::map< uint8_t, std::vector< ChanMapping > > > fChannelMap
std::string PrintReadoutMap()
Debug output of readout map.
std::vector< uint16_t > GetEquipmentIds()
Equipment in the configuration.
void InitComponentMap(const std::map< uint32_t, std::vector< uint16_t > > &map)
Initialisation of readout map.
void SetSystemTimeOffset(int64_t offsetNs)
Get system time offset.
~ReadoutSetup()
Destructor.
size_t GetNumAsics(uint16_t equipmentId)
Number of ASICS of a component.
CBM_YAML_PROPERTIES(yaml::Property(&ReadoutSetup::fSystemTimeOffset, "timeOffset", "System time offset for TRD2D"), yaml::Property(&ReadoutSetup::fReadoutMap, "readoutMap", "Maps equipment to module and Optical fibre Id", YAML::Hex), yaml::Property(&ReadoutSetup::fChannelMap, "channelMap", "Maps equipment, ASIC and channel to pad address, mask flag and DAQ offset", YAML::Hex))
void InitChannelMap(const std::map< size_t, std::map< size_t, std::map< size_t, std::tuple< int32_t, bool, int16_t, uint16_t > > > > &channelMap)
Initialisation of channel map.
size_t GetNumChans(uint16_t equipmentId, uint16_t asicId)
Number of channels of a component - ASIC pair.
int64_t GetSystemTimeOffset()
Get system time offset.
CompMapping CompMap(uint16_t equipId)
API: Mapping from component to pair (module id, crob id)
CBM_YAML_PROPERTIES(yaml::Property(&ChanDescriptor::maskFlag, "mask", "Channel masking flag"), yaml::Property(&ChanDescriptor::tOffset, "toff", "Channel wise time offset"), yaml::Property(&ChanDescriptor::baseline, "bline", "Baseline correction"), yaml::Property(&ChanDescriptor::gainfee, "gainfee", "Gain correction for FEE channel"), yaml::Property(&ChanDescriptor::noise, "noise", "Dynamic noise descriptor"))
float baseline
time [clk] correction
int8_t tOffset
HW mask flag for channel.
CBM_YAML_FORMAT(YAML::Flow)
noise descriptor [ChanNoise]
ChanNoise noise
ASIC gain deviation for channel.
float gainfee
Baseline correction for channel.
uint16_t lSThres
Threshold [ADU] for dynamic channel noise.
CBM_YAML_PROPERTIES(yaml::Property(&ChanNoise::tDelay, "delay", "time delay wrt the causing signal"), yaml::Property(&ChanNoise::tWindow, "window", "time window for noise signal search"), yaml::Property(&ChanNoise::lDThres, "dnoise", "Max signal value for cutting dynamic noise signals"), yaml::Property(&ChanNoise::lSThres, "snoise", "Max signal value for cutting static noise signals"))
threshold [ADU] for static channel noise (happens independently)
uint16_t lDThres
time [clk] window to search for noisy signal
uint16_t tWindow
time [clk] delay wrt to causing primary signal
bool maskFlag
map pad and pairing to FASP channel
uint16_t lThreshold
time correction in clk
int8_t tOffset
HW mask flag for channel.
CBM_YAML_FORMAT(YAML::Flow)
SW threshold for ringing channels.
CBM_YAML_PROPERTIES(yaml::Property(&ChanMapping::padAddress, "address", "Pad address"), yaml::Property(&ChanMapping::maskFlag, "mask", "Channel masking flag"), yaml::Property(&ChanMapping::tOffset, "toff", "Channel wise time offset"), yaml::Property(&ChanMapping::lThreshold, "thres", "SW masking by threshold"))
CBM_YAML_PROPERTIES(yaml::Property(&CompMapping::moduleId, "moduleId", "Module ID"), yaml::Property(&CompMapping::fiberId, "fiberId", "Optical Fibre ID"))
CBM_YAML_FORMAT(YAML::Flow)