]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDdigitsManager.h
Bug fix by Theodor
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitsManager.h
CommitLineData
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 15class TFile;
abaf1f1d 16class TTree;
b65e5048 17class TBranch;
793ff80c 18class AliTRDdigit;
ca21baaa 19class AliTRDSignalIndex;
b65e5048 20class AliTRDarrayADC;
21class AliTRDarraySignal;
22class AliTRDarrayDictionary;
6f1e466d 23
24class AliTRDdigitsManager : public TObject {
25
26 public:
27
dd56b762 28 enum { kNDict = 3 };
29
3d0c7d6d 30 AliTRDdigitsManager(Bool_t rawRec = kFALSE); //if true digitsmanager uses only one entry in the TObjectArrays
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();
486c2339 39 virtual void ResetArrays(Int_t det);
625f5260 40 virtual Bool_t BuildIndexes(Int_t det);
88cb7938 41
42 virtual Bool_t MakeBranch(TTree *tree);
88cb7938 43 virtual Bool_t ReadDigits(TTree *tree);
6f1e466d 44 virtual Bool_t WriteDigits();
45
625f5260 46 virtual void SetEvent(Int_t evt) { fEvent = evt; };
47 virtual void SetSDigits(Int_t v = 1) { fHasSDigits = v; };
48 virtual void SetUseDictionaries(Bool_t kval) { fUseDictionaries = kval; };
6f1e466d 49
625f5260 50 virtual Bool_t UsesDictionaries() const { return fUseDictionaries; };
51 virtual Bool_t HasSDigits() const { return fHasSDigits; };
52 static Int_t NDict() { return fgkNDict; };
793ff80c 53
b65e5048 54 virtual TObjArray *GetDigits() const { return fDigits; };
55 virtual TObjArray *GetDictionary(Int_t i) const { return fDict[i]; };
56
57 AliTRDdigit *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det) const;
58 Int_t GetTrack(Int_t track, Int_t row, Int_t col, Int_t time, Int_t det) const;
59
60 AliTRDarrayADC *GetDigits(Int_t det) const;
61 AliTRDarraySignal *GetSDigits(Int_t det) const;
62 AliTRDarrayDictionary *GetDictionary(Int_t det, Int_t i) const;
63
64 AliTRDSignalIndex *GetIndexes(Int_t det);
65 TObjArray *GetIndexes() { return fSignalIndexes; };
66
67 void RemoveDigits(Int_t det);
68 void RemoveDictionaries(Int_t det);
486c2339 69 void RemoveIndexes(Int_t det);
b65e5048 70 void ClearIndexes(Int_t det);
71
72 Int_t GetTrack(Int_t track, AliTRDdigit *digit) const;
73 Short_t GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const;
74 UChar_t GetPadStatus(Int_t row, Int_t col, Int_t time, Int_t det) const;
75
76 Bool_t LoadArray(TObjArray *object, const Char_t *branchname, TTree *tree=0);
77 Bool_t LoadArrayDict(TObjArray *object, const Char_t *branchname, TTree *tree=0);
78 Bool_t StoreArray(TObjArray *array1, const Char_t *branchname, TTree *tree=0);
79 Bool_t StoreArrayDict(TObjArray *array3, const Char_t *branchname, TTree *tree=0);
80
6f1e466d 81 protected:
b65e5048 82
793ff80c 83 static const Int_t fgkNDict; // Number of track dictionary arrays
abaf1f1d 84 Int_t fEvent; // Event number
abaf1f1d 85 TTree *fTree; //! Tree for the digits arrays
b65e5048 86 TObjArray *fDigits; // Digits data array
87 TObjArray *fDict[kNDict]; // Track dictionary data array
625f5260 88 Bool_t fHasSDigits; // Switch for the summable digits
ca21baaa 89 TObjArray *fSignalIndexes; // Provides access to the active pads and tbins
001be664 90 Bool_t fUseDictionaries; // Use dictionaries or not (case of real data)
b65e5048 91 TTree *fTreeD; // Tree with detector objects
92 TBranch *fBranch; // Branchaddress
486c2339 93 Int_t fDets; // No of Detectors
3d0c7d6d 94 Bool_t fRawRec; // Reconstruct from raw files? If its kTRUE then the TObjArrays have only one entry.
625f5260 95
96 ClassDef(AliTRDdigitsManager,7) // Manages the TRD digits
6f1e466d 97
98};
6f1e466d 99#endif