1 #ifndef ALIPHOSCALIBRATIONDB_H
2 #define ALIPHOSCALIBRATIONDB_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
10 //*-- Author: D.Peressounko (RRC KI & SUBATECH)
13 // --- ROOT system ---
18 // --- Standard library ---
20 // --- AliRoot header files ---
21 class AliPHOSConTableDB ;
23 class AliPHOSCalibrationDB:public TNamed {
26 AliPHOSCalibrationDB() ; // ctor
27 AliPHOSCalibrationDB(const char * database) ;
28 virtual ~AliPHOSCalibrationDB() ; // dtor
30 //Main method: calibrates if gains are known, otherwise - returns 0
31 Float_t Calibrate(Int_t amp, Int_t absId)const ;
33 //Read gains of pedestals from ascii file
34 void ReadCalibrationParameters(const char * filename = "gains.dat",Option_t* opt = "gains") ;
36 //Sets the same parameters for all channels
37 void SetAll(Float_t pedestal = 0, Float_t slope = 0.01) ;
39 //To know correspondance when reads list of gains from ascii file
40 void SetConTableDB(AliPHOSConTableDB * ctdb){fctdb = ctdb; }
42 //Set parameters for particlular channel
43 void SetParameters(Int_t AbsId, Float_t pedestal = 0, Float_t slope = 0.01)
44 {if(fPedestals){fPedestals->AddAt(pedestal,AbsId-1) ; fSlopes->AddAt(slope,AbsId-1) ;} }
46 //To be replaced in real DB when updating will really be necessary
47 void Update(Int_t /*event*/,Int_t /*run*/){}
49 AliPHOSCalibrationDB & operator = (const AliPHOSCalibrationDB & ) ;
51 Int_t fCurentRun ; //!
54 TArrayF * fPedestals ;
56 AliPHOSConTableDB * fctdb ; //!
58 ClassDef(AliPHOSCalibrationDB,1) // description
62 #endif // AliPHOSCALIBRATIONDB_H