acf814d1 |
1 | #ifndef ALIL3ALTROMEMHANDLER_H |
2 | #define ALIL3ALTROMEMHANDLER_H |
3 | |
4 | #include "AliL3RootTypes.h" |
5 | #include "AliL3Logging.h" |
6 | |
7 | //Maximum Size of Altro Packet equals 1000 Bit |
8 | #define ALTRO_SIZE 125 |
9c50e540 |
9 | //Maximum 10Bit data to be stored in one Packet |
acf814d1 |
10 | #define MAX_VALS 94 |
11 | |
12 | class AliL3AltroMemHandler { |
13 | |
14 | public: |
15 | AliL3AltroMemHandler(); |
16 | Bool_t Write(UShort_t row, UChar_t pad, UShort_t charge, UShort_t time); |
17 | Bool_t WriteFinal(); |
18 | Bool_t SetBinaryOutput(FILE *file); |
19 | //Bool_t SetBinaryInput(FILE *file); |
20 | void SetBinary(Bool_t flag_=kTRUE){flag=flag_;}; |
21 | |
22 | private: |
23 | UShort_t altromem[ALTRO_SIZE]; |
24 | //FILE *fInBinary; |
25 | FILE *fOutBinary; |
26 | UShort_t lrow; |
27 | UChar_t lpad; |
28 | UShort_t ltime; |
29 | UShort_t counter; |
30 | UShort_t tcounter; |
31 | Bool_t flag; |
32 | void WriteTrailer(); |
33 | void Clear(); |
9c50e540 |
34 | ClassDef(AliL3AltroMemHandler,1) |
acf814d1 |
35 | }; |
36 | |
37 | #endif |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |