Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4EventStoreParameter.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4EventStoreParameter.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4Status.h"
00021 #include "TGo4Log.h"
00022 
00023 TGo4EventStoreParameter::~TGo4EventStoreParameter()
00024 {
00025    TRACE((12,"TGo4EventStoreParameter::~TGo4EventStoreParameter()",__LINE__, __FILE__));
00026 }
00027 TGo4EventStoreParameter::TGo4EventStoreParameter(const char* name, Int_t id)
00028 : TGo4Parameter (name), fiID(id)
00029 {
00030    TRACE((12,"TGo4EventStoreParameter::TGo4EventStoreParameter(Text_t*)",__LINE__, __FILE__));
00031 }
00032 TGo4EventStoreParameter::TGo4EventStoreParameter()
00033 : TGo4Parameter ("Default Event Store Parameter"), fiID(0)
00034 {
00035    TRACE((12,"TGo4EventStoreParameter::TGo4EventStoreParameter()",__LINE__, __FILE__));
00036 }
00037 Int_t TGo4EventStoreParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00038 {
00039    TRACE((12,"TGo4EventStoreParameter::PrintParameter()",__LINE__, __FILE__));
00040     Int_t locallen=64000;
00041    Text_t localbuf[64000];
00042    if(buflen<0 && buffer!=0)
00043       return 0;
00044    Int_t size=0;
00045    Int_t restlen=locallen;
00046    Text_t* current=localbuf;
00047    current=TGo4Status::PrintIndent(current,restlen);
00048    TString woparam=ClassName();
00049    woparam.ReplaceAll("Parameter","");
00050    current=TGo4Status::PrintBuffer(current,restlen, "Eventstore:  \t\t%s \n",woparam.Data());
00051    current=TGo4Status::PrintIndent(current,restlen);
00052    current=TGo4Status::PrintBuffer(current,restlen, "  Name:  \t\t%s \n",GetName());
00053 //   current=TGo4Status::PrintIndent(current,restlen);
00054 //   current=TGo4Status::PrintBuffer(current,restlen, "  ID:  \t\t%d \n",GetID());
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 Bool_t TGo4EventStoreParameter::UpdateFrom(TGo4Parameter* rhs)
00070 {
00071    TRACE((12,"TGo4EventStoreParameter::UpdateFrom()",__LINE__, __FILE__));
00072    TGo4EventStoreParameter* storpar=dynamic_cast<TGo4EventStoreParameter*>(rhs);
00073    if (storpar==0) return kFALSE;
00074    SetName(storpar->GetName());
00075    fiID=storpar->GetID();
00076    return kTRUE;
00077 }
00078 
00079 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:07 2008 for Go4-v3.04-1 by  doxygen 1.4.2