]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenParam.cxx
Fixed coding conventions violations
[u/mrichter/AliRoot.git] / EVGEN / AliGenParam.cxx
index 2a914c8ac600dc1e8a19eb650d5ff3f265a9c801..ee8c3ff3aa764e9da230bbde8ff0b39d3a4e0440 100644 (file)
@@ -69,7 +69,7 @@ ClassImp(AliGenParam)
 // Default constructor
 }
 //____________________________________________________________
-AliGenParam::AliGenParam(Int_t npart, AliGenLib * Library,  Int_t param, const char* tname)
+AliGenParam::AliGenParam(Int_t npart, const AliGenLib * Library,  Int_t param, const char* tname)
     :AliGenMC(npart),
      fPtParaFunc(Library->GetPt(param, tname)),
      fYParaFunc (Library->GetY (param, tname)),
@@ -186,7 +186,7 @@ void AliGenParam::Init()
   */
   //End_Html
     char name[256];
-    sprintf(name, "pt-parameterisation for %s", GetName());
+    snprintf(name, 256, "pt-parameterisation for %s", GetName());
     
     if (fPtPara) fPtPara->Delete();
     fPtPara = new TF1(name, fPtParaFunc, fPtMin, fPtMax,0);
@@ -196,15 +196,15 @@ void AliGenParam::Init()
     
     fPtPara->SetNpx(npx);
 
-    sprintf(name, "y-parameterisation  for %s", GetName());
+    snprintf(name, 256, "y-parameterisation  for %s", GetName());
     if (fYPara) fYPara->Delete();
     fYPara  = new TF1(name, fYParaFunc, fYMin, fYMax, 0);
     gROOT->GetListOfFunctions()->Remove(fYPara);
 
     
-    sprintf(name, "pt-for-%s", GetName());
+    snprintf(name, 256, "pt-for-%s", GetName());
     TF1 ptPara(name ,fPtParaFunc, 0, 15, 0);
-    sprintf(name, "y-for-%s", GetName());
+    snprintf(name, 256, "y-for-%s", GetName());
     TF1 yPara(name, fYParaFunc, -6, 6, 0);
 
 //
@@ -377,7 +377,7 @@ void AliGenParam::Generate()
              
              if (np >1) {
                  decayed = kTRUE;
-                 TParticle* iparticle =  (TParticle *) particles->At(0);
+                 TParticle* iparticle =  0;
                  Int_t ipF, ipL;
                  for (i = 1; i<np ; i++) {
                      trackIt[i] = 1;