Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4PARAMETERMEMBER_H
00015 #define TGO4PARAMETERMEMBER_H
00016
00017 #include "TNamed.h"
00018
00019 class TGo4ParameterMember : public TNamed {
00020 public:
00021
00022 enum { kTString_t = 10001, kTGo4Fitter_t = 10002, kTArray_t = 10003 };
00023
00024 TGo4ParameterMember();
00025 TGo4ParameterMember(const char* name, const char* title);
00026 virtual ~TGo4ParameterMember();
00027
00028 void SetType(const char* name, Int_t id) { fTypeName = name; fTypeId = id; }
00029 const char* GetTypeName() const { return fTypeName.Data(); }
00030 Int_t GetTypeId() const { return fTypeId; }
00031 Bool_t IsFitterItem() const { return GetTypeId()==kTGo4Fitter_t; }
00032
00033 void SetMemberId(Int_t id) { fMemberId = id; }
00034 Int_t GetMemberId() const { return fMemberId; }
00035
00036 void SetStrValue(const char* value) { fValue = value; }
00037 void SetIntValue(Int_t value) { fValue.Form("%d", value); }
00038 const char* GetStrValue() const { return fValue.Data(); }
00039 Int_t GetIntValue() const { return fValue.Atoi(); };
00040 Bool_t CanStrEdit() const { return (fTypeId!=kTGo4Fitter_t) && (fTypeId!=kTArray_t); }
00041
00042 void SetArrayIndexes(Int_t ndim=0, Int_t indx1 = -1, Int_t indx2 = -1);
00043 Bool_t CheckArrayIndexes(Int_t ndim, Int_t indx1, Int_t indx2);
00044 Bool_t IsArrayItem() const { return (fIndex1>=0); }
00045 const char* GetFullName(TString& buf);
00046
00047 void SetVisible(Bool_t on = kTRUE) { fVisible = on; }
00048 Bool_t IsVisible() const { return fVisible; }
00049
00050 TObject* GetObject() const { return fObject; }
00051 void SetObject(TObject* obj, Bool_t owner);
00052
00053 void SetValue(char* addr);
00054 void GetValue(char* addr);
00055
00056 void SetToZero();
00057 Int_t PrintMember(Text_t* buffer = 0, Int_t buflen = 0) const;
00058
00059 virtual void Clear(Option_t* opt="");
00060
00061 virtual void Print(Option_t* dummy="") const;
00062
00063 protected:
00064
00065 TString fTypeName;
00066 Int_t fTypeId;
00067 Int_t fMemberId;
00068 TString fValue;
00069 Int_t fIndex1;
00070 Int_t fIndex2;
00071 TObject* fObject;
00072 Bool_t fObjectOwner;
00073 Bool_t fVisible;
00074
00075 ClassDef(TGo4ParameterMember, 1);
00076 };
00077
00078
00079 #endif