// $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():
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 =
AliMpGraphContext *save = new AliMpGraphContext(*this);
-#ifdef WITH_STL
- fgStack.push_back(save);
-#endif
-
-#ifdef WITH_ROOT
fgStack.AddAt(save, fgStackSize++);
-#endif
}
//_____________________________________________________________________________
{
/// 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
fgStack.RemoveAt(fgStackSize);
delete obj;
}
-#endif
}