]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFD.h
Major upgrades to the strip structure
[u/mrichter/AliRoot.git] / TOF / AliTOFD.h
1 #ifndef ALITOFD_H
2 #define ALITOFD_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 //  Digitization classes for set: TOF     //
11 ////////////////////////////////////////////////
12  
13
14 #include "TObject.h"
15 #include "TClonesArray.h"
16 #include "AliTOF.h"
17 //_______________________________________________________
18
19 class AliTOFRoc : public TObject {
20
21  public:
22   AliTOFRoc();
23   virtual ~AliTOFRoc();
24   Int_t   AddItem  (Int_t Fec, Int_t Tdc, Int_t Error, Float_t Charge, Float_t Time);
25 //  Int_t   AddItem  (Int_t, UInt_t);
26 // setters for AliTOFRoc object
27   void    SetHeader();
28   void    SetTime  (UInt_t Item, UInt_t Error, Float_t RealTime);
29   void    SetTime  (UInt_t Item, UInt_t tir);
30   void    SetCharge(UInt_t Item, UInt_t Fec,UInt_t Tdc,Float_t RealCharge);  
31   void    SetCharge(UInt_t Item, UInt_t chr);  
32 // getters for AliTOFRoc object
33   Float_t GetTime  (Int_t Item,UInt_t& Error);
34   Float_t GetCharge(Int_t Item);
35   Int_t   GetTotPad(Int_t Item);
36   UInt_t  GetCheckSum();
37   UInt_t  BitCount (UInt_t x);
38   UInt_t  SetSize  ();
39   
40   Int_t  GetSize()           const {return fItems*8+4;}
41   Int_t  GetItems()          const {return fItems;}
42   UInt_t GetChrgRow(Int_t i) const {return fChrgRow[i];}
43   UInt_t GetTimeRow(Int_t i) const {return fTimeRow[i];} 
44   void   SetHeader(UInt_t head){fHeader=head;}
45
46  protected:
47   Int_t   fItems; // number of items
48   Int_t   fSize;  // size
49   Int_t   fNRoc;  // Roc number
50   UInt_t  fHeader; // Roc header number
51
52 /*  class ChargeRow
53   {
54   public:
55     UInt_t RocID:4;
56     UInt_t FecID:6;
57     UInt_t TdcID:6;
58     Int_t  ChADC:16;
59   }Charge[1024];
60
61   class TimeRow
62   {
63   public:
64     UInt_t Error:12;
65     Int_t  TDC  :24;
66   }Time[1024];
67 */
68   UInt_t fChrgRow[1024]; // adc values
69   UInt_t fTimeRow[1024]; // tdc values
70
71
72
73   ClassDef(AliTOFRoc,2)
74 };
75
76 //_______________________________________________________
77 class AliTOFRawDigit : public TObject{
78   
79 public:
80   AliTOFRawDigit();
81   virtual ~AliTOFRawDigit(){};
82
83 protected:
84   Int_t fTreeD;     // class under construction
85   Int_t fRawDigits; // class under construction
86
87   
88   ClassDef(AliTOFRawDigit,2)
89 };
90
91
92 //_______________________________________________________
93 class AliTOFRawSector : public TObject{
94
95  public:
96   AliTOFRawSector();
97   virtual ~AliTOFRawSector();
98   void   WriteSector();
99   void   ReadSector();
100   
101   TClonesArray* GetRocData() const {return fRocData;}
102   void SetGlobalCS(UInt_t gcs){fGlobalCheckSum=gcs;}
103   void SetHeader  (UInt_t hdr){fHeader = hdr;}
104
105  protected:
106   TClonesArray* fRocData; // pointer to the TClonesArray of Roc Data
107   UInt_t        fHeader;    // RawSector header number
108   UInt_t        fGlobalCheckSum; // check flag
109
110   
111   ClassDef(AliTOFRawSector,2)
112 };
113
114 #endif /* ALITOFD_H */