1 #ifndef ALIL3ALTROMEMHANDLER_H
2 #define ALIL3ALTROMEMHANDLER_H
4 #include "AliL3RootTypes.h"
5 #include "AliL3Logging.h"
7 //Maximum size of Altro packet equals 1000 bit
8 #define ALTRO_PACKET_SIZE 125
10 //Maximum 10 bit data to be stored in one packet
13 //Maximum size of array to store whole pad
14 #define ALTRO_SIZE (100*ALTRO_PACKET_SIZE)
16 class AliL3AltroMemHandler {
20 AliL3AltroMemHandler();
21 void Write(UShort_t row, UChar_t pad, UShort_t charge, UShort_t time);
24 Bool_t SetASCIIOutput(FILE *file);
25 Bool_t SetBinaryOutput(FILE *file);
26 //Bool_t SetBinaryInput(FILE *file);
30 UShort_t altromem[ALTRO_SIZE];
31 UShort_t times_per_pad[1024];
32 UShort_t charges_per_pad[1024];
39 UShort_t counter; //totalcounter
40 UShort_t tcounter; //timecounter
41 UShort_t pcounter; //packetcounter
45 void Add(UShort_t charge, UShort_t time);
46 void MakeAltroPackets();
50 ClassDef(AliL3AltroMemHandler,1)