8 #ifndef PNDMVDREADINTBDATA_H_ 9 #define PNDMVDREADINTBDATA_H_ 12 #include "TClonesArray.h" 40 pixel() : fPixelAddress(0), fLeadingEdge(0), fTrailingEdge(0){};
54 std::cout <<
"number of entires " << fileName.size() << std::endl;
55 for (
int i = 0;
i < fileName.size();
i++) {
56 std::cout <<
i <<
" " << fileName[
i] << std::endl;
58 fFileNames = fileName;
63 Bool_t ReadInData(TClonesArray *sdsDigiContainer, TClonesArray *headerContainer, TClonesArray *allheaderContainer);
64 Bool_t ReadInRawData(std::ifstream *fileHandle, std::vector<ULong64_t> &rawData);
65 void AnalyzeData(std::vector<ULong64_t> &rawData, Double_t clockFrequency);
67 pixel BitAnalyzePixelData(ULong64_t &data);
71 std::pair<UInt_t, UInt_t> PixeladdressToMatrixAddress(UInt_t pixelglobaladdress);
74 void SetFE(Int_t val) { fFE = val; }
95 ULong64_t ReflectBitsStream(ULong64_t crc,
int bitnum);
96 ULong64_t CalculateCRCTableFast(std::vector<char> p, ULong64_t len);
97 void GenerateCRCTable();
98 UShort_t CheckHammingCode(ULong64_t dataword,
int dataword_length);
99 ULong64_t ConvertToPix4HammingToStandardHamming(ULong64_t topixhamming);
100 void AnalyzeToPixFrame(Double_t clockFrequency);
104 std::vector<TString> fFileNames;
105 std::ifstream *fFileHandle;
106 Double_t fClockFrequency;
107 TClonesArray *fOutputArray;
108 TClonesArray *fOutputArrayHeader;
109 TClonesArray *fOutputArrayAllHeader;
110 UInt_t fSuperFrameCount;
111 UInt_t fOldFrameCount;
112 UInt_t fOldAllHeaderCount;
113 UInt_t fNonSequentialFC;
114 UInt_t fHammingLossFrameCount;
115 UInt_t fCRCLossFrameCount;
117 UInt_t fTotalHitCount;
118 UInt_t fPreFrameLossHitCount;
119 UInt_t fHammingLossHitCount;
120 UInt_t fCRCLossHitCount;
121 UInt_t fCorrectHitCount;
127 Bool_t fHeaderPresent;
128 Bool_t fTrailerPresent;
129 UInt_t fDoubleHeader;
130 UInt_t fDoubleTrailer;
132 UInt_t fTotalHeaderCount;
133 UInt_t fTotalTrailerCount;
139 UInt_t fTotalFrameCount;
140 UInt_t fCorrectFrameCount;
141 std::vector<ULong64_t> fToPixFrame;
143 TClonesArray *fDigiArray;
147 const ULong64_t fPolynom;
148 const ULong64_t fCRCXor;
150 const UInt_t fRefOut;
153 ULong64_t fCRCHighBit;
154 ULong64_t fCRCInit_direct;
155 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)