Warnings fixed
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Mar 2011 04:24:50 +0000 (04:24 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Mar 2011 04:24:50 +0000 (04:24 +0000)
ACORDE/AliACORDE.cxx
ACORDE/AliACORDEReconstructor.cxx
ACORDE/AliACORDEv1.cxx
ACORDE/AliGenACORDE.cxx

index f431a0e..d4e27d3 100644 (file)
@@ -200,7 +200,7 @@ void AliACORDE::SetTreeAddress()
 
   TBranch *branch;
   char branchname[20];
-  sprintf(branchname,"%s",GetName());
+  //sprintf(branchname,"%s",GetName());
   // Branch address for hit tree
   TTree *treeH = fLoader->TreeH();
   if (treeH ) {
index 66fc00d..5afe80f 100644 (file)
@@ -139,6 +139,10 @@ void AliACORDEReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
     AcoHitSingle[module] = kTRUE;\r
     AcoHitMulti[module] = kTRUE;\r
   }  \r
+  if (!esd) {\r
+       AliError("NO ACORDE ESD branch found!");\r
+       return;\r
+}\r
   TString ActiveTriggerDetector = esd->GetFiredTriggerClasses();\r
   if (ActiveTriggerDetector.Contains("ASL")) fESDACORDE->SetACORDEBitPattern(AcoHitSingle);\r
   else if (ActiveTriggerDetector.Contains("AMU")) fESDACORDE->SetACORDEBitPattern(AcoHitMulti);\r
index 1515bbc..30f4e3f 100644 (file)
@@ -821,7 +821,7 @@ void AliACORDEv1::MakeBranch(Option_t *option)
 // Creates new branches in the current Root Tree
     
   char branchname[10];
-  sprintf(branchname,"%s",GetName());
+  //sprintf(branchname,"%s",GetName());
   AliDebug(2,Form("fBufferSize = %d",fBufferSize));
   const char *cH = strstr(option,"H");
   if (fHits   && fLoader->TreeH() && cH) {
index 5ee5c58..42b3144 100644 (file)
@@ -424,17 +424,17 @@ void AliGenACORDE::InitMomentumGeneration()
       char buffer6[1024];
       char buffer7[1024];
 
-      sprintf(buffer1, h1Coef, y, y, y, y, y, y);
-      sprintf(buffer2, h2Coef, y, y, y, y, y, y);
-      sprintf(buffer3, h3Coef, y, y, y, y, y, y);
-      sprintf(buffer4, s2Coef, y, y, y, y, y, y);
+      //sprintf(buffer1, h1Coef, y, y, y, y, y, y);
+      //sprintf(buffer2, h2Coef, y, y, y, y, y, y);
+      //sprintf(buffer3, h3Coef, y, y, y, y, y, y);
+      //sprintf(buffer4, s2Coef, y, y, y, y, y, y);
       
-      sprintf(buffer5, h, buffer1, buffer2, buffer3, buffer4);
+      //sprintf(buffer5, h, buffer1, buffer2, buffer3, buffer4);
       
-      sprintf(buffer6, flux, buffer5);
+      //sprintf(buffer6, flux, buffer5);
       
       fMomentumDist = new TF1("fMomentumDist", buffer6, fPMin, fPMax);
-      sprintf(buffer7, normalizedFlux, buffer5);
+      //sprintf(buffer7, normalizedFlux, buffer5);
       fUnfoldedMomentumDist = new TF1("fUnfoldedMomentumDist", buffer7, fPMin, fPMax);
       for (Int_t i = 0; i < 4; i++ ) {
        fMomentumDist->SetParName(i, paramNames[i]);
@@ -483,8 +483,8 @@ void AliGenACORDE::InitZenithalAngleGeneration()
       Float_t weight = 0;
       for ( Int_t i = 0; i < pEnd; i++ ) {
        // Fill the distribution
-       sprintf(name, "zenith%d", i+1);
-       sprintf(title, "Zenith distribution, p=%f", fPMin+(Float_t)i);
+       //sprintf(name, "zenith%d", i+1);
+       //sprintf(title, "Zenith distribution, p=%f", fPMin+(Float_t)i);
        zenith = new(mom[i]) TH1F(name, title, TMath::Abs(TMath::Nint(fZenithMax-fZenithMin)), TMath::Cos(fZenithMax*TMath::Pi()/180), TMath::Cos(fZenithMin*TMath::Pi()/180));
 
        // Make a loop for the angle and fill the histogram for the weight