From 27db2029103775b3ad3cdeb9e9606a1ebf0dece2 Mon Sep 17 00:00:00 2001 From: mtadel Date: Mon, 10 Jul 2006 17:45:27 +0000 Subject: [PATCH] Changed inheritance order (RenderElement base comes first). --- EVE/Alieve/ITSModule.cxx | 31 +++++++++++++++++++------------ EVE/Alieve/ITSModule.h | 9 ++++----- EVE/Alieve/MUONModule.cxx | 12 +++++++++++- EVE/Alieve/MUONModule.h | 6 +++--- EVE/Alieve/TPCSectorViz.cxx | 2 +- EVE/Alieve/TPCSectorViz.h | 6 ++++-- 6 files changed, 42 insertions(+), 24 deletions(-) diff --git a/EVE/Alieve/ITSModule.cxx b/EVE/Alieve/ITSModule.cxx index b00cb6f0d38..8f2714132d2 100644 --- a/EVE/Alieve/ITSModule.cxx +++ b/EVE/Alieve/ITSModule.cxx @@ -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 "); diff --git a/EVE/Alieve/ITSModule.h b/EVE/Alieve/ITSModule.h index 618f522eece..d8dc5cf5390 100644 --- a/EVE/Alieve/ITSModule.h +++ b/EVE/Alieve/ITSModule.h @@ -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; diff --git a/EVE/Alieve/MUONModule.cxx b/EVE/Alieve/MUONModule.cxx index b63d68dd955..f552732e786 100644 --- a/EVE/Alieve/MUONModule.cxx +++ b/EVE/Alieve/MUONModule.cxx @@ -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) { diff --git a/EVE/Alieve/MUONModule.h b/EVE/Alieve/MUONModule.h index 4110d2d58ad..6602cdd4c01 100644 --- a/EVE/Alieve/MUONModule.h +++ b/EVE/Alieve/MUONModule.h @@ -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(); diff --git a/EVE/Alieve/TPCSectorViz.cxx b/EVE/Alieve/TPCSectorViz.cxx index 028ebd24e94..466856561c0 100644 --- a/EVE/Alieve/TPCSectorViz.cxx +++ b/EVE/Alieve/TPCSectorViz.cxx @@ -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), diff --git a/EVE/Alieve/TPCSectorViz.h b/EVE/Alieve/TPCSectorViz.h index a2e75e2bf6a..20b247fb2c4 100644 --- a/EVE/Alieve/TPCSectorViz.h +++ b/EVE/Alieve/TPCSectorViz.h @@ -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; -- 2.43.0