| 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 |
|
|---|
| 19 | class 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 |
|
|---|
| 30 | protected:
|
|---|
| 31 | TString *fName; //! parameter container identifier (name)
|
|---|
| 32 | TString *fTitle; //! parameter container title
|
|---|
| 33 |
|
|---|
| 34 | public:
|
|---|
| 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() { delete fName; delete fTitle; }
|
|---|
| 40 | virtual Int_t Compare(TObject *obj);
|
|---|
| 41 | virtual void Copy(TObject &named);
|
|---|
| 42 | virtual void FillBuffer(char *&buffer);
|
|---|
| 43 | virtual const char *GetName() const {return fName->Data();}
|
|---|
| 44 | virtual const char *GetTitle() const {return fTitle->Data();}
|
|---|
| 45 | virtual ULong_t Hash() { return fName->Hash(); }
|
|---|
| 46 | virtual Bool_t IsSortable() const { return kTRUE; }
|
|---|
| 47 | virtual void SetName(const char *name); // *MENU*
|
|---|
| 48 | virtual void SetObject(const char *name, const char *title);
|
|---|
| 49 | virtual void SetTitle(const char *title=""); // *MENU*
|
|---|
| 50 | virtual void ls(Option_t *option="");
|
|---|
| 51 | virtual void Print(Option_t *option="");
|
|---|
| 52 | virtual Int_t Sizeof() const;
|
|---|
| 53 |
|
|---|
| 54 | ClassDef(MParContainer, 1) //The basis for all parameter containers
|
|---|
| 55 | };
|
|---|
| 56 |
|
|---|
| 57 | #endif
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|