]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changed inheritance order (RenderElement base comes first).
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jul 2006 17:45:27 +0000 (17:45 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jul 2006 17:45:27 +0000 (17:45 +0000)
EVE/Alieve/ITSModule.cxx
EVE/Alieve/ITSModule.h
EVE/Alieve/MUONModule.cxx
EVE/Alieve/MUONModule.h
EVE/Alieve/TPCSectorViz.cxx
EVE/Alieve/TPCSectorViz.h

index b00cb6f0d3827a338fe530704c17b4b7ba32b859..8f2714132d27a68fa733bdc810e0d4d3d834f38f 100644 (file)
@@ -19,22 +19,22 @@ ClassImp(ITSModule)
 
 /**************************************************************************/
 
-void ITSModule::Init()
-{
-  fTrans = false;
-  fID   = -1;
-  fInfo = 0;
-}
-
-/**************************************************************************/
+ITSModule::ITSModule(const Text_t* n, const Text_t* t, Color_t col) :
+  Reve::RenderElement(fFrameColor),
+  QuadSet(n, t),
+  fInfo  (0),
+  fDetID (-1),
+  fFrameColor(col)
+{}
 
 ITSModule::ITSModule(Int_t id, ITSDigitsInfo* info, Color_t col) :
-  QuadSet(Form("ITS module %d", id)), Reve::RenderElement(fFrameColor),
+  Reve::RenderElement(fFrameColor),
+  QuadSet(Form("ITS module %d", id)),
+  fInfo  (0),
+  fDetID (-1),
   fFrameColor(col)
 {
-  Init();
-  
-  fInfo = info;
+  SetDigitsInfo(info);
   SetID(id);
 }
 
@@ -55,6 +55,13 @@ void ITSModule::SetMainColor(Color_t col)
 
 /**************************************************************************/
 
+void ITSModule::SetDigitsInfo(ITSDigitsInfo* info)
+{
+  if(fInfo) fInfo->DecRefCount();
+  fInfo = info;
+  if(fInfo) fInfo->IncRefCount();
+}
+
 void ITSModule::SetID(Int_t id)
 {
   static const Exc_t eH("ITSModule::SetID ");
index 618f522eece76824051a1d474f619e2f396d7be2..d8dc5cf5390fede971aefc1f5ce4e2c46c396406 100644 (file)
@@ -8,10 +8,10 @@
 
 namespace Alieve {
 
-class ITSModule : public Reve::QuadSet, public Reve::RenderElement
+class ITSModule : public Reve::RenderElement,
+                  public Reve::QuadSet
 {
 private:
-  void Init();
   void LoadQuads();
 
 protected:
@@ -34,15 +34,14 @@ protected:
   Color_t     fFrameColor;
 
 public:
-  ITSModule(const Text_t* n="ITSModule", const Text_t* t=0, Color_t col=2) :
-    QuadSet(n, t), Reve::RenderElement(fFrameColor), fFrameColor(col)
-  { Init(); }
+  ITSModule(const Text_t* n="ITSModule", const Text_t* t=0, Color_t col=2);
   ITSModule(Int_t id, ITSDigitsInfo* info, Color_t col=2);
   virtual ~ITSModule();
 
   virtual Bool_t CanEditMainColor()  { return true; }
   virtual void SetMainColor(Color_t col);
 
+  virtual void SetDigitsInfo(ITSDigitsInfo* info);
   virtual void SetID(Int_t id);
   virtual void Print(Option_t* opt="") const;
 
index b63d68dd955702726cca8e48803ac80e3c1c1842..f552732e78690593c431dd4ae82971ea9bfbc7bd 100644 (file)
@@ -48,8 +48,18 @@ void MUONModule::Init()
 }
 
 /**************************************************************************/
+
+MUONModule::MUONModule(const Text_t* n, const Text_t* t, Color_t col) :
+  Reve::RenderElement(fFrameCol),
+  QuadSet(n, t),
+  fFrameCol(col)
+{
+  Init();
+}
+
 MUONModule::MUONModule(Int_t id, Int_t cath, MUONDigitsInfo* info, Bool_t dig, Bool_t clus, Color_t col ) :
-  QuadSet(Form("M-DetElemId %d C%1d",id,cath)), Reve::RenderElement(fFrameCol),
+  Reve::RenderElement(fFrameCol),
+  QuadSet(Form("M-DetElemId %d C%1d",id,cath)),
   fFrameCol(col)
 {
 
index 4110d2d58ad5773710833465b0f3dcbc386fb939..6602cdd4c01e6b03ec3d9acab54dd2b2eb60c02e 100644 (file)
@@ -8,13 +8,13 @@
 
 namespace Alieve {
 
-class MUONModule : public Reve::QuadSet, public Reve::RenderElement
+class MUONModule : public Reve::RenderElement,
+                   public Reve::QuadSet
 {
 
 public:
 
-  MUONModule(const Text_t* n="MUONModule", const Text_t* t=0, Color_t col=2) : QuadSet(n, t), Reve::RenderElement(fFrameCol), fFrameCol(col)
-       { Init(); }
+  MUONModule(const Text_t* n="MUONModule", const Text_t* t=0, Color_t col=2);
   MUONModule(Int_t id, Int_t cath, MUONDigitsInfo* info, Bool_t dig, Bool_t clus, Color_t col=2);
   virtual ~MUONModule();
 
index 028ebd24e9482943a366d8ef8547d8260151f328..466856561c0225dca8f2a3d51fa8c30af1301d0a 100644 (file)
@@ -23,8 +23,8 @@ ClassImp(TPCSectorViz)
 /**************************************************************************/
 
 TPCSectorViz::TPCSectorViz(const Text_t* n, const Text_t* t) :
-  TNamed(n, t),
   Reve::RenderElement(fFrameColor),
+  TNamed(n, t),
 
   fTPCData  (0),
   fSectorID (0),
index a2e75e2bf6a0dec56c7ccec00de117481113eace..20b247fb2c4d8ebc834598bfa934191ca4767cc7 100644 (file)
@@ -18,8 +18,10 @@ class TPCSectorVizEditor;
 class TPCSector2D;  class TPCSector2DEditor;  class TPCSector2DGL;
 class TPCSector3D;  class TPCSector3DEditor;  class TPCSector3DGL;
 
-class TPCSectorViz : public TNamed, public TAtt3D, public TAttBBox,
-                     public Reve::RenderElement
+class TPCSectorViz : public Reve::RenderElement,
+                     public TNamed,
+                     public TAtt3D,
+                     public TAttBBox
 {
   friend class TPCSectorVizEditor;
   friend class TPCSector2D;