Updated to new CDB
[u/mrichter/AliRoot.git] / PHOS / macros / CalibrationDB / AliPHOSDecalibrate.C
... / ...
CommitLineData
1/* $Id$ */
2
3// Digitize and decalibrate events assuming that SDigits
4// have been already produced.
5// Decalibration coefficients are located in the local file
6// deCalibDB/PHOS/Calib/GainFactors_and_Pedestals/Run_xxx.root
7// Author: Boris Polichtchouk (Boris.Polichtchouk@cern.ch)
8
9void AliPHOSDecalibrate(Int_t nevents=1)
10{
11
12 //Load (de)calibration database into aliroot session
13 //and set it to AliPHOSGetter.
14
15 AliPHOSCalibData* deCal = (AliPHOSCalibData*)(AliCDBManager::Instance()
16 ->GetStorage("local://deCalibDB")->Get("PHOS/Calib/GainFactors_and_Pedestals",1)
17 ->GetObject());
18
19 AliPHOSGetter* gime = AliPHOSGetter::Instance("galice.root");
20 gime->SetCalibData(deCal);
21
22
23 AliSimulation sim ;
24 sim.SetRunGeneration(kFALSE) ;
25 sim.SetMakeSDigits("") ;
26 sim.SetMakeDigits("PHOS") ;
27 sim.Run(nevents) ;
28}