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

/Go4EventServer/TGo4UserStoreParameter.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 "TGo4UserStoreParameter.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4StatusBase/TGo4Status.h"
00021 #include "Go4Log/TGo4Log.h"
00022 
00023 TGo4UserStoreParameter::TGo4UserStoreParameter(const char* name)
00024 : TGo4EventStoreParameter(name, GO4EV_USER)
00025 {
00026    SetTitle(name);
00027 }
00028 
00029 TGo4UserStoreParameter::TGo4UserStoreParameter()
00030 : TGo4EventStoreParameter("Default Go4 UserStore", GO4EV_USER)
00031 {
00032    SetTitle("Go4UserStore");
00033 }
00034 
00035 TGo4UserStoreParameter::~TGo4UserStoreParameter()
00036 {
00037 
00038 }
00039 
00040 Int_t TGo4UserStoreParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00041 {
00042  TRACE((12,"TGo4UserStoreParameter::PrintParameter()",__LINE__, __FILE__));
00043    Int_t locallen=128000;
00044    Text_t localbuf[locallen];
00045    if(buflen<0 && buffer!=0)
00046       return 0;
00047    Int_t size=0;
00048    Int_t restlen=locallen;
00049    Text_t* current=localbuf;
00050    Int_t delta=TGo4EventStoreParameter::PrintParameter(current,restlen);
00051    restlen-=delta;
00052    current+=delta;
00053    current=TGo4Status::PrintIndent(current,restlen);
00054    current=TGo4Status::PrintBuffer(current,restlen, "  Expression: %s\n",GetExpression());
00055    if(buffer==0)
00056       {
00057           cout << localbuf << endl;
00058       }
00059    else
00060       {
00061          size=locallen-restlen;
00062          if(size>buflen-1)
00063             size=buflen-1;
00064          strncpy(buffer,localbuf,size);
00065       }
00066    return size;
00067 }
00068 
00069 
00070 Bool_t TGo4UserStoreParameter::UpdateFrom(TGo4Parameter* rhs)
00071 {
00072    if(rhs && rhs->InheritsFrom("TGo4UserStoreParameter"))
00073       {
00074          TGo4UserStoreParameter* filepar=dynamic_cast<TGo4UserStoreParameter*>(rhs);
00075          if(!filepar) return kFALSE;
00076          if(!TGo4EventStoreParameter::UpdateFrom(rhs)) return kFALSE;
00077          return kTRUE;
00078       }
00079    else
00080       {
00081           return kFALSE;
00082       }
00083    return kFALSE;
00084 }
00085 
00086 ClassImp(TGo4UserStoreParameter)
00087 
00088 //----------------------------END OF GO4 SOURCE FILE ---------------------

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