GetMedium replaced by CurrentMedium (I.Hrivnacova)
[u/mrichter/AliRoot.git] / PHOS / macros / CalibrationDB / AliPHOSDecalibrate.C
CommitLineData
377108bd 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
16b8ada8 6// deCalibDB/PHOS/Calib/GainFactors_and_Pedestals/Run_xxx.root
7// Author: Boris Polichtchouk (Boris.Polichtchouk@cern.ch)
377108bd 8
9void AliPHOSDecalibrate(Int_t nevents=1)
10{
16b8ada8 11
12 //Load (de)calibration database into aliroot session
377108bd 13 //and set it to AliPHOSGetter.
16b8ada8 14
15 AliPHOSCalibData* deCal = (AliPHOSCalibData*)(AliCDBManager::Instance()
16 ->GetStorage("local://deCalibDB")->Get("PHOS/Calib/GainFactors_and_Pedestals",1)
17 ->GetObject());
377108bd 18
19 AliPHOSGetter* gime = AliPHOSGetter::Instance("galice.root");
16b8ada8 20 gime->SetCalibData(deCal);
377108bd 21
22
23 AliSimulation sim ;
24 sim.SetRunGeneration(kFALSE) ;
25 sim.SetMakeSDigits("") ;
26 sim.SetMakeDigits("PHOS") ;
27 sim.Run(nevents) ;
28}