17 #ifndef COMMON_HMPIDDECODER_H_ 18 #define COMMON_HMPIDDECODER_H_ 27 #include "HMPID/HmpidEquipment.h" 29 #define MAXDESCRIPTIONLENGHT 50 32 #define RAWBLOCKDIMENSION_W 2048 33 #define HEADERDIMENSION_W 16 34 #define PAYLOADDIMENSION_W 2032 54 int mNumberOfEquipments;
62 int mNumberWordToRead;
84 int mHeFirmwareVersion;
90 int32_t* mActualStreamPtr;
91 int32_t* mEndStreamPtr;
92 int32_t* mStartStreamPtr;
96 HmpidDecoder(
int* EqIds,
int* CruIds,
int* LinkIds,
int numOfEquipments);
101 virtual bool setUpStream(
void* Buffer,
long BufferLen) = 0;
102 void setVerbosity(
int Level)
111 int getNumberOfEquipments()
113 return (mNumberOfEquipments);
122 double getChannelSum(
int Equipment,
int Column,
int Dilogic,
int Channel);
123 double getChannelSquare(
int Equipment,
int Column,
int Dilogic,
int Channel);
125 double getPadSum(
int Module,
int Column,
int Row);
129 void dumpPads(
int Equipment,
int type = 0);
136 int checkType(int32_t wp,
int* p1,
int* p2,
int* p3,
int* p4);
137 bool isRowMarker(int32_t wp,
int* Err,
int* rowSize,
int* mark);
138 bool isSegmentMarker(int32_t wp,
int* Err,
int* segSize,
int* Seg,
int* mark);
139 bool isPadWord(int32_t wp,
int* Err,
int* Col,
int* Dilogic,
int* Channel,
int* Charge);
140 bool isEoEmarker(int32_t wp,
int* Err,
int* Col,
int* Dilogic,
int* Eoesize);
141 int decodeHeader(int32_t* streamPtrAdr,
int* EquipIndex);
147 virtual void setPad(
HmpidEquipment* eq,
int col,
int dil,
int ch,
int charge) = 0;
149 virtual bool getBlockFromStream(int32_t** streamPtr, uint32_t Size) = 0;
150 virtual bool getHeaderFromStream(int32_t** streamPtr) = 0;
151 virtual bool getWordFromStream(int32_t* word) = 0;
152 int32_t* getActualStreamPtr()
154 return (mActualStreamPtr);
bool isRowMarker(int32_t wp, int *Err, int *rowSize, int *mark)
Definition: HmpidDecoder.cxx:219
void updateStatistics(HmpidEquipment *eq)
Definition: HmpidDecoder.cxx:390
HmpidDecoder(int *EqIds, int *CruIds, int *LinkIds, int numOfEquipments)
Definition: HmpidDecoder.cxx:69
int getEquipmentID(int CruId, int LinkId)
Definition: HmpidDecoder.cxx:156
void dumpHmpidError(int ErrorField)
Definition: HmpidDecoder.cxx:918
double getPadSquares(int Module, int Column, int Row)
Definition: HmpidDecoder.cxx:788
Definition: HmpidDecoder.h:47
Definition: HmpidDecoder.h:44
float getAverageBusyTime(int Equipment)
Definition: HmpidDecoder.cxx:854
void writeSummaryFile(char *summaryFileName)
Definition: HmpidDecoder.cxx:931
HmpidEquipment * evaluateHeaderContents(int EquipmentIndex)
Definition: HmpidDecoder.cxx:408
void dumpErrors(int Equipment)
Definition: HmpidDecoder.cxx:868
int getEquipmentIndex(int EquipmentId)
Definition: HmpidDecoder.cxx:142
int decodeHeader(int32_t *streamPtrAdr, int *EquipIndex)
Definition: HmpidDecoder.cxx:341
uint16_t getPadSamples(int Module, int Column, int Row)
Definition: HmpidDecoder.cxx:758
~HmpidDecoder()
Destructor : remove the Equipments instances.
Definition: HmpidDecoder.cxx:78
static char sHmpidErrorDescription[MAXHMPIDERRORS][MAXDESCRIPTIONLENGHT]
HMPID Firmware Error Messages Definitions.
Definition: HmpidDecoder.h:57
bool decodeBuffer()
Definition: HmpidDecoder.cxx:435
static char sErrorDescription[MAXERRORS][MAXDESCRIPTIONLENGHT]
Decoding Error Messages Definitions.
Definition: HmpidDecoder.h:56
bool isSegmentMarker(int32_t wp, int *Err, int *segSize, int *Seg, int *mark)
Definition: HmpidDecoder.cxx:239
double getChannelSum(int Equipment, int Column, int Dilogic, int Channel)
Definition: HmpidDecoder.cxx:818
uint16_t getChannelSamples(int Equipment, int Column, int Dilogic, int Channel)
Definition: HmpidDecoder.cxx:804
void dumpPads(int Equipment, int type=0)
Definition: HmpidDecoder.cxx:886
int checkType(int32_t wp, int *p1, int *p2, int *p3, int *p4)
Definition: HmpidDecoder.cxx:174
void init()
Resets to 0 all the class members.
Definition: HmpidDecoder.cxx:86
bool decodeHmpidError(int ErrorField, char *outbuf)
Definition: HmpidDecoder.cxx:315
Definition: HmpidEquipment.h:74
float getAverageEventSize(int Equipment)
Definition: HmpidDecoder.cxx:843
bool isEoEmarker(int32_t wp, int *Err, int *Col, int *Dilogic, int *Eoesize)
Definition: HmpidDecoder.cxx:291
bool isPadWord(int32_t wp, int *Err, int *Col, int *Dilogic, int *Channel, int *Charge)
Definition: HmpidDecoder.cxx:266
double getChannelSquare(int Equipment, int Column, int Dilogic, int Channel)
Definition: HmpidDecoder.cxx:832
double getPadSum(int Module, int Column, int Row)
Definition: HmpidDecoder.cxx:773