GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Parameter.h
Go to the documentation of this file.
1 // $Id: TGo4Parameter.h 1440 2015-05-21 15:38:17Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4PARAMETER_H
15 #define TGO4PARAMETER_H
16 
17 #include "TNamed.h"
18 #include "Riostream.h"
19 
20 class TObjArray;
21 class TIterator;
22 class TDataMember;
24 
30 class TGo4Parameter : public TNamed {
31  public:
32 
33  TGo4Parameter();
34 
35  TGo4Parameter(const char* name, const char* title = "This is a Go4 Parameter Object");
36 
37  virtual ~TGo4Parameter();
38 
41  virtual Int_t PrintParameter(Text_t* buffer=0, Int_t buflen=0);
42 
43  virtual void Print(Option_t* dummy="") const;
44 
47  virtual Bool_t UpdateFrom(TGo4Parameter* rhs);
48 
50  Bool_t UpdateFromUrl(const char* rest_url_opt);
51 
55  virtual Bool_t CustomUpdateFrom() const { return kTRUE; }
56 
57  /* We overwrite the default TNamed::Clear that would
58  * erase our name and title!
59  * Implement this method in your parameter class
60  * if you would like to reset any values with the
61  * eraser button in the gui remote browser*/
62  virtual void Clear(Option_t* opt="");
63 
64  void GetMemberValues(TObjArray* fItems);
65  Bool_t SetMemberValues(TObjArray* fItems);
66 
70  virtual void SavePrimitive(std::ostream& fs, Option_t* opt= "");
71 
74 
76  Bool_t SetStatus(TGo4ParameterStatus* status);
77 
78  protected:
79 
80  void GetMemberValues(TObjArray* fItems, TClass* cl, char* ptr, unsigned long int cloffset);
81 
82  Bool_t SetMemberValues(TObjArray* items, Int_t& itemsindx, TClass* cl, char* ptr, unsigned long int cloffset);
83 
84  Int_t FindArrayLength(TObjArray* items, Int_t& itemsindx, TDataMember* member);
85 
86  ClassDef(TGo4Parameter,1)
87 };
88 
89 #endif //TGO4PARAMETER_H
TGo4ParameterStatus * CreateStatus()
virtual ~TGo4Parameter()
Int_t FindArrayLength(TObjArray *items, Int_t &itemsindx, TDataMember *member)
virtual void SavePrimitive(std::ostream &fs, Option_t *opt="")
virtual Int_t PrintParameter(Text_t *buffer=0, Int_t buflen=0)
virtual void Clear(Option_t *opt="")
virtual void Print(Option_t *dummy="") const
Bool_t UpdateFromUrl(const char *rest_url_opt)
Bool_t SetMemberValues(TObjArray *fItems)
virtual Bool_t UpdateFrom(TGo4Parameter *rhs)
virtual Bool_t CustomUpdateFrom() const
Definition: TGo4Parameter.h:55
Bool_t SetStatus(TGo4ParameterStatus *status)
void GetMemberValues(TObjArray *fItems)