- Timestamp:
- 05/25/08 11:42:34 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MClone.cc
r2206 r8899 66 66 // constructors. 67 67 // 68 void MClone::Init(const char *name, const char *title) 68 void MClone::Init(const char *name, const char *title) : fForceClone(kFALSE) 69 69 { 70 70 fName = name ? name : "MClone"; … … 160 160 Int_t MClone::Process() 161 161 { 162 // 163 // Delete an existing clone 164 // 162 if (fClone && !fForceClone) 163 { 164 fObject->Copy(*fClone); 165 return kTRUE; 166 } 167 165 168 Clear(); 166 169 167 //168 // Clone the given parameter container169 //170 170 fClone = fObject->Clone(); 171 return kTRUE; 172 } 171 173 172 return kTRUE;173 }174 -
trunk/MagicSoft/Mars/mbase/MClone.h
r2206 r8899 1 1 #ifndef MARS_MClone 2 2 #define MARS_MClone 3 4 #ifndef MARS_MAGIC5 #include "MAGIC.h"6 #endif7 3 8 4 #ifndef MARS_MTask … … 20 16 TObject* fClone; // pointer to the cloned object. deletion is handled by MClone 21 17 18 Bool_t fForceClone; 19 20 // MClone 22 21 void Init(const char *name, const char *title); 22 23 // MTask 24 Int_t PreProcess(MParList *pList); 25 Int_t Process(); 23 26 24 27 public: … … 27 30 ~MClone(); 28 31 29 Int_t PreProcess(MParList *pList);30 Int_t Process();32 // TObject 33 void Clear(Option_t *opt=NULL); 31 34 35 // MClone 32 36 TObject *GetClone() const { return fClone; } 33 37 const TObject *GetObject() const { return fObject; } 34 38 35 void Clear(Option_t *opt=NULL);39 void SetForceClone(Bool_t b=kTRUE) { fForceClone = b; } 36 40 37 41 ClassDef(MClone, 0) // Task to clone (duplicate) an object in memory -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8891 r8899 825 825 // to the corresponding TCanvas. If it isn't found NULL is returned. 826 826 // 827 TRootEmbeddedCanvas *MStatusDisplay::GetEmbeddedCanvas(TGCompositeFrame *cf) const828 { 829 TIter Next(cf ->GetList());827 TRootEmbeddedCanvas *MStatusDisplay::GetEmbeddedCanvas(TGCompositeFrame &cf) 828 { 829 TIter Next(cf.GetList()); 830 830 831 831 TGFrameElement *f; … … 843 843 // to the corresponding TCanvas. If it isn't found NULL is returned. 844 844 // 845 TCanvas *MStatusDisplay::GetCanvas(TGCompositeFrame *cf) const845 TCanvas *MStatusDisplay::GetCanvas(TGCompositeFrame &cf) 846 846 { 847 847 TRootEmbeddedCanvas *ec = GetEmbeddedCanvas(cf); … … 877 877 } 878 878 879 return GetCanvas( fTab->GetTabContainer(i));879 return GetCanvas(*fTab->GetTabContainer(i)); 880 880 } 881 881 … … 938 938 TObject *frame = f->fFrame; 939 939 if (frame->InheritsFrom(TGCompositeFrame::Class())) 940 return GetCanvas( (TGCompositeFrame*)frame);940 return GetCanvas(*(TGCompositeFrame*)frame); 941 941 } 942 942 … … 1113 1113 return; 1114 1114 1115 TCanvas *c=GetCanvas( f);1115 TCanvas *c=GetCanvas(*f); 1116 1116 if (!c) 1117 1117 return; … … 1315 1315 return; 1316 1316 1317 TRootEmbeddedCanvas *ec = GetEmbeddedCanvas( f);1317 TRootEmbeddedCanvas *ec = GetEmbeddedCanvas(*f); 1318 1318 if (!ec) 1319 1319 return; -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r8680 r8899 118 118 void AddLogTab(); 119 119 120 TCanvas *GetCanvas(TGCompositeFrame *f) const;121 122 120 Bool_t ProcessMessageCommandMenu(Long_t mp1); 123 121 Bool_t ProcessMessageCommand(Long_t submsg, Long_t mp1, Long_t mp2); … … 146 144 void RemoveTab(int i); 147 145 void SetStatusLine(const char *txt, Int_t idx); 148 149 TRootEmbeddedCanvas *GetEmbeddedCanvas(TGCompositeFrame *cf) const;150 146 151 147 Bool_t SaveAsImage(Int_t num, TString name, TImage::EImageFileTypes type); … … 274 270 void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected); 275 271 272 // Public helper functions 273 static TRootEmbeddedCanvas *GetEmbeddedCanvas(TGCompositeFrame &cf); 274 static TCanvas *GetCanvas(TGCompositeFrame &f); 275 276 276 ClassDef(MStatusDisplay, 0) // Window for a status display 277 277 };
Note:
See TracChangeset
for help on using the changeset viewer.