GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4MemberStatus.cxx
Go to the documentation of this file.
1 // $Id: TGo4MemberStatus.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 "TGo4MemberStatus.h"
15 
16 #include "Riostream.h"
17 
20 {
21 }
22 
23 TGo4MemberStatus::TGo4MemberStatus(const char* name, const char* datatypename) :
24  TGo4ObjectStatus(0,kFALSE)
25 {
26  SetName(name);
27  SetTitle(datatypename);
28  fxObjectClass = datatypename;
29 }
30 
32 {
33 }
34 
35 Int_t TGo4MemberStatus::PrintStatus(Text_t* buffer, Int_t buflen)
36 {
37  if(buflen<=0 && buffer!=0)
38  return 0;
39  Int_t locallen=128000;
40  Text_t localbuf[128000];
41  Int_t size=0;
42  Text_t* current=localbuf;
43  Int_t restlen=locallen;
44  Int_t delta = TGo4ObjectStatus::PrintStatus(current,restlen);
45  restlen-=delta;
46  current+=delta;
47  current=PrintIndent(current,restlen);
48  current=PrintBuffer(current,restlen, "G-OOOO-> Datamember Status Class Printout <-OOOO-G\n");
49  current=PrintIndent(current,restlen);
50  current=PrintBuffer(current,restlen, "G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
51  if(buffer==0)
52  {
53  std::cout << localbuf << std::endl;
54  }
55  else
56  {
57  if(size>buflen-1)
58  size=buflen-1;
59  strncpy(buffer,localbuf,size);
60  }
61  return size;
62 }
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
static Text_t * PrintIndent(Text_t *buffer, Int_t &buflen)
Definition: TGo4Status.cxx:72
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
virtual ~TGo4MemberStatus()
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)
Definition: TGo4Status.cxx:85