GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Go4TaskHandlerExample
TGo4ExampleClientStatus.cxx
Go to the documentation of this file.
1
// $Id: TGo4ExampleClientStatus.cxx 999 2013-07-25 11:58:59Z 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 "
TGo4ExampleClientStatus.h
"
15
16
#include "TH1.h"
17
#include "Riostream.h"
18
19
#include "
TGo4Log.h
"
20
21
TGo4ExampleClientStatus::TGo4ExampleClientStatus
(
const
char
* name) :
TGo4ClientStatus
(name)
22
{
23
GO4TRACE
((12,
"TGo4ExampleClientStatus::TGo4ExampleClientStatus(const char*)"
,__LINE__, __FILE__));
24
}
25
26
void
TGo4ExampleClientStatus::SetHistoStatus
(TH1* histogram)
27
{
28
GO4TRACE
((12,
"TGo4ClientStatus::SetHistoStatus(TH1*)"
,__LINE__, __FILE__));
29
fxHistogramName
= histogram->GetName();
30
// here the complete internal histogram information may be stored; we leave that
31
// as an exercise for the reader!
32
}
33
34
void
TGo4ExampleClientStatus::SetNames
(
const
char
*
main
,
const
char
* watch)
35
{
36
GO4TRACE
((12,
"TGo4ClientStatus::SetNames(const char*,...)"
,__LINE__, __FILE__));
37
fxMainName
=
main
;
38
fxWatchName
= watch;
39
}
40
41
Int_t
TGo4ExampleClientStatus::PrintStatus
(Text_t* buffer, Int_t buflen)
42
{
43
GO4TRACE
((12,
"TGo4ExampleClientStatus::PrintStatus()"
,__LINE__, __FILE__));
44
//
45
if
(buflen<=0 && buffer!=0)
return
0;
46
Int_t locallen=4096;
47
Text_t localbuf[4096];
48
Text_t* current=localbuf;
49
Int_t size=0;
50
Int_t restlen=locallen;
51
52
current=
PrintBuffer
(current,restlen,
"G-OOOO-> ExampleClient Status Class %s Printout: <-OOOO-G\n"
,GetName());
53
current=
PrintBuffer
(current,restlen,
"G-OOOO-> ---------------------------------------------- <-OOOO-G\n"
);
54
current=
PrintBuffer
(current,restlen,
"G-OOOO-> Main Runnable Name: %s\n"
,
fxMainName
.Data());
55
current=
PrintBuffer
(current,restlen,
"G-OOOO-> Watch Runnable Name: %s\n"
,
fxWatchName
.Data());
56
current=
PrintBuffer
(current,restlen,
"G-OOOO-> Demo Histogram Name: %s\n"
,
fxHistogramName
.Data());
57
current=
PrintBuffer
(current,restlen,
"G-OOOO-> ---------------------------------------------- <-OOOO-G\n"
);
58
Int_t delta=
TGo4ClientStatus::PrintStatus
(current,restlen);
// gives us the superclass data
59
restlen-=delta;
60
current+=delta;
61
current=
PrintBuffer
(current,restlen,
"G-OOOO-> END Example Client Status Class Printout END <-OOOO-G\n"
);
62
if
(buffer==0)
63
{
64
std::cout << localbuf << std::endl;
65
}
66
else
67
{
68
size=locallen-restlen;
69
if
(size>buflen-1) size=buflen-1;
70
strncpy(buffer,localbuf,size);
71
}
72
return
size;
73
}
74
75
TGo4ExampleClientStatus::~TGo4ExampleClientStatus
()
76
{
77
GO4TRACE
((12,
"TGo4ExampleClientStatus::~TGo4ExampleClientStatus()"
,__LINE__, __FILE__));
78
}
TGo4ExampleClientStatus::fxHistogramName
TString fxHistogramName
Definition:
TGo4ExampleClientStatus.h:49
TGo4Log.h
main
int main(int argc, char **argv)
Definition:
MainUserAnalysis.cxx:586
TGo4ExampleClientStatus::SetHistoStatus
void SetHistoStatus(TH1 *histogram)
Definition:
TGo4ExampleClientStatus.cxx:26
TGo4ExampleClientStatus::SetNames
void SetNames(const char *main, const char *watch)
Definition:
TGo4ExampleClientStatus.cxx:34
TGo4ExampleClientStatus::fxWatchName
TString fxWatchName
Definition:
TGo4ExampleClientStatus.h:46
TGo4ExampleClientStatus::TGo4ExampleClientStatus
TGo4ExampleClientStatus()
Definition:
TGo4ExampleClientStatus.h:29
TGo4ExampleClientStatus::PrintStatus
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
Definition:
TGo4ExampleClientStatus.cxx:41
GO4TRACE
#define GO4TRACE(X)
Definition:
TGo4Log.h:26
TGo4ClientStatus
Definition:
TGo4ClientStatus.h:21
TGo4Status::PrintBuffer
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)
Definition:
TGo4Status.cxx:85
TGo4ExampleClientStatus::~TGo4ExampleClientStatus
virtual ~TGo4ExampleClientStatus()
Definition:
TGo4ExampleClientStatus.cxx:75
TGo4ClientStatus::PrintStatus
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
Definition:
TGo4ClientStatus.cxx:34
TGo4ExampleClientStatus::fxMainName
TString fxMainName
Definition:
TGo4ExampleClientStatus.h:43
TGo4ExampleClientStatus.h
Generated on Fri Oct 26 2018 08:34:53 for GSI Object Oriented Online Offline (Go4) by
1.8.8