]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/misc/AliL3AltroMemHandler.h
Added AliL3Stopwatch.
[u/mrichter/AliRoot.git] / HLT / misc / AliL3AltroMemHandler.h
index 57bde826192785ef57178d4f9849040a0f50026c..bf8c7c3afc006c8a39d92a042e0aa6abe67c7145 100644 (file)
@@ -2,7 +2,6 @@
 #define ALIL3ALTROMEMHANDLER_H
 
 #include "AliL3RootTypes.h"
-#include "AliL3Logging.h"
 
 //Maximum size of Altro packet equals 1000 bit
 #define ALTRO_PACKET_SIZE 125
@@ -18,12 +17,15 @@ class AliL3AltroMemHandler {
   public: 
 
    AliL3AltroMemHandler();
-   void Write(UShort_t row, UChar_t pad, UShort_t charge, UShort_t time);
+   void Write(UShort_t row, UChar_t pad, UShort_t time, UShort_t charge);
+   Bool_t Read(UShort_t &row, UChar_t &pad, UShort_t &time, UShort_t &charge);
+   Bool_t ReadSequence(UShort_t &row, UChar_t &pad, UShort_t &time, UChar_t &n, UShort_t **charges);
    void WriteFinal();
 
    Bool_t SetASCIIOutput(FILE *file);
    Bool_t SetBinaryOutput(FILE *file);
-   //Bool_t SetBinaryInput(FILE *file);
+   Bool_t SetASCIIInput(FILE *file);
+   Bool_t SetBinaryInput(FILE *file);
 
   private:
 
@@ -31,17 +33,22 @@ class AliL3AltroMemHandler {
    UShort_t times_per_pad[1024];
    UShort_t charges_per_pad[1024];
 
-   //FILE *fInBinary;
-   FILE *fOutBinary;
+   FILE *fInBinary;  //!
+   FILE *fOutBinary; //!
    UShort_t lrow;
    UChar_t lpad;
-
-   UShort_t counter;  //totalcounter
-   UShort_t tcounter; //timecounter
-   UShort_t pcounter; //packetcounter
-   Bool_t flag;
+   UShort_t rrow;  //read row
+   UChar_t rpad;   //read pad
+   UShort_t rtime; //read time
+   UShort_t counter;  //total counter
+   UShort_t tcounter; //time counter
+   UShort_t pcounter; //packet counter
+   UShort_t rcounter; //read counter
+   UShort_t scounter; //sequence counter
+   Bool_t flag; //Binary File?
 
    void Clear();
+   void ClearRead();
    void Add(UShort_t charge, UShort_t time);
    void MakeAltroPackets();
    void AddTrailer();