/*
PMD DA for online calibration
-contact: basanta@phy.iitb.ac.in
-Link:
+contact: basanta@iitb.ac.in, Satyajit.Jena@cern.ch
+Link: https://twiki.cern.ch/twiki/bin/view/ALICE/DA
Reference Run:/afs/cern.ch/user/s/sjena/public/run83496.raw
Run Type: PEDESTAL
DA Type: LDC
Number of events needed: 1000
-Input Files: Run0_999999999_v0_s0.root from the DAQ DB for mapping
+Input Files: PMD/Calib/Mapping/Run0_999999999_v0_s0.root
Output Files: pmd_ped.root, to be exported to the DAQ FXS, pedestal230*.ped
Trigger types used: PHYSICS_EVENT
"TStreamerInfo()");
- AliPMDCalibPedestal calibped;
+ AliPMDCalibPedestal *calibped = new AliPMDCalibPedestal();
TTree *ped = NULL;
Int_t iev=0;
// Get run number
- /*
+
+ int runNr = 0;
if (getenv("DATE_RUN_NUMBER")==0) {
printf("DATE_RUN_NUMBER not properly set.\n");
- return -1;
+ //return -1;
+ printf("Run Number is set to Zero \n");
}
- int runNr = atoi(getenv("DATE_RUN_NUMBER"));
- */
- int runNr = 0;
-
+ else
+ {
+ runNr = atoi(getenv("DATE_RUN_NUMBER"));
+ }
if (gSystem->AccessPathName("localOCDB/PMD/Calib/Mapping",kFileExists))
{
return -1;
}
}
- status = daqDA_DB_getFile("PMD/Calib/Mapping","localOCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root");
+ status = daqDA_DB_getFile("PMD/Calib/Mapping/Run0_999999999_v0_s0.root","localOCDB/PMD/Calib/Mapping/Run0_999999999_v0_s0.root");
if (status)
{
- printf("Failed to get PMD-Mapping file (PMD/Calib/Mapping) from DAQdetDB, status=%d\n", status);
+ printf("Failed to get PMD-Mapping file (PMD/Calib/Mapping/Run0_999999999_v0_s0.root) from DAQdetDB, status=%d\n", status);
return -1;
}
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");