Coverity fix (C. Loizides)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 19 Dec 2010 08:49:05 +0000 (08:49 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 19 Dec 2010 08:49:05 +0000 (08:49 +0000)
FASTSIM/AliQuenchingWeights.cxx

index bbb2820..9392a99 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.);
 }