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