]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSCalibrManager.h
Run type changed: PHYSICS only
[u/mrichter/AliRoot.git] / PHOS / AliPHOSCalibrManager.h
1 #ifndef ALIPHOSCALIBRMANAGER_H
2 #define ALIPHOSCALIBRMANAGER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7
8 //_________________________________________________________________________    
9 //                  
10 //*-- Author: D.Peressounko (RRC KI & SUBATECH)
11
12
13 // --- ROOT system ---
14 #include "TNamed.h"
15 #include "TString.h" 
16 class TArrayF ; 
17 // --- Standard library ---
18
19 // --- AliRoot header files ---
20 class AliPHOSConTableDB ;
21 class AliPHOSCalibrationData ;
22
23 class AliPHOSCalibrManager:public TNamed {
24
25 public:
26   AliPHOSCalibrManager() ;          // ctor
27   AliPHOSCalibrManager(const AliPHOSCalibrManager & manager);
28  
29   virtual ~AliPHOSCalibrManager() ; // dtor
30   static AliPHOSCalibrManager * GetInstance() ;
31   static AliPHOSCalibrManager * GetInstance(const char * filename,const char * kind = "root" ) ; 
32
33   void GetParameters(AliPHOSCalibrationData &data) ; 
34   
35   void SetConTable(AliPHOSConTableDB * ct){fctdb = ct ;}
36
37   void WriteData(AliPHOSCalibrationData &data) ;
38
39   AliPHOSCalibrManager & operator = (const AliPHOSCalibrManager & right) ;
40
41 private:
42   //Read gains of pedestals from ascii file
43   void ReadFromASCII(AliPHOSCalibrationData & data) ;
44
45   void ReadFromRoot(AliPHOSCalibrationData &data) ;
46
47   AliPHOSCalibrManager(const char* filename,const char * kind = "root") ;          
48
49 private:
50   TString   fFileName ;        //Name of file with calibration data
51   Int_t     fInputKind;        //Kind of input to read/write data
52   AliPHOSConTableDB * fctdb ;  //Connection table used to read from ASCII file
53   
54   static AliPHOSCalibrManager * fgCaMa ; // pointer to the unique instance of singleton
55             
56  
57   ClassDef(AliPHOSCalibrManager,1)  // description 
58
59 };
60
61 #endif // AliPHOSCALIBRMANAGER_H