Fixes for Coverity warnings
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Feb 2011 07:56:31 +0000 (07:56 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Feb 2011 07:56:31 +0000 (07:56 +0000)
ITS/AliITSmodule.cxx
ITS/AliITSmodule.h

index b9e45cb..18ed233 100644 (file)
@@ -119,14 +119,13 @@ Int_t AliITSmodule::AddHit(AliITShit* hit,Int_t t,Int_t h) {
     return fNhitsM;
 }
 //___________________________________________________________________________
-Double_t AliITSmodule::PathLength(Int_t index,AliITShit *itsHit1,
+Double_t AliITSmodule::PathLength(AliITShit *itsHit1,
                                  AliITShit *itsHit2) {
   // path lenght
    Float_t  x1g,y1g,z1g;   
    Float_t  x2g,y2g,z2g;
    Double_t s;
 
-   index = 0;
    itsHit1->GetPositionG(x1g,y1g,z1g);
    itsHit2->GetPositionG(x2g,y2g,z2g);
 
@@ -136,8 +135,7 @@ Double_t AliITSmodule::PathLength(Int_t index,AliITShit *itsHit1,
    return s;
 }
 //___________________________________________________________________________
-void AliITSmodule::PathLength(Int_t index,
-                             Float_t x,Float_t y,Float_t z,
+void AliITSmodule::PathLength(Float_t x,Float_t y,Float_t z,
                              Int_t status,Int_t &nseg,
                              Float_t &x1,Float_t &y1,Float_t &z1,
                              Float_t &dx1,Float_t &dy1,Float_t &dz1,
@@ -145,7 +143,6 @@ void AliITSmodule::PathLength(Int_t index,
   // path length
     static Float_t x0,y0,z0;
 
-    index = 0;
     if ((status&0x0002)!=0){ // entering
        x0 = x;
        y0 = y;
index e49468c..eca47b5 100644 (file)
@@ -109,13 +109,13 @@ class AliITSmodule:public TObject{
                      Float_t &x,Float_t &y,Float_t &z) const;
     void MedianHitL(Int_t,AliITShit *,AliITShit *,Float_t &,Float_t &,
                    Float_t &){};
-    Double_t PathLength(Int_t index, AliITShit *itsHit1, AliITShit *itsHit2);
+    Double_t PathLength(AliITShit *itsHit1, AliITShit *itsHit2);
     // returns both the track and hit index numbers for the given hit. Hits
     // are kept on file according to their track index and hit index numbers.
     void MedianHit(Int_t index, Float_t xg,Float_t yg,Float_t zg,
                    Int_t status,Float_t &xMg, Float_t &yMg, Float_t &zMg,
                                   Int_t &flag);
-    void PathLength(Int_t index,Float_t x,Float_t y,Float_t z,Int_t status,
+    void PathLength(Float_t x,Float_t y,Float_t z,Int_t status,
                     Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1,
                    Float_t &dx1,Float_t &dy1, Float_t &dz1,Int_t &flag) const;
     Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b,