20 #ifndef PNDMVDREADINTBDATA_H_ 21 #define PNDMVDREADINTBDATA_H_ 24 #include "TClonesArray.h" 52 pixel() : fPixelAddress(0), fLeadingEdge(0), fTrailingEdge(0){};
66 std::cout <<
"number of entires " << fileName.size() << std::endl;
67 for (
int i = 0;
i < fileName.size();
i++) {
68 std::cout <<
i <<
" " << fileName[
i] << std::endl;
70 fFileNames = fileName;
75 Bool_t ReadInData(TClonesArray *sdsDigiContainer, TClonesArray *headerContainer, TClonesArray *allheaderContainer);
76 Bool_t ReadInRawData(std::ifstream *fileHandle, std::vector<ULong64_t> &rawData);
77 void AnalyzeData(std::vector<ULong64_t> &rawData, Double_t clockFrequency);
79 pixel BitAnalyzePixelData(ULong64_t &data);
83 std::pair<UInt_t, UInt_t> PixeladdressToMatrixAddress(UInt_t pixelglobaladdress);
86 void SetFE(Int_t val) { fFE = val; }
107 ULong64_t ReflectBitsStream(ULong64_t crc,
int bitnum);
108 ULong64_t CalculateCRCTableFast(std::vector<char> p, ULong64_t len);
109 void GenerateCRCTable();
110 UShort_t CheckHammingCode(ULong64_t dataword,
int dataword_length);
111 ULong64_t ConvertToPix4HammingToStandardHamming(ULong64_t topixhamming);
112 void AnalyzeToPixFrame(Double_t clockFrequency);
116 std::vector<TString> fFileNames;
117 std::ifstream *fFileHandle;
118 Double_t fClockFrequency;
119 TClonesArray *fOutputArray;
120 TClonesArray *fOutputArrayHeader;
121 TClonesArray *fOutputArrayAllHeader;
122 UInt_t fSuperFrameCount;
123 UInt_t fOldFrameCount;
124 UInt_t fOldAllHeaderCount;
125 UInt_t fNonSequentialFC;
126 UInt_t fHammingLossFrameCount;
127 UInt_t fCRCLossFrameCount;
129 UInt_t fTotalHitCount;
130 UInt_t fPreFrameLossHitCount;
131 UInt_t fHammingLossHitCount;
132 UInt_t fCRCLossHitCount;
133 UInt_t fCorrectHitCount;
139 Bool_t fHeaderPresent;
140 Bool_t fTrailerPresent;
141 UInt_t fDoubleHeader;
142 UInt_t fDoubleTrailer;
144 UInt_t fTotalHeaderCount;
145 UInt_t fTotalTrailerCount;
151 UInt_t fTotalFrameCount;
152 UInt_t fCorrectFrameCount;
153 std::vector<ULong64_t> fToPixFrame;
155 TClonesArray *fDigiArray;
159 const ULong64_t fPolynom;
160 const ULong64_t fCRCXor;
162 const UInt_t fRefOut;
165 ULong64_t fCRCHighBit;
166 ULong64_t fCRCInit_direct;
167 ULong64_t fCRCTab[256];
UInt_t GetNonSequenctialFC() const
Data class to store the digi output of a pixel module.
UInt_t GetDoubleHeader() const
UInt_t GetDoubleTrailer() const
UInt_t GetPreFrameLossHitCount() const
UInt_t GetHammingLossHitCount() const
UInt_t GetTotalHeaderCount() const
void SetVerbose(Int_t val)
UInt_t GetTotalHitCount() const
UInt_t GetCRCLossHitCount() const
UInt_t GetTotalFrameCount() const
UInt_t GetTotalTrailerCount() const
UInt_t GetCorrectFrameCount() const
UInt_t GetCorrectHitCount() const
UInt_t GetCRCLossFrameCount() const
UInt_t GetSuperFrameCount() const
void SetFileName(std::vector< TString > fileName)
UInt_t GetHammingLossFrameCount() const
void SetClockFrequency(Double_t val)