]>
Commit | Line | Data |
---|---|---|
f74edaba | 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 | class AliPHOSBeamTestEvent ; | |
24 | class AliPHOSConTableDB ; | |
25 | ||
26 | class AliPHOSRaw2Digits : public TTask { | |
27 | ||
28 | public: | |
29 | AliPHOSRaw2Digits() ; // ctor | |
88cb7938 | 30 | AliPHOSRaw2Digits(const char * inputFileName) ; |
540e818b | 31 | AliPHOSRaw2Digits(AliPHOSRaw2Digits & r2d) ; // cpy ctor |
f74edaba | 32 | virtual ~AliPHOSRaw2Digits() ; // dtor |
33 | ||
90cceaf6 | 34 | void Exec() ; |
f74edaba | 35 | |
ddaf8726 | 36 | void SetBeamEnergy(Float_t energy){fBeamEnergy = energy ;} |
f74edaba | 37 | void SetInputFile(TString inname="Run_1234.fz"){fInName=inname ; } |
38 | void SetDebugLevel(Int_t idebug=1){fDebug=idebug ;} | |
39 | ||
40 | //Set position of the target in the given run. | |
41 | //The reference system is following | |
42 | //Z axis along beam direction, from target to prototype (0-surface of prototype) | |
43 | //X axis along columns of prototype (0-center of prototype) | |
44 | //Y axis along raws of prototype (0-center of prototype) | |
45 | void SetTargetPosition(Double_t * pos) | |
46 | {for(Int_t i=0;i<3;i++)fTarget[i]=pos[i] ;} | |
47 | void SetConTableDB(AliPHOSConTableDB * ctdb){fctdb = ctdb ;} | |
ddaf8726 | 48 | void SetMaxEventsPerFile(Int_t nev=20000){fMaxPerFile = nev ;} |
90cceaf6 | 49 | void Print()const ; |
8c140292 | 50 | AliPHOSRaw2Digits & operator = ( AliPHOSRaw2Digits & /*r2d*/ ) { return *this ; } |
540e818b | 51 | |
ddaf8726 | 52 | private: |
e957fea8 | 53 | Bool_t StartRootFiles(void) const ; |
ddaf8726 | 54 | Bool_t CloseRootFiles(void) ; |
f74edaba | 55 | Bool_t ProcessRawFile() ; |
cd228525 | 56 | void Swab4(void *from, void *to, size_t nwords) const ; |
57 | void Swab2(void *from, void *to, size_t nwords) const ; | |
f74edaba | 58 | Bool_t Init() ; |
59 | void WriteDigits(void) ; | |
60 | ||
61 | TClonesArray * fDigits ; //!list of final digits | |
cd228525 | 62 | AliPHOSBeamTestEvent * fPHOSHeader ; //!PHOSBeamTest header |
f74edaba | 63 | AliPHOSConTableDB * fctdb ; //! |
64 | Double_t fTarget[3] ; //!Position of the target | |
ddaf8726 | 65 | TFile * fHeaderFile ; //!galice.root file |
66 | TFile * fDigitsFile ; //!file with digits | |
67 | Float_t fBeamEnergy ; //BeamEnergy | |
68 | Int_t fMaxPerFile ; //!Maximal number of events per root file | |
cd228525 | 69 | Int_t fEvent ; //Event number |
f74edaba | 70 | Int_t fStatus ; //status of input file: OK, not found etc. |
71 | TString fInName ; // FileName of the input file | |
72 | Bool_t fDebug ; //! | |
73 | Bool_t fIsInitialized ; //! | |
88cb7938 | 74 | |
f74edaba | 75 | UInt_t fMK1 ; //!ZEBRA markers |
cd228525 | 76 | UInt_t fMK2 ; //!ZEBRA markers |
77 | UInt_t fMK3 ; //!ZEBRA markers | |
78 | UInt_t fMK4 ; //!ZEBRA markers | |
79 | UInt_t fCKW ; //!ZEBRA markers | |
f74edaba | 80 | |
81 | ClassDef(AliPHOSRaw2Digits,1) // description | |
82 | ||
83 | }; | |
84 | ||
85 | #endif // AliPHOSRAW2DIGITS_H |