]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FASTSIM/AliQuenchingWeights.cxx
Switch off the warnings in the compilation of G__*
[u/mrichter/AliRoot.git] / FASTSIM / AliQuenchingWeights.cxx
index e1e06c04c31b656d2260bfade04591a37a607f40..9392a996552b3308683e8a7c0cc0fe85f5b64c79 100644 (file)
@@ -40,6 +40,7 @@
 #include <TGraph.h>
 #include <TROOT.h>
 #include <TSystem.h>
+#include <TString.h>
 #include <TLegend.h>
 #include "AliQuenchingWeights.h"
 
@@ -74,9 +75,7 @@ AliQuenchingWeights::AliQuenchingWeights()
       fTablesLoaded(kFALSE)
 {
   //default constructor 
-  Char_t name[100];
-  sprintf(name,"hhistoqw_%d",fInstanceNumber);
-  fHisto = new TH1F(name,"",fgkBins,0.,fgkMaxBin);
+  fHisto = new TH1F(Form("hhistoqw_%d",fInstanceNumber),"",fgkBins,0.,fgkMaxBin);
   for(Int_t bin=1;bin<=fgkBins;bin++) 
     fHisto->SetBinContent(bin,0.);
 }
@@ -736,7 +735,7 @@ Int_t AliQuenchingWeights::CalcSingleHard(Int_t ipart, Double_t rrrr,Double_t xx
     Error("CalcSingleHard","Tables are not loaded.");
     return -1;
   }
-  if(!fMultSoft){
+  if(fMultSoft){
     Error("CalcSingleHard","Tables are not loaded for Single Hard Scattering.");
     return -1;
   }