Fix for Mac and gcc 4
[u/mrichter/AliRoot.git] / HLT / src / AliL3TPCBeamTestMemHandler.h
CommitLineData
0167aa42 1// @(#) $Id$
2
3#ifndef ALIL3TPCBEAMTESTMEMHANDLER_H
4#define ALIL3TPCBEAMTESTMEMHANDLER_H
5
08a8b491 6//_____________________________________________________________
7// AliL3TPCBeamTestMemHandler
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
0167aa42 16#include "AliL3MemHandler.h"
17
18class AliL3TPCBeamTestMemHandler : public AliL3MemHandler{
19
20 public:
21 AliL3TPCBeamTestMemHandler(Char_t *fPathToMappingFile="./MappingHWAdress.data");
22 virtual ~AliL3TPCBeamTestMemHandler();
23
24 void SetInputPointer(Short_t *ptr, Int_t s) {fInputPtr=ptr;fInputSize=s;}
25 void SetNTimeBins(Int_t i) {
26 fNTimeBins=i;AliL3Transform::SetNTimeBins(i);
27 }
28 void SetMinTimeBin(Int_t i) {
29 fMinTimeBin=i;
30 }
31
08a8b491 32 Int_t MappingGetPadRow(Int_t channel) const {
0167aa42 33 Int_t retval;
08a8b491 34 if(channel < fNumOfChannels) retval = fMapping[channel][2]-fRowMin;
35 else retval = -1;
0167aa42 36 return retval;
37 }
38
08a8b491 39 Int_t MappingGetPad(Int_t channel) const {
0167aa42 40 Int_t retval;
08a8b491 41 if(channel < fNumOfChannels) retval = fMapping[channel][3];
42 else retval = -1;
0167aa42 43 return retval;
44 }
45
46 AliL3DigitRowData* RawData2Memory(UInt_t &nrow,Int_t event=-1);
47 Bool_t RawData2CompBinary(Int_t event=-1);
48
49 private:
50
08a8b491 51 struct AliRowStructure {
52 Int_t fRow; //row
53 Int_t fNDigits; //digits
54 Int_t *fPadPos; // pad position
55 };
0167aa42 56
08a8b491 57 Short_t **fMapping;//! // mapping of channels to pads
58 Short_t *fMappingEmptyRow;//! // helper field
59 Int_t fNumOfChannels; // number of channels
0167aa42 60
08a8b491 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)
0167aa42 66
67 ClassDef(AliL3TPCBeamTestMemHandler,1) //RawData Filehandler class
68};
69#endif
70