]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpGraphContext.cxx
Fix in AliMpSectorSegmentation::PadByPosition;
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpGraphContext.cxx
index c7b75e27a5e0a57f646e24108128962e923f1607..bbd96ba5ca40293a4b7dc54cac8e60344bfc02d6 100755 (executable)
 // $Id$
 // $MpId: AliMpGraphContext.cxx,v 1.11 2006/05/24 13:58:32 ivana Exp $
 // Category: graphics
-//
+
+//-----------------------------------------------------------------------------
 // Class AliMpGraphContext
 // -----------------------
 // Class describing a the correspondance between a given area
 // in pad, and a zone of real (cm) position
 // Included in AliRoot: 2003/05/02
 // Author: David GUEZ, IPN Orsay
+//-----------------------------------------------------------------------------
 
 #include "AliMpGraphContext.h"
 
 ClassImp(AliMpGraphContext)
 /// \endcond
 
-AliMpGraphContext *AliMpGraphContext::fgInstance = 0;
-AliMpGraphContext::GraphContextVector AliMpGraphContext::fgStack;
-
-#ifdef WITH_ROOT
+AliMpGraphContext* AliMpGraphContext::fgInstance = 0;
+TObjArray          AliMpGraphContext::fgStack;
 Int_t              AliMpGraphContext::fgStackSize = 0;
-#endif
 
 //_____________________________________________________________________________
 AliMpGraphContext::AliMpGraphContext():
@@ -115,8 +114,8 @@ void AliMpGraphContext::RealToPad(const TVector2 &position,
                              TVector2 &padPosition,
                              TVector2 &padDimensions) const
 {
-  // Transform the real area (position,dimensions) to
-  // its equivalent pad area
+  /// Transform the real area (position,dimensions) to
+  /// its equivalent pad area
 
   padPosition = RealToPad(position);
   padDimensions = 
@@ -142,13 +141,7 @@ void AliMpGraphContext::Push() const
 
   AliMpGraphContext *save = new AliMpGraphContext(*this);
 
-#ifdef WITH_STL
-  fgStack.push_back(save);
-#endif
-
-#ifdef WITH_ROOT
   fgStack.AddAt(save, fgStackSize++);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -156,17 +149,6 @@ void AliMpGraphContext::Pop()
 {
 /// Pop an object from the stack.
 
-#ifdef WITH_STL
-  // restore the last saved configuration
-  if (!fgStack.empty()){
-    AliMpGraphContext *obj = fgStack.back();
-    *this = *obj;
-    fgStack.pop_back();
-    delete obj;
-  }
-#endif
-
-#ifdef WITH_ROOT
   // restore the last saved configuration
   if ( fgStackSize ){
     AliMpGraphContext *obj 
@@ -175,5 +157,4 @@ void AliMpGraphContext::Pop()
     fgStack.RemoveAt(fgStackSize);
     delete obj;
   }
-#endif
 }