Making online tracklets usable in offline reconstruction
[u/mrichter/AliRoot.git] / TRD / AliTRDdataArrayF.h
CommitLineData
8230f242 1#ifndef ALITRDDATAARRAYF_H
2#define ALITRDDATAARRAYF_H
6f1e466d 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: AliTRDdataArrayF.h,v */
728f2744 8
9#include <TMath.h>
6f1e466d 10
728f2744 11#include "AliTRDdataArray.h"
6f1e466d 12
13/////////////////////////////////////////////////////////////
14// //
15// General container for float data from TRD detector //
16// segments. //
17// Adapted from AliDigits, origin M.Ivanov //
18// //
19/////////////////////////////////////////////////////////////
20
793ff80c 21class AliTRDarrayF;
22
6f1e466d 23class AliTRDdataArrayF : public AliTRDdataArray {
24
25 public:
26
27 AliTRDdataArrayF();
28 AliTRDdataArrayF(Int_t nrow, Int_t ncol,Int_t ntime);
dd9a6ee3 29 AliTRDdataArrayF(const AliTRDdataArrayF &a);
8230f242 30 virtual ~AliTRDdataArrayF();
dd9a6ee3 31 AliTRDdataArrayF &operator=(const AliTRDdataArrayF &a);
6f1e466d 32
33 virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
e0d47c25 34 virtual void Copy(TObject &a) const;
6f1e466d 35 virtual void Compress(Int_t bufferType, Float_t threshold);
36 virtual void Compress(Int_t bufferType);
37 virtual void Expand();
38 virtual Bool_t First();
39 virtual Bool_t Next();
40 virtual void Reset();
41
504a18fe 42 void SetData(Int_t row, Int_t col, Int_t time, Float_t value);
a2b90f83 43 void SetDataUnchecked(Int_t row, Int_t col, Int_t time, Float_t value)
44 { SetDataFast(GetIdx1Unchecked(row,col),time,value); };
45
6f1e466d 46 virtual void SetThreshold(Float_t threshold) { fThreshold = threshold; };
47
793ff80c 48 virtual Float_t GetData(Int_t row, Int_t col, Int_t time) const;
a2b90f83 49 Float_t GetDataUnchecked(Int_t row, Int_t col, Int_t time) const
50 { return GetDataFast(GetIdx1Unchecked(row,col),time); };
51
793ff80c 52 virtual Float_t GetThreshold() const { return fThreshold; };
6f1e466d 53
0a29d0f1 54 virtual Int_t GetSize() const;
55 virtual Int_t GetDataSize() const;
6f1e466d 56 virtual Int_t GetOverThreshold(Float_t threshold);
57
58 protected:
59
2745a409 60 void SetDataFast(Int_t idx1, Int_t idx2, Float_t v);
61 Float_t GetDataFast(Int_t idx1, Int_t idx2) const;
6f1e466d 62
793ff80c 63 Float_t GetData1(Int_t idx1, Int_t idx2) const;
6f1e466d 64 void Expand1();
65 void Compress1();
66 void Expand2();
67 void Compress2();
68 Bool_t First0();
69 Bool_t Next0();
70 Bool_t First1();
71 Bool_t Next1();
72
73 AliTRDarrayF *fElements; // Buffer of 4 bytes floats for the array content
74 Float_t fThreshold; // Threshold for zero suppression
75
76 ClassDef(AliTRDdataArrayF,1) // Container for float data of one TRD detector segment
77
78};
79
6f1e466d 80#endif
81