]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/T0Physda.cxx
Fix for bug #76597: floating point exception in the test of Pythia 6.4 with Omega...
[u/mrichter/AliRoot.git] / T0 / T0Physda.cxx
index 09f71b36733b328dd2784bf32dea16a5e2a79f5d..4e6921fa71fe990b59074e4df5a7c05f2de9776a 100644 (file)
@@ -43,8 +43,6 @@ SOULD BE CHANGED BACK BEFORE BEAM
 #include "TSpectrum.h"
 #include "TMath.h"
 
-int kbx, kcbx, kt0bx, knpmtA, knpmtC;
-float klx,kmx,kclx,kcmx, kt0lx, kt0hx;
 
 /* Main routine
       Arguments: 
@@ -74,6 +72,8 @@ int main(int argc, char **argv) {
     printf("Input file >>inPhys.dat<< not found !!!\n");
     return -1;
   }
+  int  kcbx, kt0bx, knpmtA, knpmtC;
+  float kclx,kcmx, kt0lx, kt0hx;
   
   while((c=getc(inp))!=EOF) {
     switch(c) {
@@ -161,13 +161,13 @@ int main(int argc, char **argv) {
     
     switch (event->eventType){
       
-      case START_OF_RUN:
-       break;
+    case START_OF_RUN:
+      break;
        
     case END_OF_RUN:
       break;
       
-        case PHYSICS_EVENT:
+    case PHYSICS_EVENT:
          //    case CALIBRATION_EVENT:
       iev++;
       
@@ -243,8 +243,9 @@ int main(int argc, char **argv) {
        }
           
      delete start;
-      start = 0x0;
-      reader->Reset();
+     start = 0x0;
+     delete reader;
+     reader= 0x0;
       // End of fill histograms
       
     }
@@ -262,14 +263,15 @@ int main(int argc, char **argv) {
   printf("After loop, before writing histos\n");
   // write a file with the histograms
 
-  TFile *hist = new TFile(FILE_OUT,"RECREATE");
+  TFile hist(FILE_OUT,"RECREATE");
 
   for(Int_t j=0;j<24;j++){
-     hCFD1minCFD[j]->Write();
-    }
+    hCFD1minCFD[j]->SetDirectory(&hist);
+    hCFD1minCFD[j]->Write();
+  }
   hVertex->Write();
-  hist->Close();
-  delete hist;
+  hist.Close();
+  //delete hist;
 
   status=0;