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

TGo4RevServParameter.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 "TGo4RevServParameter.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4Status.h"
00021 #include "TGo4Log.h"
00022 #include "Go4EventServerTypes.h"
00023 
00024 
00025 TGo4RevServParameter::TGo4RevServParameter(const char* name)
00026 : TGo4EventSourceParameter(name, GO4EV_MBS_REVSERV), fiPort(0)
00027 {
00028 TRACE((14,"TGo4MbsRevServParameter::TGo4MbsRevServParameter(Text_t*,...)", __LINE__, __FILE__));
00029 }
00030 
00031 TGo4RevServParameter::TGo4RevServParameter()
00032 : TGo4EventSourceParameter("default mbs remote event server", GO4EV_MBS_REVSERV), fiPort(0)
00033 {
00034 TRACE((14,"TGo4MbsRevServParameter::TGo4MbsRevServParameter()", __LINE__, __FILE__));
00035 }
00036 
00037 TGo4RevServParameter::~TGo4RevServParameter()
00038 {
00039 TRACE((14,"TGo4MbsRevServParameter::~TGo4MbsRevServParameter()", __LINE__, __FILE__));
00040 }
00041 
00042 
00043 Int_t TGo4RevServParameter::PrintParameter(Text_t* buffer, Int_t buflen)
00044 {
00045  TRACE((12,"TGo4RevServParameter::PrintParameter()",__LINE__, __FILE__));
00046    Int_t locallen=128000;
00047    Text_t localbuf[128000];
00048    if(buflen<0 && buffer!=0)
00049       return 0;
00050    Int_t size=0;
00051    Text_t* current=localbuf;
00052    Int_t restlen=locallen;
00053    Int_t delta=TGo4EventSourceParameter::PrintParameter(current,restlen);
00054    restlen-=delta;
00055    current+=delta;
00056    current=TGo4Status::PrintIndent(current,restlen);
00057    current=TGo4Status::PrintBuffer(current,restlen, "  Revserv port: \t%d \n",GetPort());
00058    if(buffer==0)
00059       {
00060           cout << localbuf << endl;
00061       }
00062    else
00063       {
00064          size=locallen-restlen;
00065          if(size>buflen-1)
00066             size=buflen-1;
00067          strncpy(buffer,localbuf,size);
00068       }
00069    return size;
00070 }
00071 
00072 //----------------------------END OF GO4 SOURCE FILE ---------------------

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