**************************************************************************/
// $Id$
-// $MpId: AliMpGraphContext.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $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 <TError.h>
+//-----------------------------------------------------------------------------
#include "AliMpGraphContext.h"
+/// \cond CLASSIMP
ClassImp(AliMpGraphContext)
+/// \endcond
-AliMpGraphContext *AliMpGraphContext::fgInstance = 0;
-GraphContextVector AliMpGraphContext::fgStack;
-#ifdef WITH_ROOT
+AliMpGraphContext* AliMpGraphContext::fgInstance = 0;
+TObjArray AliMpGraphContext::fgStack;
Int_t AliMpGraphContext::fgStackSize = 0;
-#endif
//_____________________________________________________________________________
AliMpGraphContext::AliMpGraphContext():
TObject(),
+ fColor(20),
fPadPosition(TVector2(0.5,0.5)),
fPadDimensions(TVector2(0.49,0.49)),
fRealPosition(TVector2(0.,0.)),
fRealDimensions(TVector2(1,1))
{
-/// Private constructor
-
- fColor = 20;
- // default constructor (private)
+/// Default constructor (private)
}
//_____________________________________________________________________________
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
}