GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
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 
14 #include "TGo4MbsSourceParameter.h"
15 
16 #include "TGo4Status.h"
17 
19  TGo4EventSourceParameter("MbsSource", 0)
20 {
21 }
22 
24  TGo4EventSourceParameter(name, id)
25 {
26 }
27 
29 {
30 }
31 
32 void 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 SetStartEvent(UInt_t firstindex)
void SetStopEvent(UInt_t lastindex)
Bool_t UpdateFrom(TGo4Parameter *rhs) override
Bool_t UpdateFrom(TGo4Parameter *rhs) override
void SetEventInterval(UInt_t skipinterval)
static void PrintLine(const char *text,...)
Definition: TGo4Status.cxx:101
void Print(Option_t *opt="") const override
void Print(Option_t *opt="") const override