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