]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Suppressed warning from fkSegmentation->PadByPosition(...)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jan 2006 11:08:38 +0000 (11:08 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jan 2006 11:08:38 +0000 (11:08 +0000)
MUON/mapping/AliMpNeighboursPadIterator.cxx
MUON/mapping/AliMpNeighboursPadIterator.h

index ffd5c29ce280c7cf9d2aa5c2798ee94ac0925fc5..427a349504a70ad4176add4d77d1e475e72b291d 100755 (executable)
@@ -117,12 +117,13 @@ AliMpNeighboursPadIterator::operator = (const AliMpNeighboursPadIterator& right)
 //
 
 //______________________________________________________________________________
-Bool_t AliMpNeighboursPadIterator::IsNeighbours(const AliMpPad& pad) const
+Bool_t AliMpNeighboursPadIterator::IsNeighbour(const AliMpPad& pad) const
 {
 /// Return true if the pad located by <padIndice> is a neighbour of those
 /// located at <fCenterPad>
 
-    
+    if ( !pad.IsValid() ) return kFALSE;    
+
     TVector2 relPos  = pad.Position()   - fCenterPad.Position();
     TVector2 bounds  = pad.Dimensions() + fCenterPad.Dimensions();
     return (TMath::Abs(relPos.X())- bounds.X()<AliMpConstants::LengthTolerance()) && 
@@ -144,14 +145,14 @@ AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
     PadVector ans;
     Bool_t cont=kTRUE;
     do {
-        if (IsNeighbours(current))
+        if (IsNeighbour(current))
             ans.push_back(current);
         else
             cont=kFALSE;
         TVector2 nextPos = current.Position() + TVector2(
           current.Dimensions().X()*(AliMpConstants::LengthStep()+1.)*direction.GetFirst(),
           current.Dimensions().Y()*(AliMpConstants::LengthStep()+1.)*direction.GetSecond());
-        current = fkSegmentation->PadByPosition(nextPos);
+        current = fkSegmentation->PadByPosition(nextPos, false);
     } while (cont);
     return ans;
 }
@@ -181,14 +182,14 @@ AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
     PadVector* ans = new PadVector();
     Bool_t cont=kTRUE;
     do {
-        if (IsNeighbours(current))
+        if (IsNeighbour(current))
             ans->Add(new AliMpPad(current));
         else
             cont=kFALSE;
         TVector2 nextPos = current.Position() + TVector2(
           current.Dimensions().X()*(AliMpConstants::LengthStep()+1.)*direction.GetFirst(),
           current.Dimensions().Y()*(AliMpConstants::LengthStep()+1.)*direction.GetSecond());
-        current = fkSegmentation->PadByPosition(nextPos);
+        current = fkSegmentation->PadByPosition(nextPos, false);
     } while (cont);
     return ans;
 }
index 48bd0319b4f04f5413cd0ea0b1e439e3b7fc1889..3a5dfa7f3914422d9070336a6012e297bf36d303 100755 (executable)
@@ -67,7 +67,7 @@ class AliMpNeighboursPadIterator : public AliMpVPadIterator
     static const UInt_t   fgkInvalidIndex; // invalid index number
 
     // private methods
-    Bool_t    IsNeighbours(const AliMpPad& pad) const;
+    Bool_t    IsNeighbour(const AliMpPad& pad) const;
 #ifdef WITH_STL
     PadVector PadVectorLine(const AliMpPad& from,
                             const AliMpIntPair& direction) const;