// Reads the pedestal file and keep the values in memory for subtraction
- AliPMDCalibGain calibgain;
+ AliPMDCalibGain *calibgain = new AliPMDCalibGain();
// Fetch the pedestal file - PMD_PED.root
return -1;
}
- Int_t pstatus = calibgain.ExtractPedestal("PMD_PED.root");
+ Int_t pstatus = calibgain->ExtractPedestal("PMD_PED.root");
if(pstatus == -3) return -3;
status = daqDA_DB_getFile("pmd_gain_tempfile.dat","pmd_gain_tempfile.dat");
if(!status)
{
- calibgain.ReadTempFile("pmd_gain_tempfile.dat");
+ calibgain->ReadTempFile("pmd_gain_tempfile.dat");
}
else
{
status = daqDA_DB_getFile("PMD_HOT.root","PMD_HOT.root");
if(!status)
{
- calibgain.ExtractHotChannel("PMD_HOT.root");
+ calibgain->ExtractHotChannel("PMD_HOT.root");
}
else
{
//if(nevents_physics%100 == 0)printf("Physis Events = %d\n",nevents_physics);
AliRawReader *rawReader = new AliRawReaderDate((void*)event);
TObjArray *pmdddlcont = new TObjArray();
- calibgain.ProcessEvent(rawReader, pmdddlcont);
+ calibgain->ProcessEvent(rawReader, pmdddlcont);
if (totevt%hotevtsize == 0) hotfilestatus = true;
delete pmdddlcont;
TTree *hot = new TTree("hot","PMD Hot cell tree");
- calibgain.FindHotCell(hot,xvar);
+ calibgain->FindHotCell(hot,xvar);
hot->Write();
hotRun->Close();
TTree *hot = new TTree("hot","PMD Hot cell tree");
- calibgain.FindHotCell(hot,xvar);
+ calibgain->FindHotCell(hot,xvar);
hot->Write();
hotRun->Close();
printf("*** Writing the intermediate ASCII file ***\n");
printf("-----------------------------------------------\n");
- calibgain.WriteTempFile("pmd_gain_tempfile.dat");
+ calibgain->WriteTempFile("pmd_gain_tempfile.dat");
// Store the Intermediate ascii file in the DB
status = daqDA_DB_storeFile("pmd_gain_tempfile.dat","pmd_gain_tempfile.dat");
printf("*** Writing the PMDGAINS.root file ***\n");
printf("-----------------------------------------------\n");
- calibgain.Analyse(ic, meanc);
+ calibgain->Analyse(ic, meanc);
TFile * gainRun = new TFile ("PMDGAINS.root","RECREATE");
ic->Write();
delete meanc;
meanc = 0;
+ delete calibgain;
/* store the result file on FES */
"TStreamerInfo()");
- AliPMDCalibPedestal calibped;
+ AliPMDCalibPedestal *calibped = new AliPMDCalibPedestal();
TTree *ped = NULL;
AliRawReader *rawReader = new AliRawReaderDate((void*)event);
TObjArray *pmdddlcont = new TObjArray();
- calibped.ProcessEvent(rawReader,pmdddlcont);
+ calibped->ProcessEvent(rawReader,pmdddlcont);
delete pmdddlcont;
pmdddlcont = 0;
if (eventT==END_OF_RUN) {
printf("EOR event detected\n");
- calibped.Analyse(ped);
+ calibped->Analyse(ped);
}
TFile * pedRun = new TFile ("PMD_PED.root","RECREATE");
delete ped;
ped = 0;
+ delete calibped;
+
/* store the pedestal file in database */
status = daqDA_DB_storeFile("PMD_PED.root","PMD_PED.root");