Decalibrate simulated data
[u/mrichter/AliRoot.git] / PHOS / macros / BeamTest / makeCalDB.C
CommitLineData
e869dd6c 1void makeCalDB(void){
2 //Read Connection Table DB
3 TFile f("ConTableDB.root") ;
4 AliPHOSConTableDB * ctdb = (AliPHOSConTableDB *)f.Get("AliPHOSConTableDB") ;
5 f.Close() ;
6
7 AliPHOSCalibrationDB * c = new AliPHOSCalibrationDB("beamtest.root") ;
8 c->SetConTableDB(ctdb) ;
9 c->ReadCalibrationParameters("gains.dat","gains") ;
10 c->ReadCalibrationParameters("pedestals.dat","pedestals") ;
11 TFile g("beamtest.root","recreate") ;
12 g.cd() ;
13 c->Write(0) ;
14 g.Close() ;
15}