26 for (
auto& equip : equipIdsTrd2d) {
28 auto comppars = setup.
CompMap(equip);
30 par.fModId = comppars.moduleId;
32 par.fEqId = comppars.fiberId;
37 for (
auto asic : asics) {
39 const size_t numChans = setup.
GetNumChans(equip, asic);
41 for (
size_t chan = 0; chan < numChans; chan++) {
43 auto pars = setup.
ChanMap(equip, asic, chan);
45 uint16_t ch = std::abs(pars.padAddress);
47 par.fCalibParams[ch] = {calCh.maskFlag,
51 {calCh.noise.tDelay, calCh.noise.tWindow, calCh.noise.lDThres, calCh.noise.lSThres}};
52 chanPar.
fMask = pars.maskFlag;
54 par.toff[ch / 2] = pars.tOffset;
58 L_(debug) <<
"--- Configured asic " << (int) asic <<
" with " << numChans <<
" channels";
59 par.fAsicParams[asic] = asicPar;
61 L_(debug) <<
"--- Configured equipment 0x" << std::hex << (int) equip <<
" with " << std::dec << numAsics
65 std::unique_ptr<UnpackMSBase<CbmTrdDigi, UnpackMonitorData, UnpackAuxData>> algo;
66 for (
auto ver : AlgoVersion) {
76 L_(debug) <<
"Register algo for ver=" << (int) ver <<
" eqId=0x" << std::hex << (
int) equip;
77 fAlgos[{equip, ver}] = std::move(algo);
80 L_(info) <<
"--- Configured " <<
fAlgos.size() <<
" unpacker algorithms for TRD2D.";
Result_t DoUnpack(const fles::Subsystem subsystem, const fles::Timeslice &ts) const
std::map< UnpackKey, std::unique_ptr< Unpack_t > > fAlgos
ChanDescriptor GetChannelFeeCalib(uint16_t modId, uint16_t padId)
Retrieve calibration for one channel.
float GetSystemCalibSignal()
Get system reference signal for calibration.
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,...
std::vector< uint16_t > GetEquipmentIds()
Equipment in the configuration.
size_t GetNumAsics(uint16_t equipmentId)
Number of ASICS of a component.
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)
Unpack algorithm for TRD2D.
detail::UnpackBase::Result_t Result_t
Unpack(const Config &config)
Result_t operator()(const fles::Timeslice &) const
@ kMess24
unpacker version for 2-board FASPRO+GETS HW
TRD2D Unpacking parameters for one Asic.
std::vector< UnpackChannelPar > fChanParams
Parameters for different channels.
TRD2D Unpacking parameters for one Asic channel.
int32_t fPadAddress
Pad address for channel.
uint16_t fSignalThres
Signal threshold to remove ringing channels.
bool fMask
Flag for channel masking.
int8_t fDaqOffset
Time calibration parameter.
Parameters required for the TRD2D unpacking (specific to one component)