X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmapping%2FAliMpGraphContext.h;h=7d34b20b113dc0991f3ec3b841cbda4bf33971cd;hb=d01ea7f36c7f5f52017118225f7ef37542bc262d;hp=d60e49d5f1308aac0884c67682b01c1c74833897;hpb=f79c58a52a23054c7b92eca3093bf5895ce24180;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mapping/AliMpGraphContext.h b/MUON/mapping/AliMpGraphContext.h index d60e49d5f13..7d34b20b113 100755 --- a/MUON/mapping/AliMpGraphContext.h +++ b/MUON/mapping/AliMpGraphContext.h @@ -1,43 +1,78 @@ +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + // $Id$ -// Category: graphics -// -// Class AliMpGraphContext -// ----------------------- -// Class describing the correspondance between a given area -// in pad, and a zone of real (cm) position -// -// Author: David GUEZ, IPN Orsay +// $MpId: AliMpGraphContext.h,v 1.11 2006/05/24 13:58:13 ivana Exp $ + +/// \ingroup mpgraphics +/// \class AliMpGraphContext +/// \brief Class describing the correspondance between a given area +/// in pad, and a zone of real (cm) position +/// +/// \author David GUEZ, IPN Orsay #ifndef ALI_MP_GRAPH_CONTEXT_H #define ALI_MP_GRAPH_CONTEXT_H #include + +#include "AliMpContainers.h" + #include +#ifdef WITH_ROOT +#include "AliMpExMap.h" +#endif -#include "AliMpGraphicsTypes.h" +#ifdef WITH_STL +#include +#endif class MPainter; class AliMpGraphContext : public TObject { + public: +#ifdef WITH_STL + /// GraphContextVector type + typedef std::vector GraphContextVector; +#endif +#ifdef WITH_ROOT + /// GraphContextVector type + typedef TObjArray GraphContextVector; +#endif + public: void Push() const; void Pop(); static AliMpGraphContext *Instance(); + // // set methods - + // + /// Set position of the pad area where to draw void SetPadPosition(const TVector2 &position){fPadPosition=position;} + /// Set dimensions of the pad area where to draw void SetPadDimensions(const TVector2 &dimensions){fPadDimensions=dimensions;} + /// Set position of the real area where to draw void SetRealPosition(const TVector2 &position){fRealPosition=position;} + /// Set dimensions of the real area where to draw void SetRealDimensions(const TVector2 &dimensions){fRealDimensions=dimensions;} + /// Set color to use void SetColor(Int_t color){fColor=color;} + // // get methods + // + + /// Return position of the pad area where to draw TVector2 GetPadPosition() const {return fPadPosition;} + /// Return dimensions of the pad area where to draw TVector2 GetPadDimensions() const {return fPadDimensions;} + /// Return position of the real area where to draw TVector2 GetRealPosition() const{return fRealPosition;} + /// Return dimensions of the real area where to draw TVector2 GetRealDimensions() const{return fRealDimensions;} + /// Return color to use Int_t GetColor() const {return fColor;} //methods @@ -48,24 +83,28 @@ class AliMpGraphContext : public TObject TVector2 &padDimensions) const; void SetPadPosForReal(const TVector2 &position,const TVector2 &dimensions); + protected: + AliMpGraphContext(const AliMpGraphContext& right); + AliMpGraphContext& operator = (const AliMpGraphContext& right); + private: //private constructor (not instanciable from outside) AliMpGraphContext(); - // static data members - static AliMpGraphContext *fgInstance; // the global instance - static GraphContextVector fgStack; // the object stack + ///< static data members + static AliMpGraphContext *fgInstance; ///< the global instance + static GraphContextVector fgStack; ///< the object stack #ifdef WITH_ROOT - static Int_t fgStackSize; // the object stack size + static Int_t fgStackSize; ///< the object stack size #endif //data members - Int_t fColor; // color to use - TVector2 fPadPosition; // Position of the pad area where to draw - TVector2 fPadDimensions; // Dimensions of the pad area where to draw + Int_t fColor; ///< color to use + TVector2 fPadPosition; ///< Position of the pad area where to draw + TVector2 fPadDimensions; ///< Dimensions of the pad area where to draw - TVector2 fRealPosition; // Position of the real area to draw - TVector2 fRealDimensions; // Dimensions of the real area to draw + TVector2 fRealPosition; ///< Position of the real area to draw + TVector2 fRealDimensions; ///< Dimensions of the real area to draw ClassDef(AliMpGraphContext,1) // Correspondance pad area/real world };