GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4MbsFileParameter.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 "TGo4MbsFileParameter.h"
15 
16 #include "TObjString.h"
17 
18 #include "TGo4Log.h"
19 #include "TGo4Status.h"
20 #include "Go4EventServerTypes.h"
21 
22 const char *TGo4MbsFile__fgcNOTAGFILE = "GO4-NOLMDTAG";
23 
26 {
28 }
29 
32 {
34 }
35 
37 {
38 }
39 
40 void TGo4MbsFileParameter::AddMoreFile(const char *more)
41 {
42  TGo4Log::Debug("Add more lmd file %s", more);
43 
44  fxMoreFiles.SetOwner(kTRUE);
45  fxMoreFiles.Add(new TObjString(more));
46 }
47 
48 const char *TGo4MbsFileParameter::GetMoreName(Int_t n) const
49 {
50  return (n >= 0) && (n <= fxMoreFiles.GetLast()) ? fxMoreFiles.At(n)->GetName() : nullptr;
51 }
52 
53 void TGo4MbsFileParameter::Print(Option_t *) const
54 {
56  TGo4Status::PrintLine("Tagfile: %s", GetTagName());
57 }
58 
60 {
61  if(rhs && rhs->InheritsFrom(TGo4MbsFileParameter::Class())) {
62  auto mbspar = dynamic_cast<TGo4MbsFileParameter*>(rhs);
63  if(!mbspar) return kFALSE;
64  if(!TGo4MbsSourceParameter::UpdateFrom(rhs)) return kFALSE;
65  SetTagName(mbspar->GetTagName());
66  return kTRUE;
67  }
68 
69  return kFALSE;
70 }
Bool_t UpdateFrom(TGo4Parameter *rhs) override
void Print(Option_t *opt="") const override
const char * TGo4MbsFile__fgcNOTAGFILE
const char * GetTagName() const
void SetTagName(const char *name)
static void Debug(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:281
void AddMoreFile(const char *more)
static void PrintLine(const char *text,...)
Definition: TGo4Status.cxx:101
void Print(Option_t *opt="") const override
const char * GetMoreName(Int_t n) const
Bool_t UpdateFrom(TGo4Parameter *rhs) override