00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #include "TGo4UserStoreParameter.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4Status.h"
00021 #include "TGo4Log.h"
00022 #include "Go4EventServerTypes.h"
00023 
00024 TGo4UserStoreParameter::TGo4UserStoreParameter(const char* name)
00025 : TGo4EventStoreParameter(name, GO4EV_USER)
00026 {
00027    SetTitle(name);
00028 }
00029 
00030 TGo4UserStoreParameter::TGo4UserStoreParameter()
00031 : TGo4EventStoreParameter("Default Go4 UserStore", GO4EV_USER)
00032 {
00033    SetTitle("Go4UserStore");
00034 }
00035 
00036 TGo4UserStoreParameter::~TGo4UserStoreParameter()
00037 {
00038 
00039 }
00040 
00041 Int_t TGo4UserStoreParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00042 {
00043  TRACE((12,"TGo4UserStoreParameter::PrintParameter()",__LINE__, __FILE__));
00044    Int_t locallen=128000;
00045    Text_t localbuf[128000];
00046    if(buflen<0 && buffer!=0)
00047       return 0;
00048    Int_t size=0;
00049    Int_t restlen=locallen;
00050    Text_t* current=localbuf;
00051    Int_t delta=TGo4EventStoreParameter::PrintParameter(current,restlen);
00052    restlen-=delta;
00053    current+=delta;
00054    current=TGo4Status::PrintIndent(current,restlen);
00055    current=TGo4Status::PrintBuffer(current,restlen, "  Expression: %s\n",GetExpression());
00056    if(buffer==0)
00057       {
00058           cout << localbuf << endl;
00059       }
00060    else
00061       {
00062          size=locallen-restlen;
00063          if(size>buflen-1)
00064             size=buflen-1;
00065          strncpy(buffer,localbuf,size);
00066       }
00067    return size;
00068 }
00069 
00070 
00071 Bool_t TGo4UserStoreParameter::UpdateFrom(TGo4Parameter* rhs)
00072 {
00073    TGo4UserStoreParameter* filepar=dynamic_cast<TGo4UserStoreParameter*>(rhs);
00074 
00075    if(filepar!=0)
00076       return TGo4EventStoreParameter::UpdateFrom(rhs);
00077 
00078    return kFALSE;
00079 }
00080 
00081