Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4StatusBase/TGo4Parameter.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4Parameter.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "TClass.h"
00021 #include "Go4Log/TGo4Log.h"
00022 
00023 TGo4Parameter::TGo4Parameter(const char* name)
00024    : TNamed(name, "This is a Go4 Parameter Object")
00025 {
00026    TRACE((12,"TGo4Parameter ::TGo4Parameter (Text_t*)",__LINE__, __FILE__));
00027 
00028 }
00029 
00030 TGo4Parameter::TGo4Parameter(const char* name, const char* title)
00031    : TNamed(name, title)
00032 {
00033    TRACE((12,"TGo4Parameter ::TGo4Parameter (Text_t*, Text_t*)",__LINE__, __FILE__));
00034 
00035 }
00036    
00037 void TGo4Parameter::Print(Option_t* dummy) const
00038 {
00039    // this trick is needed since root defines Print as const function...
00040    TGo4Parameter* const localthis= const_cast<TGo4Parameter* const>(this);
00041    localthis->PrintParameter();
00042 }
00043 
00044 Int_t TGo4Parameter::PrintParameter(Text_t* buffer, Int_t buflen)
00045 {
00046    TRACE((12,"TGo4Parameter ::PrintParameter()",__LINE__, __FILE__));
00047    //
00048    if(buflen<=0 && buffer!=0)
00049       return 0;
00050    Int_t locallen=2048;
00051    Text_t localbuf[locallen];
00052    Int_t size=0;
00053    size=snprintf(localbuf, locallen-1,
00054                      " Parameter Class %s, name: %s \n",
00055                         ClassName(), GetName());
00056    if(buffer==0)
00057       {
00058           cout << localbuf << endl;
00059       }
00060    else
00061       {
00062          if(size>buflen-1)
00063             size=buflen-1;
00064          strncpy(buffer,localbuf,size);
00065       }
00066    return size;
00067 }
00068 
00069 TGo4Parameter::~TGo4Parameter()
00070 {
00071    TRACE((12,"TGo4Parameter ::~TGo4Parameter ()",__LINE__, __FILE__));
00072 }
00073 
00074 TGo4Parameter::TGo4Parameter()
00075 {
00076 }
00077 
00078 Bool_t TGo4Parameter::UpdateFrom(TGo4Parameter* rhs)
00079 {
00080    if(rhs) return kFALSE;
00081    // this method should better be pure virtual.
00082    // however, we have to implement dummy for root
00083    // to let it clone and stream this with baseclass type
00084    cout << "GO4> !!! ERROR: TGo4Parameter::UpdateFrom() not implemented!!!" << endl;
00085    cout << "GO4> Please overwrite virtual method in your class: ";
00086    cout << this->IsA()->GetName() << endl;
00087    return kFALSE;
00088 }
00089 
00090 void TGo4Parameter::Clear(Option_t* opt)
00091 {
00092  // dummy clear, may be implemented by user
00093   cout << "GO4> !!! ERROR: TGo4Parameter::Clear() not implemented!!!" << endl;
00094   cout << "GO4> Please overwrite virtual method in your class: ";
00095   cout << this->IsA()->GetName() << endl;
00096 }
00097 
00098 ClassImp(TGo4Parameter)
00099 
00100 
00101 
00102 
00103 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:05 2005 for Go4-v2.10-5 by doxygen1.2.15