source: trunk/MagicSoft/Mars/mbase/MParContainer.h@ 596

Last change on this file since 596 was 527, checked in by magicsol, 24 years ago
The delete statements in the destructor have been removed to avoid the camera program crashes when it assigns classes. which are inherited from MParContainer, to branches.
File size: 2.1 KB
Line 
1#ifndef MPARCONTAINER_H
2#define MPARCONTAINER_H
3
4//////////////////////////////////////////////////////////////////////////
5// //
6// MParContainer //
7// //
8// The basis for all parameter containers //
9// //
10//////////////////////////////////////////////////////////////////////////
11
12#ifndef ROOT_TObject
13#include <TObject.h>
14#endif
15#ifndef ROOT_TString
16#include <TString.h>
17#endif
18
19class MParContainer : public TObject
20{
21private:
22 void Init(const char *name, const char *title)
23 {
24 fName = new TString;
25 (*fName) = name;
26 fTitle = new TString;
27 (*fTitle) = title;
28 }
29
30protected:
31 TString *fName; //! parameter container identifier (name)
32 TString *fTitle; //! parameter container title
33
34public:
35 MParContainer(const char *name="", const char *title="") { Init(name, title); }
36 MParContainer(const TString &name, const TString &title) { Init(name, title); }
37 MParContainer(const MParContainer &named);
38 MParContainer& operator=(const MParContainer& rhs);
39 virtual ~MParContainer() {
40 //delete fName; delete fTitle;
41 }
42 virtual Int_t Compare(TObject *obj);
43 virtual void Copy(TObject &named);
44 virtual void FillBuffer(char *&buffer);
45 virtual const char *GetName() const {return fName->Data();}
46 virtual const char *GetTitle() const {return fTitle->Data();}
47 virtual ULong_t Hash() { return fName->Hash(); }
48 virtual Bool_t IsSortable() const { return kTRUE; }
49 virtual void SetName(const char *name); // *MENU*
50 virtual void SetObject(const char *name, const char *title);
51 virtual void SetTitle(const char *title=""); // *MENU*
52 virtual void ls(Option_t *option="");
53 virtual void Print(Option_t *option="");
54 virtual Int_t Sizeof() const;
55
56 ClassDef(MParContainer, 1) //The basis for all parameter containers
57};
58
59#endif
60
61
Note: See TracBrowser for help on using the repository browser.