]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDdataArrayS.h
running local for SP and LYZEP and new histograms for QC
[u/mrichter/AliRoot.git] / TRD / AliTRDdataArrayS.h
... / ...
CommitLineData
1#ifndef ALITRDDATAARRAYS_H
2#define ALITRDDATAARRAYS_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: AliTRDdataArrayS.h,v Exp $ */
8
9#include "AliTRDdataArray.h"
10
11/////////////////////////////////////////////////////////////
12// //
13// General container for integer data from TRD detector //
14// segments. //
15// Adapted from AliDigits, origin M.Ivanov //
16// //
17/////////////////////////////////////////////////////////////
18
19class AliTRDarrayS;
20
21class AliTRDdataArrayS : public AliTRDdataArray {
22
23 public:
24
25 AliTRDdataArrayS();
26 AliTRDdataArrayS(Int_t nrow, Int_t ncol, Int_t ntime);
27 AliTRDdataArrayS(const AliTRDdataArrayS &a);
28 virtual ~AliTRDdataArrayS();
29 AliTRDdataArrayS &operator=(const AliTRDdataArrayS &a);
30
31 virtual void Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
32 virtual void Copy(TObject &a) const;
33 virtual void Compress(Int_t bufferType, Short_t threshold);
34 virtual void Compress(Int_t bufferType);
35 virtual void Expand();
36 virtual Bool_t First();
37 virtual Bool_t Next();
38 virtual void Reset();
39
40 void SetData(Int_t row, Int_t col, Int_t time, Short_t value);
41 void SetDataUnchecked(Int_t row, Int_t col, Int_t time, Short_t value)
42 { SetDataFast(GetIdx1Unchecked(row,col),time,value); };
43
44 virtual void SetThreshold(Short_t threshold) { fThreshold = threshold; };
45
46 virtual Short_t GetData(Int_t row, Int_t col, Int_t time) const;
47 virtual Short_t GetDataUnchecked(Int_t row, Int_t col, Int_t time) const
48 { return GetDataFast(GetIdx1Unchecked(row,col),time); };
49
50 virtual Short_t GetThreshold() const { return fThreshold; };
51
52 virtual Int_t GetSize() const;
53 virtual Int_t GetDataSize() const;
54 virtual Int_t GetOverThreshold(Short_t threshold);
55
56 protected:
57
58 void SetDataFast(Int_t idx1, Int_t idx2, Short_t value);
59 Short_t GetDataFast(Int_t idx1, Int_t idx2) const;
60
61 Short_t GetData1(Int_t idx1, Int_t idx2) const;
62 void Expand1();
63 void Compress1();
64 void Expand2();
65 void Compress2();
66 Bool_t First0();
67 Bool_t Next0();
68 Bool_t First1();
69 Bool_t Next1();
70
71 AliTRDarrayS *fElements; // Buffer of 2 bytes integers for the array content
72 Short_t fThreshold; // Threshold for zero suppression
73
74 ClassDef(AliTRDdataArrayS,1) // Container for short data of one TRD detector segment
75
76};
77
78#endif