]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSCompressRawDataSDD.h
Finer binning
[u/mrichter/AliRoot.git] / ITS / AliITSCompressRawDataSDD.h
1 #ifndef ALIITSCOMPRESSRAWDATASDD_H
2 #define ALIITSCOMPRESSRAWDATASDD_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 #include<TObject.h>
10 #include<TString.h>
11 #include"AliRawReader.h"
12
13 ///////////////////////////////////////////////////////////////////
14 //                                                               //
15 // Class to decode the SDD Raw Data from the CarlosRX format to  //
16 // a compressed format consisting in a word of 32 bit per cell   //
17 // Origin: F.Prino, Torino, prino@to.infn.it                     //
18 //                                                               //
19 ///////////////////////////////////////////////////////////////////
20
21 class AliITSCompressRawDataSDD : public TObject {
22
23  public:
24   AliITSCompressRawDataSDD();
25   ~AliITSCompressRawDataSDD();
26   void SetRawReader(AliRawReader* rd){
27     fRawReader=rd;
28   }
29   void SetPointerToData(UChar_t* pt){
30     fPointerToData=pt;
31   }
32   void SetSize(UInt_t siz){
33     fSizeInMemory=siz;
34   }
35
36   UInt_t CompressEvent(UChar_t* inputPtr);
37
38   static UInt_t MakeDataWord(Int_t carlos, Int_t side, Int_t anode, Int_t tb, Int_t adc){
39     UInt_t word= (carlos<<27) + (side<<26) + (anode<<18) + (tb<<10) + adc;
40     return word;
41   }
42
43   static UInt_t MakeEndOfModuleWord(Int_t carlos){
44     UInt_t word= (15<<28) + carlos;
45     return word;
46   }
47
48   static UInt_t MakeJitterWord(Int_t jitter){
49     UInt_t word= (8<<28) + jitter;
50     return word;
51   }
52
53  protected:
54
55  private:
56   AliITSCompressRawDataSDD(const AliITSCompressRawDataSDD& /*c*/);
57
58   AliITSCompressRawDataSDD& operator=(const AliITSCompressRawDataSDD& /*c*/);
59  
60
61   AliRawReader* fRawReader; // pointer to raw reader
62   UChar_t* fPointerToData;   // pointer to the start of data in memory
63   UInt_t  fSizeInMemory;    // free space in memory in Bytes
64
65   ClassDef(AliITSCompressRawDataSDD, 0)
66 };
67
68 #endif