]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3TPCBeamTestMemHandler.h
Added new class used in testbeam for converting the raw data into hlt data format.
[u/mrichter/AliRoot.git] / HLT / src / AliL3TPCBeamTestMemHandler.h
1 // @(#) $Id$
2
3 #ifndef ALIL3TPCBEAMTESTMEMHANDLER_H
4 #define ALIL3TPCBEAMTESTMEMHANDLER_H
5
6 #include "AliL3MemHandler.h"
7
8 class AliL3TPCBeamTestMemHandler : public AliL3MemHandler{
9
10  public:
11   AliL3TPCBeamTestMemHandler(Char_t *fPathToMappingFile="./MappingHWAdress.data");
12   virtual ~AliL3TPCBeamTestMemHandler();
13
14   void SetInputPointer(Short_t *ptr, Int_t s) {fInputPtr=ptr;fInputSize=s;}
15   void SetNTimeBins(Int_t i) {
16    fNTimeBins=i;AliL3Transform::SetNTimeBins(i);
17   }
18   void SetMinTimeBin(Int_t i) {
19     fMinTimeBin=i;
20   }
21
22   Int_t MappingGetPadRow(Int_t channel) {
23     Int_t retval;
24     if(channel < fNumOfChannels)
25       retval = fMapping[channel][2]-fRowMin;
26     else
27       retval = -1;
28     return retval;
29   }
30
31   Int_t MappingGetPad(Int_t channel) {
32     Int_t retval;
33     if(channel < fNumOfChannels)
34       retval = fMapping[channel][3];
35     else
36       retval = -1;
37     return retval;
38   }
39
40   AliL3DigitRowData* RawData2Memory(UInt_t &nrow,Int_t event=-1);
41   Bool_t RawData2CompBinary(Int_t event=-1);
42
43  private:
44
45 struct RowStructure{
46   Int_t fRow;       //row
47   Int_t fNDigits;   //digits
48   Int_t *fPadPos;   // pad position
49 };
50   
51  Short_t **fMapping;//!          // mapping of channels to pads
52  Short_t *fMappingEmptyRow;//!   // helper field
53  Int_t fNumOfChannels;           // number of channels
54
55  Short_t *fInputPtr;//!         // input pointer from shared memory
56  Int_t fInputSize;//!           // size of input data
57  RowStructure *fRows;//!        // rows
58  Int_t fNTimeBins;              // number of timebins
59  Int_t fMinTimeBin;             // min timebin (not zero because of altro)
60
61   ClassDef(AliL3TPCBeamTestMemHandler,1)   //RawData Filehandler class
62 };
63 #endif
64