bag in target position fixed;FinishRun() removed
[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
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"
17class TClonesArray ;
18
19// --- Standard library ---
20
21// --- AliRoot header files ---
22class AliPHOSGeometry ;
23class AliPHOSBeamTestEvent ;
24class AliPHOSConTableDB ;
25
26class AliPHOSRaw2Digits : public TTask {
27
28public:
29 AliPHOSRaw2Digits() ; // ctor
ddaf8726 30 AliPHOSRaw2Digits(const char * inputFileName,Bool_t toSplit = kTRUE) ;
f74edaba 31 virtual ~AliPHOSRaw2Digits() ; // dtor
32
33 void Exec(Option_t *option) ;
34
ddaf8726 35 void SetBeamEnergy(Float_t energy){fBeamEnergy = energy ;}
f74edaba 36 void SetInputFile(TString inname="Run_1234.fz"){fInName=inname ; }
37 void SetDebugLevel(Int_t idebug=1){fDebug=idebug ;}
38
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 ;}
ddaf8726 47 void SetMaxEventsPerFile(Int_t nev=20000){fMaxPerFile = nev ;}
f74edaba 48 void Print(Option_t *option="")const ;
49
ddaf8726 50private:
51 Bool_t StartRootFiles(void) ;
52 Bool_t CloseRootFiles(void) ;
f74edaba 53 Bool_t ProcessRawFile() ;
54 void Swab4(void *from, void *to, size_t nwords) ;
55 void Swab2(void *from, void *to, size_t nwords) ;
56 Bool_t Init() ;
57 void WriteDigits(void) ;
58
59 TClonesArray * fDigits ; //!list of final digits
60 AliPHOSBeamTestEvent * fPHOSHeader ; //!
61 AliPHOSConTableDB * fctdb ; //!
62 Double_t fTarget[3] ; //!Position of the target
ddaf8726 63 TFile * fHeaderFile ; //!galice.root file
64 TFile * fDigitsFile ; //!file with digits
65 Float_t fBeamEnergy ; //BeamEnergy
66 Int_t fMaxPerFile ; //!Maximal number of events per root file
f74edaba 67 Int_t fEvent ; //
68 Int_t fStatus ; //status of input file: OK, not found etc.
69 TString fInName ; // FileName of the input file
70 Bool_t fDebug ; //!
71 Bool_t fIsInitialized ; //!
ddaf8726 72 Bool_t fToSplit ; //To produce splitted output
f74edaba 73 UInt_t fMK1 ; //!ZEBRA markers
74 UInt_t fMK2 ; //!
75 UInt_t fMK3 ; //!
76 UInt_t fMK4 ; //!
77 UInt_t fCKW ; //!
78
79 ClassDef(AliPHOSRaw2Digits,1) // description
80
81};
82
83#endif // AliPHOSRAW2DIGITS_H