GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ClientStatus.cxx
Go to the documentation of this file.
1 // $Id: TGo4ClientStatus.cxx 934 2013-01-29 15:59:24Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4ClientStatus.h"
15 
16 #include "Riostream.h"
17 #include "TGo4Log.h"
18 
19 
22 {
23 }
24 
26  TGo4TaskStatus(name)
27 {
28 }
29 
31 {
32 }
33 
34 Int_t TGo4ClientStatus::PrintStatus(Text_t* buffer, Int_t buflen)
35 {
36  if(buflen<=0 && buffer!=0)
37  return 0;
38  Int_t locallen=4096;
39  Text_t localbuf[4096];
40  Text_t* current=localbuf;
41  Int_t size=0;
42  Int_t restlen=locallen;
43  current=PrintBuffer(current,restlen, "G-OOOO-> Client Status Class %s Printout: <-OOOO-G\n",GetName());
44  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
45  current=PrintBuffer(current,restlen, "G-OOOO-> Remote Server Hostname: %s\n",fxServerHostName.Data());
46  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
47  Int_t delta=TGo4TaskStatus::PrintStatus(current,restlen);
48  restlen-=delta;
49  current+=delta;
50  current=PrintBuffer(current,restlen, "G-OOOO-> END Client Status Class Printout END <-OOOO-G\n");
51  if(buffer==0)
52  {
53  std::cout << localbuf << std::endl;
54  }
55  else
56  {
57  size=locallen-restlen;
58  if(size>buflen-1)
59  size=buflen-1;
60  strncpy(buffer,localbuf,size);
61  }
62  return size;
63 }
64 
65 void TGo4ClientStatus::SetNames(const char* serverhost)
66 {
67  fxServerHostName = serverhost;
68 }
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
virtual ~TGo4ClientStatus()
void SetNames(const char *serverhost)
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)
Definition: TGo4Status.cxx:85
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)