GSI Object Oriented Online Offline (Go4)
GO4-6.4.0
Loading...
Searching...
No Matches
Go4TaskHandlerExample
MainGo4TaskHandlerClient.cxx
Go to the documentation of this file.
1
// $Id$
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
15
#include <iostream>
16
17
#include "TApplication.h"
18
19
#include "
TGo4Log.h
"
20
#include "
TGo4ExampleClient.h
"
21
22
int
main
(
int
argc,
char
**argv)
23
{
24
if
(argc < 4) {
25
std::cout <<
"usage: MainGo4TaskHandlerClient clientname serverhostname connectorport"
<< std::endl;
26
return
0;
27
}
28
29
TApplication theApp(
"App"
, &argc, argv);
30
TGo4Log::Instance
();
// init logger object
31
TGo4Log::SetIgnoreLevel
(0);
// set this to 1 to suppress detailed debug output
32
// set this to 2 to get warnings and errors only
33
// set this to 3 to get errors only
34
TGo4Log::LogfileEnable
(kFALSE);
// will enable or disable logging all messages to file
35
36
const
char
*name = argv[1];
37
const
char
*hostname = argv[2];
38
const
char
*connector = argv[3];
39
UInt_t con = atoi(connector);
40
std::cout <<
"Client:"
<< name <<
",\tHost:"
<< hostname <<
",\tConnector:"
<< con << std::endl;
41
TGo4ExampleClient
*myclient =
new
TGo4ExampleClient
(name, hostname, con);
42
std::cout <<
"Created ExampleClient Instance: "
<< myclient->GetName() << std::endl;
// dummy action for warnings
43
theApp.Run();
44
return
0;
45
}
main
int main(int argc, char **argv)
Definition
MainGo4TaskHandlerClient.cxx:22
TGo4ExampleClient.h
TGo4Log.h
TGo4ExampleClient
Example class for a client application; this may be the analysis client later on which keeps the anal...
Definition
TGo4ExampleClient.h:29
TGo4Log::Instance
static TGo4Log * Instance()
Definition
TGo4Log.cxx:85
TGo4Log::SetIgnoreLevel
static void SetIgnoreLevel(Int_t level)
Define threshold for output.
Definition
TGo4Log.cxx:332
TGo4Log::LogfileEnable
static void LogfileEnable(Bool_t on=kTRUE)
switch writing to logfile on or off
Definition
TGo4Log.cxx:363
Generated by
1.13.2