segmentation fault in daq machine is fixed
[u/mrichter/AliRoot.git] / PMD / PMDPEDESTALda.cxx
index 80c0fa6f6bf66797a2f7e9bfd1de39c5e8f27abb..b3d09a9e9ae1d40b14c06bebd81cd270d0517047 100644 (file)
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
                                          "TStreamerInfo()");
 
     
-    AliPMDCalibPedestal calibped;
+    AliPMDCalibPedestal *calibped = new AliPMDCalibPedestal();
 
     TTree *ped = NULL;
 
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
 
                AliRawReader *rawReader = new AliRawReaderDate((void*)event);
                TObjArray *pmdddlcont = new TObjArray();
-               calibped.ProcessEvent(rawReader,pmdddlcont);
+               calibped->ProcessEvent(rawReader,pmdddlcont);
                
                delete pmdddlcont;
                pmdddlcont = 0;
@@ -203,7 +203,7 @@ int main(int argc, char **argv) {
     
     if (eventT==END_OF_RUN) {
       printf("EOR event detected\n");
-      calibped.Analyse(ped);
+      calibped->Analyse(ped);
     }
     
     TFile * pedRun = new TFile ("PMD_PED.root","RECREATE"); 
@@ -213,6 +213,8 @@ int main(int argc, char **argv) {
     delete ped;
     ped = 0;
 
+    delete calibped;
+
 /* store the pedestal file in database */
 
     status = daqDA_DB_storeFile("PMD_PED.root","PMD_PED.root");