Fix in the print of the results (P.Christakoglou)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 Oct 2005 10:23:49 +0000 (10:23 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 Oct 2005 10:23:49 +0000 (10:23 +0000)
ANALYSIS/AliBalance.cxx
ANALYSIS/AliBalance.h

index 97da8eecfd37c8a700eafd214046858c7a4f3c22..96b3eb7f0c356ba8da98d52737e209633bd13257 100644 (file)
@@ -46,6 +46,14 @@ AliBalance::AliBalance()
       fB[i] = 0.0;
       ferror[i] = 0.0;
     } 
+  fNp = 0.0;
+  fNn = 0.0;
+  fP2_Start = 0.0;
+  fP2_Stop = 0.0;
+  fP2_Step = 0.0; 
+  fAnalysisType = 0;
+  fNumberOfBins = 0;
+  fNtrack = 0;
   fAnalyzedEvents = 0;
 }
 
@@ -358,8 +366,8 @@ void AliBalance::PrintResults()
   cout<<"=================================================="<<endl;
   for(Int_t i = 0; i < fNumberOfBins; i++)
     { 
-      Double_t x = fP2_Start + fP2_Step*i + fP2_Step/2 ;
-      cout<<"B: "<<fB[i]<<"\t Error: "<<ferror[i]<<"\t bin: "<<x<<endl;
+      x[i] = fP2_Start + fP2_Step*i + fP2_Step/2 ;
+      cout<<"B: "<<fB[i]<<"\t Error: "<<ferror[i]<<"\t bin: "<<x[i]<<endl;
     } 
   cout<<"=================================================="<<endl;
   for(Int_t i = 1; i < fNumberOfBins; i++)
index 06b4180f17a0d4fbc04844fc69fc8136e2f66288..b48cd245061a923d110f2bf7b1f3cfd3d656ac59 100644 (file)
@@ -52,7 +52,7 @@ class AliBalance : public TObject
   void SetAnalysisType(Int_t iType);
   void SetInterval(Double_t P2_Start, Double_t P2_Stop);
 
-  void CalculateBalance() ;
+  void CalculateBalance();
   
   Double_t GetNp() { return 1.0*fNp; }
   Double_t GetNn() { return 1.0*fNn; }