GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4Parameter.h
Go to the documentation of this file.
1// $Id$
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 fuer 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
19class TObjArray;
20class TDataMember;
22
28
29class TGo4Parameter : public TNamed {
30 public:
31
33
34 TGo4Parameter(const char *name, const char *title = "This is a Go4 Parameter Object");
35
36 virtual ~TGo4Parameter();
37
42 virtual Int_t PrintParameter(Text_t *buffer = nullptr, Int_t buflen = 0);
43
44 void Print(Option_t *opt = "") const override;
45
48 virtual Bool_t UpdateFrom(TGo4Parameter *rhs);
49
51 Bool_t UpdateFromUrl(const char *rest_url_opt);
52
56 virtual Bool_t CustomUpdateFrom() const { return kTRUE; }
57
58 /* We overwrite the default TNamed::Clear that would
59 * erase our name and title!
60 * Implement this method in your parameter class
61 * if you would like to reset any values with the
62 * eraser button in the gui remote browser*/
63 void Clear(Option_t *opt = "") override;
64
65 void GetMemberValues(TObjArray *fItems);
66 Bool_t SetMemberValues(TObjArray *fItems);
67
72 void SavePrimitive(std::ostream &fs, Option_t *opt= "") override;
73
76
78 Bool_t SetStatus(TGo4ParameterStatus *status);
79
80 protected:
81
82 void GetMemberValues(TObjArray *fItems, TClass *cl, char *ptr, unsigned long int cloffset);
83
84 Bool_t SetMemberValues(TObjArray *items, Int_t &itemsindx, TClass *cl, char *ptr, unsigned long int cloffset);
85
86 Int_t FindArrayLength(TObjArray *items, Int_t &itemsindx, TDataMember *member);
87
88 ClassDefOverride(TGo4Parameter,1)
89};
90
91#endif //TGO4PARAMETER_H
Status object for an analysis parameter.
Base class for all parameter aggregations, e.g.
Int_t FindArrayLength(TObjArray *items, Int_t &itemsindx, TDataMember *member)
void Print(Option_t *opt="") const override
virtual Bool_t UpdateFrom(TGo4Parameter *rhs)
Update contents of parameter class with external object.
void GetMemberValues(TObjArray *fItems)
virtual Int_t PrintParameter(Text_t *buffer=nullptr, Int_t buflen=0)
DEPRECATED!
void SavePrimitive(std::ostream &fs, Option_t *opt="") override
Standard way to store parameter in form of macro,.
Bool_t UpdateFromUrl(const char *rest_url_opt)
Method used by HTTP server to update some fields, specified in URL syntax.
virtual ~TGo4Parameter()
TGo4ParameterStatus * CreateStatus()
Creates parameter status object.
void Clear(Option_t *opt="") override
Bool_t SetMemberValues(TObjArray *fItems)
Bool_t SetStatus(TGo4ParameterStatus *status)
Set status object - apply member values to the parameter.
virtual Bool_t CustomUpdateFrom() const
Specifies, if user implement UpdateFrom() method and it should be used when parameter updated from ot...