18 #ifndef COMMON_HMPIDEQUIPMENT_H_ 19 #define COMMON_HMPIDEQUIPMENT_H_ 28 const int MAXERRORS = 13;
29 const int MAXHMPIDERRORS = 5;
31 const int ERR_NOTKNOWN = 0;
32 const int ERR_ROWMARKEMPTY = 1;
33 const int ERR_DUPLICATEPAD = 2;
34 const int ERR_ROWMARKWRONG = 3;
35 const int ERR_ROWMARKLOST = 4;
36 const int ERR_ROWMARKERROR = 5;
37 const int ERR_LOSTEOEMARK = 6;
38 const int ERR_DOUBLEEOEMARK = 7;
39 const int ERR_WRONGSIZEINEOE = 8;
40 const int ERR_DOUBLEMARKWORD = 9;
41 const int ERR_WRONGSIZESEGMENTMARK = 10;
42 const int ERR_LOSTEOSMARK = 11;
43 const int ERR_HMPID = 12;
46 const int MAXEQUIPMENTS = 14;
48 const int N_SEGMENTS = 3;
49 const int N_COLXSEGMENT = 8;
50 const int N_COLUMNS = 24;
51 const int N_DILOGICS = 10;
52 const int N_CHANNELS = 48;
54 const int N_MODULES = 7;
55 const int N_XROWS = 160;
56 const int N_YCOLS = 144;
58 const int N_EQUIPMENTTOTALPADS = N_SEGMENTS * N_COLXSEGMENT * N_DILOGICS * N_CHANNELS;
59 const int N_HMPIDTOTALPADS = MAXEQUIPMENTS * N_SEGMENTS * N_COLXSEGMENT * N_DILOGICS * N_CHANNELS;
62 const int TH_FILENOTEXISTS = 9;
63 const int TH_OPENFILE = 8;
64 const int TH_CREATEFILE = 7;
65 const int TH_READFILE = 6;
66 const int TH_WRITEFILE = 5;
67 const int TH_WRONGEQUIPINDEX = 19;
68 const int TH_WRONGHEADER = 15;
69 const int TH_WRONGFILELEN = 14;
70 const int TH_NULLBUFFERPOINTER = 13;
71 const int TH_BUFFEREMPTY = 12;
72 const int TH_WRONGBUFFERDIM = 11;
78 uint32_t mEquipmentId;
83 uint32_t mPadSamples[N_COLUMNS][N_DILOGICS][N_CHANNELS];
84 double mPadSum[N_COLUMNS][N_DILOGICS][N_CHANNELS];
85 double mPadSquares[N_COLUMNS][N_DILOGICS][N_CHANNELS];
87 int mErrors[MAXERRORS];
90 int mWillBeSegmentMarker;
96 int mWordsPerRowCounter;
97 int mWordsPerSegCounter;
98 int mWordsPerDilogicCounter;
101 int mErrorPadsPerEvent;
105 float mEventSizeAverage;
109 float mPadsPerEventAverage;
111 float mBusyTimeValue;
112 float mBusyTimeAverage;
113 int mBusyTimeSamples;
114 int mNumberOfEmptyEvents;
115 int mNumberOfWrongEvents;
125 return (mEquipmentId);
127 int getEquipmentId(
int cru,
int link);
133 void setPad(
int col,
int dil,
int cha,
int charge);
136 void hmpidCoordsModule2Equipment(
int Mod,
int Col,
int Row,
int* Equi,
int* Colu,
int* Dilo,
int* Chan);
137 void hmpidCoordsEquipment2Module(
int Equi,
int Colu,
int Dilo,
int Chan,
int* Mod,
int* Col,
int* Row);
void init()
Inits the members for the decoding.
Definition: HmpidEquipment.cxx:47
Definition: HmpidDecoder.h:44
void setError(int ErrType)
Definition: HmpidEquipment.cxx:107
void setPad(int col, int dil, int cha, int charge)
Definition: HmpidEquipment.cxx:120
void resetPadMap()
Resets the matrix that contains the results of the decoding.
Definition: HmpidEquipment.cxx:84
~HmpidEquipment()
Destructor : do nothing.
Definition: HmpidEquipment.cxx:41
HmpidEquipment(int Equipment, int Cru, int Link)
Definition: HmpidEquipment.cxx:32
Definition: HmpidEquipment.h:74
void resetErrors()
Resets the decoding errors statistics.
Definition: HmpidEquipment.cxx:97