GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4EventStoreParameter.cxx
Go to the documentation of this file.
1 // $Id: TGo4EventStoreParameter.cxx 999 2013-07-25 11:58:59Z linev $
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 für 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 "TGo4Log.h"
18 
20 {
21  GO4TRACE((12,"TGo4EventStoreParameter::~TGo4EventStoreParameter()",__LINE__, __FILE__));
22 }
24 : TGo4Parameter (name), fiID(id)
25 {
26  GO4TRACE((12,"TGo4EventStoreParameter::TGo4EventStoreParameter(const char*)",__LINE__, __FILE__));
27 }
29 : TGo4Parameter ("Default Event Store Parameter"), fiID(0)
30 {
31  GO4TRACE((12,"TGo4EventStoreParameter::TGo4EventStoreParameter()",__LINE__, __FILE__));
32 }
33 Int_t TGo4EventStoreParameter::PrintParameter(Text_t* buffer, Int_t buflen)
34 {
35  GO4TRACE((12,"TGo4EventStoreParameter::PrintParameter()",__LINE__, __FILE__));
36  Int_t locallen=64000;
37  Text_t localbuf[64000];
38  if(buflen<0 && buffer!=0)
39  return 0;
40  Int_t size=0;
41  Int_t restlen=locallen;
42  Text_t* current=localbuf;
43  current=TGo4Status::PrintIndent(current,restlen);
44  TString woparam=ClassName();
45  woparam.ReplaceAll("Parameter","");
46  current=TGo4Status::PrintBuffer(current,restlen, "Eventstore: \t\t%s \n",woparam.Data());
47  current=TGo4Status::PrintIndent(current,restlen);
48  current=TGo4Status::PrintBuffer(current,restlen, " Name: \t\t%s \n",GetName());
49 // current=TGo4Status::PrintIndent(current,restlen);
50 // current=TGo4Status::PrintBuffer(current,restlen, " ID: \t\t%d \n",GetID());
51  if(buffer==0)
52  {
53  std::cout << localbuf << std::endl;
54  }
55  else
56  {
57  size=locallen-restlen;
58  if(size>buflen-1)
59  size=buflen-1;
60  strncpy(buffer,localbuf,size);
61  }
62  return size;
63 }
64 
66 {
67  GO4TRACE((12,"TGo4EventStoreParameter::UpdateFrom()",__LINE__, __FILE__));
68  TGo4EventStoreParameter* storpar=dynamic_cast<TGo4EventStoreParameter*>(rhs);
69  if (storpar==0) return kFALSE;
70  SetName(storpar->GetName());
71  fiID=storpar->GetID();
72  return kTRUE;
73 }
static Text_t * PrintIndent(Text_t *buffer, Int_t &buflen)
Definition: TGo4Status.cxx:72
virtual Bool_t UpdateFrom(TGo4Parameter *rhs)
#define GO4TRACE(X)
Definition: TGo4Log.h:26
virtual Int_t PrintParameter(Text_t *buffer=0, Int_t buflen=0)
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)
Definition: TGo4Status.cxx:85