Make separate, specialized geometries for RPhi and RhoZ views.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRaw2Digits.h
CommitLineData
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
702ab87e 6/* $Id$ */
7
8/* History of cvs commits:
9 *
10 * $Log$
11 */
f74edaba 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"
22class TClonesArray ;
23
24// --- Standard library ---
25
26// --- AliRoot header files ---
27class AliPHOSGeometry ;
28class AliPHOSBeamTestEvent ;
29class AliPHOSConTableDB ;
30
31class AliPHOSRaw2Digits : public TTask {
32
33public:
34 AliPHOSRaw2Digits() ; // ctor
88cb7938 35 AliPHOSRaw2Digits(const char * inputFileName) ;
540e818b 36 AliPHOSRaw2Digits(AliPHOSRaw2Digits & r2d) ; // cpy ctor
f74edaba 37 virtual ~AliPHOSRaw2Digits() ; // dtor
38
702ab87e 39 void Exec(const Option_t * = "") ;
f74edaba 40
ddaf8726 41 void SetBeamEnergy(Float_t energy){fBeamEnergy = energy ;}
f74edaba 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 ;}
ddaf8726 53 void SetMaxEventsPerFile(Int_t nev=20000){fMaxPerFile = nev ;}
702ab87e 54 void Print(const Option_t * = "")const ;
8c140292 55 AliPHOSRaw2Digits & operator = ( AliPHOSRaw2Digits & /*r2d*/ ) { return *this ; }
540e818b 56
f74edaba 57private:
e957fea8 58 Bool_t StartRootFiles(void) const ;
ddaf8726 59 Bool_t CloseRootFiles(void) ;
f74edaba 60 Bool_t ProcessRawFile() ;
cd228525 61 void Swab4(void *from, void *to, size_t nwords) const ;
62 void Swab2(void *from, void *to, size_t nwords) const ;
f74edaba 63 Bool_t Init() ;
64 void WriteDigits(void) ;
65
66 TClonesArray * fDigits ; //!list of final digits
cd228525 67 AliPHOSBeamTestEvent * fPHOSHeader ; //!PHOSBeamTest header
f74edaba 68 AliPHOSConTableDB * fctdb ; //!
69 Double_t fTarget[3] ; //!Position of the target
ddaf8726 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
cd228525 74 Int_t fEvent ; //Event number
f74edaba 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 ; //!
88cb7938 79
f74edaba 80 UInt_t fMK1 ; //!ZEBRA markers
cd228525 81 UInt_t fMK2 ; //!ZEBRA markers
82 UInt_t fMK3 ; //!ZEBRA markers
83 UInt_t fMK4 ; //!ZEBRA markers
84 UInt_t fCKW ; //!ZEBRA markers
f74edaba 85
86 ClassDef(AliPHOSRaw2Digits,1) // description
87
88};
89
90#endif // AliPHOSRAW2DIGITS_H