]>
Commit | Line | Data |
---|---|---|
6f1e466d | 1 | #ifndef TRDdigitsManager_H |
2 | #define TRDdigitsManager_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: AliTRDdigitsManager.h,v */ | |
8 | ||
9 | ///////////////////////////////////////////////////////////// | |
10 | // Manages the TRD digits // | |
11 | ///////////////////////////////////////////////////////////// | |
12 | ||
13 | #include "TObject.h" | |
14 | ||
15 | #include "AliTRDsegmentArray.h" | |
16 | #include "AliTRDdataArrayI.h" | |
17 | #include "AliTRDdigit.h" | |
18 | ||
19 | const Int_t kNDict = 3; | |
20 | ||
21 | class AliTRDdigitsManager : public TObject { | |
22 | ||
23 | public: | |
24 | ||
25 | AliTRDdigitsManager(); | |
26 | ~AliTRDdigitsManager(); | |
27 | ||
28 | virtual Bool_t MakeBranch(); | |
29 | virtual Bool_t ReadDigits(); | |
30 | virtual Bool_t WriteDigits(); | |
31 | ||
32 | virtual void SetRaw(); | |
33 | ||
34 | virtual Bool_t IsRaw() { return fIsRaw; }; | |
35 | virtual AliTRDsegmentArray *GetDigits() { return fDigits; }; | |
36 | virtual AliTRDsegmentArray *GetDictionary(Int_t i) { return fDictionary[i]; }; | |
37 | ||
9d0b222b | 38 | AliTRDdigit *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det); |
39 | Int_t GetTrack(Int_t track, Int_t row, Int_t col, Int_t time, Int_t det); | |
40 | ||
6f1e466d | 41 | inline AliTRDdataArrayI *GetDigits(Int_t det); |
42 | inline AliTRDdataArrayI *GetDictionary(Int_t det, Int_t i); | |
6f1e466d | 43 | inline Int_t GetTrack(Int_t track, AliTRDdigit *Digit); |
44 | ||
45 | protected: | |
46 | ||
47 | AliTRDsegmentArray *fDigits; //! Digits data Array | |
48 | AliTRDsegmentArray *fDictionary[kNDict]; //! Track dictionary data array | |
49 | ||
50 | Bool_t fIsRaw; // Flag indicating raw digits | |
51 | ||
52 | ClassDef(AliTRDdigitsManager,1) // Manages the TRD digits | |
53 | ||
54 | }; | |
55 | ||
56 | //_____________________________________________________________________________ | |
57 | inline AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det) | |
58 | { | |
59 | // | |
60 | // Returns the digits array for one detector | |
61 | // | |
62 | ||
63 | return (AliTRDdataArrayI *) fDigits->At(det); | |
64 | ||
65 | } | |
66 | ||
6f1e466d | 67 | //_____________________________________________________________________________ |
68 | inline AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i) | |
69 | { | |
70 | // | |
71 | // Returns the dictionary for one detector | |
72 | // | |
73 | ||
74 | return (AliTRDdataArrayI *) fDictionary[i]->At(det); | |
75 | ||
76 | } | |
77 | ||
6f1e466d | 78 | //_____________________________________________________________________________ |
79 | inline Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit) | |
80 | { | |
81 | // | |
82 | // Returns the MC-track numbers from the dictionary for a given digit | |
83 | // | |
84 | ||
85 | Int_t row = Digit->GetRow(); | |
86 | Int_t col = Digit->GetCol(); | |
87 | Int_t time = Digit->GetTime(); | |
88 | Int_t det = Digit->GetDetector(); | |
89 | ||
90 | return GetTrack(track,row,col,time,det); | |
91 | ||
92 | } | |
93 | ||
94 | #endif |