source: branches/start/MagicSoft/Mars/mbase/MParContainer.h@ 9223

Last change on this file since 9223 was 454, checked in by harald, 24 years ago
Import the first sources of the MAGIC Analysis and Reconstruction Software. T. Bretz and H. Kornmayer 20.December 2000
File size: 2.1 KB
Line 
1#ifndef MPARCONTAINER_H
2#define MPARCONTAINER_H
3
4//////////////////////////////////////////////////////////////////////////
5// //
6// TNamed //
7// //
8// The basis for a named object (name, title). //
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{
21 private:
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 protected:
30 TString *fName; //! object identifier
31 TString *fTitle; //! object title
32
33 public:
34 MParContainer(const char *name="", const char *title="") { Init(name, title); }
35 MParContainer(const TString &name, const TString &title) { Init(name, title); }
36 MParContainer(const MParContainer &named);
37 MParContainer& operator=(const MParContainer& rhs);
38 virtual ~MParContainer() { delete fName; delete fTitle; }
39 virtual Int_t Compare(TObject *obj);
40 virtual void Copy(TObject &named);
41 virtual void FillBuffer(char *&buffer);
42 virtual const char *GetName() const {return fName->Data();}
43 virtual const char *GetTitle() const {return fTitle->Data();}
44 virtual ULong_t Hash() { return fName->Hash(); }
45 virtual Bool_t IsSortable() const { return kTRUE; }
46 virtual void SetName(const char *name); // *MENU*
47 virtual void SetObject(const char *name, const char *title);
48 virtual void SetTitle(const char *title=""); // *MENU*
49 virtual void ls(Option_t *option="");
50 virtual void Print(Option_t *option="");
51 virtual Int_t Sizeof() const;
52
53 ClassDef(MParContainer, 1) //The basis for Parameter Containers
54};
55
56#endif
57
58
Note: See TracBrowser for help on using the repository browser.