Cleanup of data arrays
[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);
43da34c0 34 virtual void Copy(TObject &a);
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);
6f1e466d 43 virtual void SetThreshold(Float_t threshold) { fThreshold = threshold; };
44
793ff80c 45 virtual Float_t GetData(Int_t row, Int_t col, Int_t time) const;
46 virtual Float_t GetThreshold() const { return fThreshold; };
6f1e466d 47
48 virtual Int_t GetSize();
49 virtual Int_t GetDataSize();
50 virtual Int_t GetOverThreshold(Float_t threshold);
51
52 protected:
53
54 inline void SetDataFast(Int_t idx1, Int_t idx2, Float_t value);
793ff80c 55 inline Float_t GetDataFast(Int_t idx1, Int_t idx2) const;
6f1e466d 56
793ff80c 57 Float_t GetData1(Int_t idx1, Int_t idx2) const;
6f1e466d 58 void Expand1();
59 void Compress1();
60 void Expand2();
61 void Compress2();
62 Bool_t First0();
63 Bool_t Next0();
64 Bool_t First1();
65 Bool_t Next1();
66
67 AliTRDarrayF *fElements; // Buffer of 4 bytes floats for the array content
68 Float_t fThreshold; // Threshold for zero suppression
69
70 ClassDef(AliTRDdataArrayF,1) // Container for float data of one TRD detector segment
71
72};
73
6f1e466d 74#endif
75