]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALITRDDIGITSMANAGER_H | |
2 | #define ALITRDDIGITSMANAGER_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$ */ | |
8 | ||
9 | ///////////////////////////////////////////////////////////// | |
10 | // Manages the TRD digits // | |
11 | ///////////////////////////////////////////////////////////// | |
12 | ||
13 | #include <TObject.h> | |
14 | ||
15 | class TFile; | |
16 | class TTree; | |
17 | ||
18 | class AliTRDsegmentArray; | |
19 | class AliTRDdataArray; | |
20 | class AliTRDdataArrayDigits; | |
21 | class AliTRDdigit; | |
22 | class AliTRDSignalIndex; | |
23 | ||
24 | class AliTRDdigitsManager : public TObject { | |
25 | ||
26 | public: | |
27 | ||
28 | enum { kNDict = 3 }; | |
29 | ||
30 | AliTRDdigitsManager(); | |
31 | AliTRDdigitsManager(const AliTRDdigitsManager &m); | |
32 | virtual ~AliTRDdigitsManager(); | |
33 | AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m); | |
34 | ||
35 | virtual void Copy(TObject &m) const; | |
36 | ||
37 | virtual void CreateArrays(); | |
38 | virtual void ResetArrays(); | |
39 | virtual Bool_t BuildIndexes(Int_t det); | |
40 | ||
41 | virtual Bool_t MakeBranch(TTree *tree); | |
42 | virtual Bool_t ReadDigits(TTree *tree); | |
43 | virtual Bool_t WriteDigits(); | |
44 | ||
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; }; | |
48 | ||
49 | virtual Bool_t UsesDictionaries() const { return fUseDictionaries; }; | |
50 | virtual Bool_t HasSDigits() const { return fHasSDigits; }; | |
51 | static Int_t NDict() { return fgkNDict; }; | |
52 | ||
53 | virtual AliTRDsegmentArray *GetDigits() const { return fDigits; }; | |
54 | virtual AliTRDsegmentArray *GetDictionary(Int_t i) const { return fDictionary[i]; }; | |
55 | ||
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; | |
59 | ||
60 | AliTRDdataArrayDigits *GetDigits(Int_t det) const; | |
61 | AliTRDdataArray *GetDictionary(Int_t det, Int_t i) const; | |
62 | ||
63 | AliTRDSignalIndex *GetIndexes(Int_t det); | |
64 | TObjArray *GetIndexes() { return fSignalIndexes; }; | |
65 | ||
66 | void RemoveDigits(Int_t det); | |
67 | void RemoveDictionaries(Int_t det); | |
68 | void ClearIndexes(Int_t det); | |
69 | ||
70 | Int_t GetTrack(Int_t track, AliTRDdigit *digit) const; | |
71 | Short_t GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const; | |
72 | UChar_t GetPadStatus(Int_t row, Int_t col, Int_t time, Int_t det) const; | |
73 | ||
74 | protected: | |
75 | ||
76 | static const Int_t fgkNDict; // Number of track dictionary arrays | |
77 | ||
78 | Int_t fEvent; // Event number | |
79 | TTree *fTree; //! Tree for the digits arrays | |
80 | ||
81 | AliTRDsegmentArray *fDigits; //! Digits data array | |
82 | AliTRDsegmentArray *fDictionary[kNDict]; //! Track dictionary data array | |
83 | ||
84 | Bool_t fHasSDigits; // Switch for the summable digits | |
85 | ||
86 | TObjArray *fSignalIndexes; // Provides access to the active pads and tbins | |
87 | Bool_t fUseDictionaries; // Use dictionaries or not (case of real data) | |
88 | ||
89 | ClassDef(AliTRDdigitsManager,7) // Manages the TRD digits | |
90 | ||
91 | }; | |
92 | ||
93 | #endif |