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