]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRaw2Digits.h
Using EMCAL_COMPLETE by default (Jennifer)
[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 /* History of cvs commits:
9  *
10  * $Log$
11  */
12
13 //_________________________________________________________________________
14 //  Base Class for PHOS     
15 //                  
16 /*-- Author: Maxim Volkov (RRC KI)
17               Dmitri Peressounko (RRC KI & SUBATECH)
18               Yuri Kharlov (IHEP & SUBATECH)     */
19
20 // --- ROOT system ---
21 #include "TTask.h"
22 class TClonesArray ;
23
24 // --- Standard library ---
25
26 // --- AliRoot header files ---
27 class AliPHOSGeometry ;
28 class AliPHOSBeamTestEvent ;
29 class AliPHOSConTableDB ;
30
31 class AliPHOSRaw2Digits : public TTask {
32
33 public:
34   AliPHOSRaw2Digits() ;          // ctor
35   AliPHOSRaw2Digits(const char * inputFileName) ;         
36   AliPHOSRaw2Digits(AliPHOSRaw2Digits & r2d) ;          // cpy ctor
37   virtual ~AliPHOSRaw2Digits() ; // dtor
38
39   void Exec(const Option_t * = "") ;
40
41   void SetBeamEnergy(Float_t energy){fBeamEnergy = energy ;}
42   void SetInputFile(TString inname="Run_1234.fz"){fInName=inname ; }
43   void SetDebugLevel(Int_t idebug=1){fDebug=idebug ;}
44
45   //Set position of the target in the given run.
46   //The reference system is following
47   //Z axis along beam direction, from target to prototype (0-surface of prototype)
48   //X axis along columns of prototype (0-center of prototype)
49   //Y axis along raws of prototype    (0-center of prototype)
50   void SetTargetPosition(Double_t * pos)
51     {for(Int_t i=0;i<3;i++)fTarget[i]=pos[i] ;}
52   void SetConTableDB(AliPHOSConTableDB * ctdb){fctdb = ctdb ;}
53   void SetMaxEventsPerFile(Int_t nev=20000){fMaxPerFile = nev ;}
54   void Print(const Option_t * = "")const ;
55   AliPHOSRaw2Digits & operator = ( AliPHOSRaw2Digits & /*r2d*/ ) { return *this ; } 
56   
57 private:
58   Bool_t StartRootFiles(void) const ;
59   Bool_t CloseRootFiles(void) ;
60   Bool_t ProcessRawFile() ;
61   void Swab4(void *from, void *to, size_t nwords) const ;
62   void Swab2(void *from, void *to, size_t nwords) const ;
63   Bool_t Init() ;
64   void WriteDigits(void) ;
65
66   TClonesArray * fDigits ;             //!list of final digits
67   AliPHOSBeamTestEvent * fPHOSHeader ; //!PHOSBeamTest header 
68   AliPHOSConTableDB * fctdb ;          //!
69   Double_t fTarget[3] ;                //!Position of the target
70   TFile * fHeaderFile ;                //!galice.root file
71   TFile * fDigitsFile ;                //!file with digits
72   Float_t fBeamEnergy ;    //BeamEnergy 
73   Int_t   fMaxPerFile ;    //!Maximal number  of events per root file
74   Int_t   fEvent ;         //Event number
75   Int_t   fStatus ;        //status of input file: OK, not found etc.
76   TString fInName ;        // FileName of the input file
77   Bool_t  fDebug ;         //!
78   Bool_t  fIsInitialized ; //!
79  
80   UInt_t  fMK1 ;     //!ZEBRA markers
81   UInt_t  fMK2 ;     //!ZEBRA markers
82   UInt_t  fMK3 ;     //!ZEBRA markers
83   UInt_t  fMK4 ;     //!ZEBRA markers
84   UInt_t  fCKW ;     //!ZEBRA markers
85
86   ClassDef(AliPHOSRaw2Digits,1)  // description 
87
88 };
89
90 #endif // AliPHOSRAW2DIGITS_H