]>
Commit | Line | Data |
---|---|---|
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 | 15 | class TFile; |
abaf1f1d | 16 | class TTree; |
2ab0c725 | 17 | |
793ff80c | 18 | class AliTRDsegmentArray; |
625f5260 | 19 | class AliTRDdataArray; |
f5375dcb | 20 | class AliTRDdataArrayDigits; |
793ff80c | 21 | class AliTRDdigit; |
ca21baaa | 22 | class AliTRDSignalIndex; |
6f1e466d | 23 | |
24 | class AliTRDdigitsManager : public TObject { | |
25 | ||
26 | public: | |
27 | ||
dd56b762 | 28 | enum { kNDict = 3 }; |
29 | ||
6f1e466d | 30 | AliTRDdigitsManager(); |
dd9a6ee3 | 31 | AliTRDdigitsManager(const AliTRDdigitsManager &m); |
8230f242 | 32 | virtual ~AliTRDdigitsManager(); |
dd9a6ee3 | 33 | AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m); |
6f1e466d | 34 | |
625f5260 | 35 | virtual void Copy(TObject &m) const; |
36 | ||
abaf1f1d | 37 | virtual void CreateArrays(); |
17eee78a | 38 | virtual void ResetArrays(); |
625f5260 | 39 | virtual Bool_t BuildIndexes(Int_t det); |
88cb7938 | 40 | |
41 | virtual Bool_t MakeBranch(TTree *tree); | |
88cb7938 | 42 | virtual Bool_t ReadDigits(TTree *tree); |
6f1e466d | 43 | virtual Bool_t WriteDigits(); |
44 | ||
625f5260 | 45 | virtual void SetEvent(Int_t evt) { fEvent = evt; }; |
46 | virtual void SetSDigits(Int_t v = 1) { fHasSDigits = v; }; | |
47 | virtual void SetUseDictionaries(Bool_t kval) { fUseDictionaries = kval; }; | |
6f1e466d | 48 | |
625f5260 | 49 | virtual Bool_t UsesDictionaries() const { return fUseDictionaries; }; |
50 | virtual Bool_t HasSDigits() const { return fHasSDigits; }; | |
51 | static Int_t NDict() { return fgkNDict; }; | |
793ff80c | 52 | |
625f5260 | 53 | virtual AliTRDsegmentArray *GetDigits() const { return fDigits; }; |
54 | virtual AliTRDsegmentArray *GetDictionary(Int_t i) const { return fDictionary[i]; }; | |
6f1e466d | 55 | |
793ff80c | 56 | AliTRDdigit *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det) const; |
57 | Int_t GetTrack(Int_t track, Int_t row, Int_t col | |
58 | , Int_t time, Int_t det) const; | |
9d0b222b | 59 | |
f5375dcb | 60 | AliTRDdataArrayDigits *GetDigits(Int_t det) const; |
625f5260 | 61 | AliTRDdataArray *GetDictionary(Int_t det, Int_t i) const; |
62 | ||
63 | AliTRDSignalIndex *GetIndexes(Int_t det); | |
64 | TObjArray *GetIndexes() { return fSignalIndexes; }; | |
ca21baaa | 65 | |
66 | void RemoveDigits(Int_t det); | |
67 | void RemoveDictionaries(Int_t det); | |
68 | void ClearIndexes(Int_t det); | |
69 | ||
625f5260 | 70 | Int_t GetTrack(Int_t track, AliTRDdigit *digit) const; |
16bf9884 | 71 | Short_t GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const; |
d739fd4e | 72 | UChar_t GetPadStatus(Int_t row, Int_t col, Int_t time, Int_t det) const; |
6f1e466d | 73 | |
74 | protected: | |
75 | ||
793ff80c | 76 | static const Int_t fgkNDict; // Number of track dictionary arrays |
77 | ||
abaf1f1d | 78 | Int_t fEvent; // Event number |
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 | ||
625f5260 | 84 | Bool_t fHasSDigits; // Switch for the summable digits |
6f1e466d | 85 | |
ca21baaa | 86 | TObjArray *fSignalIndexes; // Provides access to the active pads and tbins |
001be664 | 87 | Bool_t fUseDictionaries; // Use dictionaries or not (case of real data) |
625f5260 | 88 | |
89 | ClassDef(AliTRDdigitsManager,7) // Manages the TRD digits | |
6f1e466d | 90 | |
91 | }; | |
92 | ||
6f1e466d | 93 | #endif |