Classes moved to STEERBase.
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitsManager.h
CommitLineData
8230f242 1#ifndef ALITRDDIGITSMANAGER_H
2#define ALITRDDIGITSMANAGER_H
6f1e466d 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
ca21baaa 7/* $Id$ */
6f1e466d 8
9/////////////////////////////////////////////////////////////
10// Manages the TRD digits //
11/////////////////////////////////////////////////////////////
12
793ff80c 13#include <TObject.h>
6f1e466d 14
2ab0c725 15class TFile;
abaf1f1d 16class TTree;
2ab0c725 17
793ff80c 18class AliTRDsegmentArray;
19class AliTRDdataArrayI;
20class AliTRDdigit;
ca21baaa 21class AliTRDSignalIndex;
6f1e466d 22
23class AliTRDdigitsManager : public TObject {
24
25 public:
26
dd56b762 27 enum { kNDict = 3 };
28
6f1e466d 29 AliTRDdigitsManager();
dd9a6ee3 30 AliTRDdigitsManager(const AliTRDdigitsManager &m);
8230f242 31 virtual ~AliTRDdigitsManager();
dd9a6ee3 32 AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m);
6f1e466d 33
abaf1f1d 34 virtual void CreateArrays();
17eee78a 35 virtual void ResetArrays();
e0d47c25 36 virtual void Copy(TObject &m) const;
88cb7938 37
38 virtual Bool_t MakeBranch(TTree *tree);
39
40 virtual Bool_t ReadDigits(TTree *tree);
6f1e466d 41 virtual Bool_t WriteDigits();
42
43 virtual void SetRaw();
abaf1f1d 44 virtual void SetEvent(Int_t evt) { fEvent = evt; };
abaf1f1d 45 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; };
6f1e466d 46
793ff80c 47 virtual Bool_t IsRaw() const { return fIsRaw; };
48 static Int_t NDict() { return fgkNDict; };
49
50 virtual AliTRDsegmentArray *GetDigits() const { return fDigits; };
51 virtual AliTRDsegmentArray *GetDictionary(Int_t i) const { return fDictionary[i]; };
6f1e466d 52
793ff80c 53 AliTRDdigit *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det) const;
54 Int_t GetTrack(Int_t track, Int_t row, Int_t col
55 , Int_t time, Int_t det) const;
9d0b222b 56
793ff80c 57 AliTRDdataArrayI *GetDigits(Int_t det) const;
58 AliTRDdataArrayI *GetDictionary(Int_t det, Int_t i) const;
ca21baaa 59
60 void RemoveDigits(Int_t det);
61 void RemoveDictionaries(Int_t det);
62 void ClearIndexes(Int_t det);
63
793ff80c 64 Int_t GetTrack(Int_t track, AliTRDdigit *Digit) const;
16bf9884 65 Short_t GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const;
6f1e466d 66
ca21baaa 67 AliTRDSignalIndex *GetIndexes(Int_t det);
68 TObjArray *GetIndexes() {return fSignalIndexes;};
69 virtual Bool_t BuildIndexes(Int_t det);
001be664 70 virtual void SetUseDictionaries(Bool_t kval) {fUseDictionaries = kval;}
71 virtual Bool_t UsesDictionaries() const {return fUseDictionaries;}
ca21baaa 72
6f1e466d 73 protected:
74
793ff80c 75 static const Int_t fgkNDict; // Number of track dictionary arrays
76
abaf1f1d 77 Int_t fEvent; // Event number
78
abaf1f1d 79 TTree *fTree; //! Tree for the digits arrays
80
81 AliTRDsegmentArray *fDigits; //! Digits data array
6f1e466d 82 AliTRDsegmentArray *fDictionary[kNDict]; //! Track dictionary data array
83
84 Bool_t fIsRaw; // Flag indicating raw digits
abaf1f1d 85 Bool_t fSDigits; // Switch for the summable digits
6f1e466d 86
ca21baaa 87 TObjArray *fSignalIndexes; // Provides access to the active pads and tbins
001be664 88 Bool_t fUseDictionaries; // Use dictionaries or not (case of real data)
ca21baaa 89 ClassDef(AliTRDdigitsManager,6) // Manages the TRD digits
6f1e466d 90
91};
92
6f1e466d 93#endif