]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliHLTTPCBeamTestMemHandler.h
o) Performance studies added (mainly in runMultiplicitySelector) that evaluate the...
[u/mrichter/AliRoot.git] / HLT / src / AliHLTTPCBeamTestMemHandler.h
1 // @(#) $Id$
2
3 #ifndef ALIL3TPCBEAMTESTMEMHANDLER_H
4 #define ALIL3TPCBEAMTESTMEMHANDLER_H
5
6 //_____________________________________________________________
7 // AliHLTTPCBeamTestMemHandler
8 //
9 // Class for converting the test beam data of May 2004 
10 // to the HLT file format using R. Bramms tables.
11 //
12 // Author: C. Loizides <loizides@ikf.uni-frankfurt.de>
13 // -- Copyright &copy ALICE HLT Group
14
15
16 #include "AliHLTMemHandler.h"
17
18 class AliHLTTPCBeamTestMemHandler : public AliHLTMemHandler{
19
20  public:
21   AliHLTTPCBeamTestMemHandler(Char_t *fPathToMappingFile="./MappingHWAdress.data");
22   virtual ~AliHLTTPCBeamTestMemHandler();
23
24   void SetInputPointer(Short_t *ptr, Int_t s) {fInputPtr=ptr;fInputSize=s;}
25   void SetNTimeBins(Int_t i) {
26    fNTimeBins=i;AliHLTTransform::SetNTimeBins(i);
27   }
28   void SetMinTimeBin(Int_t i) {
29     fMinTimeBin=i;
30   }
31
32   Int_t MappingGetPadRow(Int_t channel) const {
33     Int_t retval;
34     if(channel < fNumOfChannels) retval = fMapping[channel][2]-fRowMin;
35     else retval = -1;
36     return retval;
37   }
38
39   Int_t MappingGetPad(Int_t channel) const {
40     Int_t retval;
41     if(channel < fNumOfChannels) retval = fMapping[channel][3];
42     else retval = -1;
43     return retval;
44   }
45
46   AliHLTDigitRowData* RawData2Memory(UInt_t &nrow,Int_t event=-1);
47   Bool_t RawData2CompBinary(Int_t event=-1);
48
49  private:
50
51   struct AliRowStructure {
52     Int_t fRow;       //row
53     Int_t fNDigits;   //digits
54     Int_t *fPadPos;   // pad position
55   };
56   
57   Short_t **fMapping;//!          // mapping of channels to pads
58   Short_t *fMappingEmptyRow;//!   // helper field
59   Int_t fNumOfChannels;           // number of channels
60
61   Short_t *fInputPtr;//!         // input pointer from shared memory
62   Int_t fInputSize;//!           // size of input data
63   AliRowStructure *fRows;//!     // rows
64   Int_t fNTimeBins;              // number of timebins
65   Int_t fMinTimeBin;             // min timebin (not zero because of altro)
66
67   ClassDef(AliHLTTPCBeamTestMemHandler,1)   //RawData Filehandler class
68 };
69
70 typedef AliHLTTPCBeamTestMemHandler AliL3TPCBeamTestMemHandler; // for backward compatibility
71
72 #endif
73