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

TGo4BackStoreParameter.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 "TGo4BackStoreParameter.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4Status.h"
00021 #include "TGo4Log.h"
00022 #include "Go4EventServerTypes.h"
00023 
00024 TGo4BackStoreParameter::TGo4BackStoreParameter(const char* name,
00025                                               Int_t splitlevel,
00026                                               Int_t bufsize)
00027 : TGo4EventStoreParameter(name, GO4EV_BACK),
00028    fiSplit(splitlevel), fiBufsize(bufsize)
00029 {
00030    TRACE((14,"TGo4FileStoreParameter::TGo4FileStoreParameter(const char*,...)", __LINE__, __FILE__));
00031    SetTitle(name);
00032 }
00033 
00034 TGo4BackStoreParameter::TGo4BackStoreParameter()
00035 : TGo4EventStoreParameter("Default Go4 FileStore", GO4EV_BACK),
00036    fiSplit(99), fiBufsize(64000)
00037 {
00038    TRACE((14,"TGo4FileStoreParameter::TGo4FileStoreParameter()", __LINE__, __FILE__));
00039    SetTitle("Go4FileStore-Tree");
00040 }
00041 
00042 TGo4BackStoreParameter::~TGo4BackStoreParameter()
00043 {
00044    TRACE((14,"TGo4FileStoreParameter::~TGo4FileStoreParameter()", __LINE__, __FILE__));
00045 }
00046 
00047 Int_t TGo4BackStoreParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00048 {
00049  TRACE((12,"TGo4FileStoreParameter::PrintParameter()",__LINE__, __FILE__));
00050    Int_t locallen=128000;
00051    Text_t localbuf[128000];
00052    if(buflen<0 && buffer!=0) return 0;
00053    Int_t size=0;
00054    Int_t restlen=locallen;
00055    Text_t* current=localbuf;
00056    Int_t delta=TGo4EventStoreParameter::PrintParameter(current,restlen);
00057    restlen-=delta;
00058    current+=delta;
00059    current=TGo4Status::PrintIndent(current,restlen);
00060    current=TGo4Status::PrintBuffer(current,restlen, "  Split level: \t%d \n",fiSplit);
00061    current=TGo4Status::PrintIndent(current,restlen);
00062    current=TGo4Status::PrintBuffer(current,restlen, "  Buffer size: \t%d bytes \n",fiBufsize);
00063    if(buffer==0)
00064       {
00065           cout << localbuf << endl;
00066       }
00067    else
00068       {
00069          size=locallen-restlen;
00070          if(size>buflen-1)
00071             size=buflen-1;
00072          strncpy(buffer,localbuf,size);
00073       }
00074    return size;
00075 }
00076 
00077 Bool_t TGo4BackStoreParameter::UpdateFrom(TGo4Parameter* rhs)
00078 {
00079    TRACE((12,"TGo4BackStoreParameter::UpdateFrom()",__LINE__, __FILE__));
00080    TGo4BackStoreParameter* backpar=dynamic_cast<TGo4BackStoreParameter*>(rhs);
00081    if(backpar==0) return kFALSE;
00082    if(!TGo4EventStoreParameter::UpdateFrom(rhs)) return kFALSE;
00083    SetSplitlevel(backpar->GetSplitlevel());
00084    SetBufsize(backpar->GetBufsize());
00085    return kTRUE;
00086 }
00087 
00088 //----------------------------END OF GO4 SOURCE FILE ---------------------

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