GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4UserSourceParameter.cxx
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
15
16#include "TGo4Status.h"
17#include "Go4EventServerTypes.h"
18
19TGo4UserSourceParameter::TGo4UserSourceParameter(const char *name, const char *expr, Int_t port)
21{
22}
23
28
32
33void TGo4UserSourceParameter::Print(Option_t *) const
34{
36 if (GetPort() > 0)
37 TGo4Status::PrintLine(" Port %d", GetPort());
38 TGo4Status::PrintLine(" Expression: %s", GetExpression());
39}
40
42{
43 if(rhs && rhs->InheritsFrom(TGo4UserSourceParameter::Class())) {
44 auto userpar = dynamic_cast<TGo4UserSourceParameter*>(rhs);
45 if(!userpar) return kFALSE;
46 if(!TGo4EventSourceParameter::UpdateFrom(rhs)) return kFALSE;
47 SetPort(userpar->GetPort());
48 SetExpression(userpar->GetExpression());
49 return kTRUE;
50 }
51 return kFALSE;
52}
53
@ GO4EV_USER
void Print(Option_t *opt="") const override
Bool_t UpdateFrom(TGo4Parameter *rhs) override
update contents of parameter class with external object.
static void PrintLine(const char *text,...)
Print single line of debug output with appropriate indent.
const char * GetExpression() const
User expression as string.
Bool_t UpdateFrom(TGo4Parameter *rhs) override
update contents of parameter class with external object.
TString fxExpression
Any user defined expression as string.
void SetExpression(const char *name)
void Print(Option_t *opt="") const override