Skip to content
Snippets Groups Projects

Add Timeshift per E-Link Functionality for TRD1D Unpacker

Merged Axel Puntke requested to merge apuntke/cbmroot:unpacker_add_elink_timeshift into master
1 unresolved thread
4 files
+ 52
3
Compare changes
  • Side-by-side
  • Inline

Files

@@ -74,6 +74,23 @@ public:
*/
void SetSpadicObject(std::shared_ptr<CbmTrdSpadic> value) { fSpadic = value; }
/**
* @brief Register a time offeset to be substracted from the digis which come from a specific CRI
*
* @param map
*/
void SetElinkTimeOffsetMap(std::map<std::uint32_t, std::vector<std::int32_t>> map) { fElinkTimeOffsetMap = map; }
/**
* @brief Get the time offeset to be substracted from the digis which come from a specific CRI
*
* @param criid
*/
std::int32_t GetElinkTimeOffset(std::uint32_t criid, std::uint8_t elinkid)
{
return (fElinkTimeOffsetMap.find(criid) == fElinkTimeOffsetMap.end() ? 0 : fElinkTimeOffsetMap[criid].at(elinkid));
}
protected:
/**
* @brief Handle the output created by the explicit algorithms. E.g. write to output vectors.
@@ -207,7 +224,10 @@ protected:
/** @brief length of one ts_msb in [cc] */
size_t fTsMsbLengthCC = fTsMsbLength / CbmTrdSpadic::GetClockCycle();
private:
/** @brief Map to store time offsets for each CRI&Elink combination */
std::map<std::uint32_t, std::vector<std::int32_t>> fElinkTimeOffsetMap;
private:
ClassDef(CbmTrdUnpackAlgoBaseR, 2)
};
Loading