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 */
8 //_________________________________________________________________________
11 /*-- Author: Maxim Volkov (RRC KI)
12 Dmitri Peressounko (RRC KI & SUBATECH)
13 Yuri Kharlov (IHEP & SUBATECH) */
15 // --- ROOT system ---
19 // --- Standard library ---
21 // --- AliRoot header files ---
22 class AliPHOSGeometry ;
23 class AliPHOSBeamTestEvent ;
24 class AliPHOSConTableDB ;
26 class AliPHOSRaw2Digits : public TTask {
29 AliPHOSRaw2Digits() ; // ctor
30 AliPHOSRaw2Digits(const char * inputFileName,Bool_t toSplit = kTRUE) ;
31 virtual ~AliPHOSRaw2Digits() ; // dtor
33 void Exec(Option_t *option) ;
35 void SetBeamEnergy(Float_t energy){fBeamEnergy = energy ;}
36 void SetInputFile(TString inname="Run_1234.fz"){fInName=inname ; }
37 void SetDebugLevel(Int_t idebug=1){fDebug=idebug ;}
39 //Set position of the target in the given run.
40 //The reference system is following
41 //Z axis along beam direction, from target to prototype (0-surface of prototype)
42 //X axis along columns of prototype (0-center of prototype)
43 //Y axis along raws of prototype (0-center of prototype)
44 void SetTargetPosition(Double_t * pos)
45 {for(Int_t i=0;i<3;i++)fTarget[i]=pos[i] ;}
46 void SetConTableDB(AliPHOSConTableDB * ctdb){fctdb = ctdb ;}
47 void SetMaxEventsPerFile(Int_t nev=20000){fMaxPerFile = nev ;}
48 void Print(Option_t *option="")const ;
51 Bool_t StartRootFiles(void) ;
52 Bool_t CloseRootFiles(void) ;
56 Bool_t ProcessRawFile() ;
57 void Swab4(void *from, void *to, size_t nwords) ;
58 void Swab2(void *from, void *to, size_t nwords) ;
60 void WriteDigits(void) ;
62 TClonesArray * fDigits ; //!list of final digits
63 AliPHOSBeamTestEvent * fPHOSHeader ; //!
64 AliPHOSConTableDB * fctdb ; //!
65 Double_t fTarget[3] ; //!Position of the target
66 TFile * fHeaderFile ; //!galice.root file
67 TFile * fDigitsFile ; //!file with digits
68 Float_t fBeamEnergy ; //BeamEnergy
69 Int_t fMaxPerFile ; //!Maximal number of events per root file
71 Int_t fStatus ; //status of input file: OK, not found etc.
72 TString fInName ; // FileName of the input file
74 Bool_t fIsInitialized ; //!
75 Bool_t fToSplit ; //To produce splitted output
76 UInt_t fMK1 ; //!ZEBRA markers
82 ClassDef(AliPHOSRaw2Digits,1) // description
86 #endif // AliPHOSRAW2DIGITS_H