GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4MbsSourceParameter.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
22
25{
26}
27
31
32void TGo4MbsSourceParameter::Print(Option_t *) const
33{
35 TGo4Status::PrintLine(" Startevent: \t%d",GetStartEvent());
36 TGo4Status::PrintLine(" Stopevent: \t%d" ,GetStopEvent());
37 TGo4Status::PrintLine(" Event interval: \t%d", GetEventInterval());
38 if (GetPort()>0)
39 TGo4Status::PrintLine(" Server port: \t%d",GetPort());
40 if (GetRetryCnt()>0)
41 TGo4Status::PrintLine(" Retry cnt: \t%d",GetRetryCnt());
42}
43
45{
46 if(rhs && rhs->InheritsFrom(TGo4MbsSourceParameter::Class())) {
47 auto mbspar = dynamic_cast<TGo4MbsSourceParameter*>(rhs);
48 if(!mbspar) return kFALSE;
49 if(!TGo4EventSourceParameter::UpdateFrom(rhs)) return kFALSE;
50 SetStartEvent(mbspar->GetStartEvent());
51 SetStopEvent(mbspar->GetStopEvent());
52 SetEventInterval(mbspar->GetEventInterval());
53 SetPort(mbspar->GetPort());
54 SetRetryCnt(mbspar->GetRetryCnt());
55 return kTRUE;
56 }
57 return kFALSE;
58}
void Print(Option_t *opt="") const override
Bool_t UpdateFrom(TGo4Parameter *rhs) override
update contents of parameter class with external object.
void SetStartEvent(UInt_t firstindex)
Define the Start index for the NextEvent.
void SetPort(Int_t port)
Set optional port number, 0 or negative value means that default port number will be used.
Int_t GetPort() const
Return optional port number, 0 or negative value means that default port number will be used.
UInt_t GetEventInterval() const
Returns event interval.
UInt_t GetStopEvent() const
Returns the index of Stop event.
Int_t GetRetryCnt() const
Return allowed number of reconnection retries.
void SetStopEvent(UInt_t lastindex)
Define the index of Stop event.
Bool_t UpdateFrom(TGo4Parameter *rhs) override
update contents of parameter class with external object.
void SetRetryCnt(Int_t cnt)
Set number of allowed reconnection retries.
UInt_t GetStartEvent() const
Returns the Start index for the NextEvent.
void Print(Option_t *opt="") const override
basic method to printout object
void SetEventInterval(UInt_t skipinterval)
Defines event interval.
static void PrintLine(const char *text,...)
Print single line of debug output with appropriate indent.