Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4EventProcessorParameter.h"
00015
00016 #include "TGo4Status.h"
00017 #include "TGo4Log.h"
00018
00019 TGo4EventProcessorParameter::TGo4EventProcessorParameter(const char* name, Int_t id)
00020 : TGo4Parameter (name), fiID(id)
00021 {
00022 GO4TRACE((12,"TGo4EventProcessorParameter::TGo4EventProcessorParameter(const char*)",__LINE__, __FILE__));
00023 }
00024
00025 TGo4EventProcessorParameter::TGo4EventProcessorParameter()
00026 : TGo4Parameter ("Default Event Processor Parameter"), fiID(0)
00027 {
00028 GO4TRACE((12,"TGo4EventProcessorParameter::TGo4EventProcessorParameter()",__LINE__, __FILE__));
00029 }
00030
00031 TGo4EventProcessorParameter::~TGo4EventProcessorParameter()
00032 {
00033 GO4TRACE((12,"TGo4EventProcessorParameter::~TGo4EventProcessorParameter()",__LINE__, __FILE__));
00034 }
00035
00036 Int_t TGo4EventProcessorParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00037 {
00038 GO4TRACE((12,"TGo4EventProcessorParameter::PrintParameter()",__LINE__, __FILE__));
00039 Int_t locallen=64000;
00040 Text_t localbuf[64000];
00041 if(buflen<0 && buffer!=0)
00042 return 0;
00043 Int_t size=0;
00044 Int_t restlen=locallen;
00045 Text_t* current=localbuf;
00046 current=TGo4Status::PrintIndent(current,restlen);
00047 current=TGo4Status::PrintBuffer(current,restlen, "EventProcessor: %s \n",ClassName());
00048 current=TGo4Status::PrintIndent(current,restlen);
00049 current=TGo4Status::PrintBuffer(current,restlen, " Name: \t%s \n",GetName());
00050
00051
00052 if(buffer==0)
00053 {
00054 std::cout << localbuf << std::endl;
00055 }
00056 else
00057 {
00058 size=locallen-restlen;
00059 if(size>buflen-1)
00060 size=buflen-1;
00061 strncpy(buffer,localbuf,size);
00062 }
00063 return size;
00064 }
00065
00066 Bool_t TGo4EventProcessorParameter::UpdateFrom(TGo4Parameter* rhs)
00067 {
00068 GO4TRACE((12,"TGo4EventProcessorParameter::UpdateFrom()",__LINE__, __FILE__));
00069 TGo4EventProcessorParameter* procpar=dynamic_cast<TGo4EventProcessorParameter*>(rhs);
00070 if(procpar==0) return kFALSE;
00071 SetName(procpar->GetName());
00072 fiID=procpar->GetID();
00073 return kTRUE;
00074 }