GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ClientStatus.cxx
Go to the documentation of this file.
1 // $Id: TGo4ClientStatus.cxx 2757 2020-04-16 11:45:21Z 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 fuer 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 <iostream>
17 
18 
21 {
22 }
23 
25  TGo4TaskStatus(name)
26 {
27 }
28 
30 {
31 }
32 
33 Int_t TGo4ClientStatus::PrintStatus(Text_t* buffer, Int_t buflen)
34 {
35  if(buflen<=0 && buffer!=0)
36  return 0;
37  Int_t locallen=4096;
38  Text_t localbuf[4096];
39  Text_t* current=localbuf;
40  Int_t size=0;
41  Int_t restlen=locallen;
42  current=PrintBuffer(current,restlen, "G-OOOO-> Client Status Class %s Printout: <-OOOO-G\n",GetName());
43  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
44  current=PrintBuffer(current,restlen, "G-OOOO-> Remote Server Hostname: %s\n",fxServerHostName.Data());
45  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
46  Int_t delta=TGo4TaskStatus::PrintStatus(current,restlen);
47  restlen-=delta;
48  current+=delta;
49  current = PrintBuffer(current, restlen, "G-OOOO-> END Client Status Class Printout END <-OOOO-G\n");
50  if (buffer == 0) {
51  std::cout << localbuf << std::endl;
52  } else {
53  size = locallen - restlen;
54  if (size > buflen - 1)
55  size = buflen - 1;
56  strncpy(buffer, localbuf, size);
57  }
58  return size;
59 }
60 
61 void TGo4ClientStatus::SetNames(const char* serverhost)
62 {
63  fxServerHostName = serverhost;
64 }
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:84
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)