CbmRoot
Loading...
Searching...
No Matches
CbmRichUnpackAlgo.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Goethe-University Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig [committer] */
4
21#ifndef CbmRichUnpackAlgo_H
22#define CbmRichUnpackAlgo_H
23
24#include "CbmMcbm2018RichPar.h"
25#include "CbmRecoUnpackAlgo.tmpl"
26#include "CbmRichDigi.h"
28#include "Timeslice.hpp" // timeslice
29
30#include <Rtypes.h> // for types
31#include <RtypesCore.h>
32
33#include <cstddef>
34#include <cstdint>
35#include <iomanip>
36#include <memory>
37#include <utility>
38
39
41 public:
44
46 virtual ~CbmRichUnpackAlgo();
47
50
53
54
55 protected:
57
58 void processMbs(CbmRichUnpackAlgoMicrosliceReader& reader, bool isPrev);
59
61
62 void processCtsSubSubEvent(CbmRichUnpackAlgoMicrosliceReader& reader, uint32_t subSubEventSize,
63 uint32_t subSubEventId);
64
65 void processSubSubEvent(CbmRichUnpackAlgoMicrosliceReader& reader, int nofTimeWords, uint32_t subSubEventId);
66
67 void processTimeDataWord(CbmRichUnpackAlgoMicrosliceReader& reader, int iTdc, uint32_t epoch, uint32_t tdcWord,
68 uint32_t subSubEventId, std::vector<double>& raisingTime);
69
73 void writeOutputDigi(Int_t fpgaID, Int_t channel, Double_t time, Double_t tot);
74
75
87 bool unpack(const fles::Timeslice* ts, std::uint16_t icomp, UInt_t imslice);
88
89
90 double fMbsPrevTimeCh0 = 0.;
91 double fMbsPrevTimeCh1 = 0.;
92
93 std::map<uint32_t, double> fLastCh0ReTime; //key:TDC ID, value:Full time of last rising edge from ch 0
94 std::map<uint32_t, double> fPrevLastCh0ReTime; // key:TDC ID, value:Full time of previous last rising edge from ch 0
95
96
97 private:
98 ClassDef(CbmRichUnpackAlgo, 2)
99};
100
101#endif // CbmRichUnpackAlgo_H
void processMbs(CbmRichUnpackAlgoMicrosliceReader &reader, bool isPrev)
CbmRichUnpackAlgo & operator=(const CbmRichUnpackAlgo &)=delete
Assignment operator - not implemented.
CbmRichUnpackAlgo()
Create the Cbm Trd Unpack AlgoBase object.
virtual ~CbmRichUnpackAlgo()
Destroy the Cbm Trd Unpack Task object.
void processSubSubEvent(CbmRichUnpackAlgoMicrosliceReader &reader, int nofTimeWords, uint32_t subSubEventId)
std::map< uint32_t, double > fPrevLastCh0ReTime
void processTrbPacket(CbmRichUnpackAlgoMicrosliceReader &reader)
void processTimeDataWord(CbmRichUnpackAlgoMicrosliceReader &reader, int iTdc, uint32_t epoch, uint32_t tdcWord, uint32_t subSubEventId, std::vector< double > &raisingTime)
void processCtsSubSubEvent(CbmRichUnpackAlgoMicrosliceReader &reader, uint32_t subSubEventSize, uint32_t subSubEventId)
bool unpack(const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
Unpack a given microslice. To be implemented in the derived unpacker algos.
void processHubBlock(CbmRichUnpackAlgoMicrosliceReader &reader)
CbmRichUnpackAlgo(const CbmRichUnpackAlgo &)=delete
Copy constructor - not implemented.
void writeOutputDigi(Int_t fpgaID, Int_t channel, Double_t time, Double_t tot)
std::map< uint32_t, double > fLastCh0ReTime