]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRaw2Digits.h~
New classes for beam test analysis
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRaw2Digits.h~
1 #ifndef ALIPHOSRAW2DIGITS_H
2 #define ALIPHOSRAW2DIGITS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $id */
7
8 //_________________________________________________________________________
9 //  Base Class for PHOS     
10 //                  
11 /*-- Author: Maxim Volkov (RRC KI)
12               Dmitri Peressounko (RRC KI & SUBATECH)
13               Yuri Kharlov (IHEP & SUBATECH)     */
14
15 // --- ROOT system ---
16 #include "TTask.h"
17 class TClonesArray ;
18
19 // --- Standard library ---
20
21 // --- AliRoot header files ---
22 class AliPHOSGeometry ;
23
24 class AliPHOSRaw2Digits : public TTask {
25
26 public:
27   AliPHOSRaw2Digits() ;          // ctor
28   virtual ~AliPHOSRaw2Digits() ; // dtor
29
30   void Exec(Option_t *option) ;
31   Bool_t OpenOutFile() ;
32
33   void SetInputFile(TString inname="Run2002.rz"){fInName=inname ; }
34   void SetDebugLevel(Int_t idebug=1){fDebug=idebug ;}
35   void SetNRaws(Int_t nraws){fProtoRaws = nraws ;}
36   void SetNcols(Int_t ncolumns){fProtoColumns = ncolumns ;}
37   void Print(Option_t *option) ;
38
39 private:
40   Bool_t ProcessRawFile() ;
41   void Swab4(void *from, void *to, size_t nwords)  ;
42   void Swab2(void *from, void *to, size_t nwords)  ;
43   Int_t RawId2AbsId(Int_t raw) ;
44   Bool_t Init() ;
45
46
47   TClonesArray * fBTHeaders ; //!list of beam test headers
48   AliPHOSGeometry * fGeom ;  //!
49   Int_t   fEvent ;   //!
50   Int_t   fStatus ;  //! status of input file: OK, not found etc.
51   TString fInName ;  //!FileName of the input file
52   Bool_t  fDebug ;   //!
53   Bool_t  fIsInitialized ;
54   Int_t   fProtoRaws ;
55   Int_t   fProtoColumns ;
56   Int_t   fRawOffset ;
57   Int_t   fColOffset ;
58   Int_t   fNcrInProto ; //!Number of cristalls in prototype
59   UInt_t *fAbsIdMap ;//[fNcrInProto] Map of correspondance between Raw and PHOS ID
60   UInt_t  fMK1 ;     //!ZEBRA markers
61   UInt_t  fMK2 ;     //!
62   UInt_t  fMK3 ;     //!
63   UInt_t  fMK4 ;     //!
64   UInt_t  fCKW ;     //!
65
66   ClassDef(AliPHOSRaw2Digits,1)  // description 
67
68 };
69
70 #endif // AliPHOSRAW2DIGITS_H