//
// Author: David GUEZ, IPN Orsay
+#include <TError.h>
+
#include "AliMpGraphContext.h"
ClassImp(AliMpGraphContext)
Int_t AliMpGraphContext::fgStackSize = 0;
#endif
-// private constructor
+//_____________________________________________________________________________
AliMpGraphContext::AliMpGraphContext():
TObject(),
fPadPosition(TVector2(0.5,0.5)),
fRealPosition(TVector2(0.,0.)),
fRealDimensions(TVector2(1,1))
{
+// private constructor
+
fColor = 20;
// default constructor (private)
}
+
+//_____________________________________________________________________________
+AliMpGraphContext::AliMpGraphContext(const AliMpGraphContext& right)
+ : TObject(right)
+{
+// protected copy constructor
+
+ Fatal("AliMpGraphContext", "Copy constructor not provided.");
+}
+
+//_____________________________________________________________________________
+AliMpGraphContext&
+AliMpGraphContext::operator=(const AliMpGraphContext& right)
+{
+// protected assignement operator
+
+ // check assignement to self
+ if (this == &right) return *this;
+
+ Fatal("operator =", "Assignement operator not provided.");
+
+ return *this;
+}
+
+//_____________________________________________________________________________
AliMpGraphContext *AliMpGraphContext::Instance()
{
// return or create a unique instance of this class
return fgInstance;
}
+//_____________________________________________________________________________
TVector2 AliMpGraphContext::RealToPad(const TVector2 &position) const
{
// transform a real position into its equivalent position in the pad
return TVector2(x,y);
}
-
-
+//_____________________________________________________________________________
void AliMpGraphContext::RealToPad(const TVector2 &position,
const TVector2 &dimensions,
TVector2 &padPosition,
dimensions.Y()*fPadDimensions.Y()/fRealDimensions.Y());
}
+
+//_____________________________________________________________________________
void AliMpGraphContext::SetPadPosForReal(const TVector2 &position,
const TVector2 &dimensions)
{
// corresponding to the given real area.
RealToPad(position,dimensions,fPadPosition,fPadDimensions);
}
+
+//_____________________________________________________________________________
void AliMpGraphContext::Push() const
{
// Store the current configuration
fgStack.AddAt(save, fgStackSize++);
#endif
}
+
+//_____________________________________________________________________________
void AliMpGraphContext::Pop()
{
+// Pops object from the stack.
#ifdef WITH_STL
// restore the last saved configuration
if (!fgStack.empty()){