]>
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 | ||
7 | /* $Id: AliTRDdigitsManager.h,v */ | |
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; |
19 | class AliTRDdataArrayI; | |
20 | class AliTRDdigit; | |
6f1e466d | 21 | |
22 | class AliTRDdigitsManager : public TObject { | |
23 | ||
24 | public: | |
25 | ||
dd56b762 | 26 | enum { kNDict = 3 }; |
27 | ||
6f1e466d | 28 | AliTRDdigitsManager(); |
dd9a6ee3 | 29 | AliTRDdigitsManager(const AliTRDdigitsManager &m); |
8230f242 | 30 | virtual ~AliTRDdigitsManager(); |
dd9a6ee3 | 31 | AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m); |
6f1e466d | 32 | |
abaf1f1d | 33 | virtual void CreateArrays(); |
17eee78a | 34 | virtual void ResetArrays(); |
dd9a6ee3 | 35 | virtual void Copy(TObject &m); |
855bfffd | 36 | virtual Bool_t Open(const Char_t *file); |
abaf1f1d | 37 | virtual Bool_t MakeBranch(const Char_t *file = 0); |
855bfffd | 38 | virtual Bool_t MakeBranch(TTree *tree, const Char_t *file = 0); |
8e64dd77 | 39 | void MakeTreeAndBranches(TFile *treeFile, Int_t iEvent); |
855bfffd | 40 | virtual Bool_t ReadDigits(TTree *tree = 0); |
6f1e466d | 41 | virtual Bool_t WriteDigits(); |
42 | ||
43 | virtual void SetRaw(); | |
abaf1f1d | 44 | virtual void SetEvent(Int_t evt) { fEvent = evt; }; |
855bfffd | 45 | virtual void SetDebug(Int_t v = 1) { fDebug = v; }; |
abaf1f1d | 46 | virtual void SetSDigits(Int_t v = 1) { fSDigits = v; }; |
6f1e466d | 47 | |
793ff80c | 48 | virtual Bool_t IsRaw() const { return fIsRaw; }; |
49 | static Int_t NDict() { return fgkNDict; }; | |
50 | ||
51 | virtual AliTRDsegmentArray *GetDigits() const { return fDigits; }; | |
52 | virtual AliTRDsegmentArray *GetDictionary(Int_t i) const { return fDictionary[i]; }; | |
6f1e466d | 53 | |
793ff80c | 54 | AliTRDdigit *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det) const; |
55 | Int_t GetTrack(Int_t track, Int_t row, Int_t col | |
56 | , Int_t time, Int_t det) const; | |
9d0b222b | 57 | |
793ff80c | 58 | AliTRDdataArrayI *GetDigits(Int_t det) const; |
59 | AliTRDdataArrayI *GetDictionary(Int_t det, Int_t i) const; | |
60 | Int_t GetTrack(Int_t track, AliTRDdigit *Digit) const; | |
16bf9884 | 61 | Short_t GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const; |
6f1e466d | 62 | |
63 | protected: | |
64 | ||
793ff80c | 65 | static const Int_t fgkNDict; // Number of track dictionary arrays |
66 | ||
abaf1f1d | 67 | Int_t fEvent; // Event number |
68 | ||
69 | TFile *fFile; //! File containing the TRD digits tree | |
70 | TTree *fTree; //! Tree for the digits arrays | |
71 | ||
72 | AliTRDsegmentArray *fDigits; //! Digits data array | |
6f1e466d | 73 | AliTRDsegmentArray *fDictionary[kNDict]; //! Track dictionary data array |
74 | ||
75 | Bool_t fIsRaw; // Flag indicating raw digits | |
abaf1f1d | 76 | Bool_t fSDigits; // Switch for the summable digits |
855bfffd | 77 | Int_t fDebug; // Debug flag |
6f1e466d | 78 | |
855bfffd | 79 | ClassDef(AliTRDdigitsManager,4) // Manages the TRD digits |
6f1e466d | 80 | |
81 | }; | |
82 | ||
6f1e466d | 83 | #endif |