GSI Object Oriented Online Offline (Go4)
GO4-6.4.0
Loading...
Searching...
No Matches
Go4AnalysisClient
MainGo4AnalysisClient.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
#include <cstdlib>
15
#include <iostream>
16
17
#include "TApplication.h"
18
19
#include "
TGo4Log.h
"
20
#include "
TGo4AnalysisClient.h
"
21
22
int
main
(
int
argc,
char
**argv)
23
{
24
TApplication theApp(
"App"
, &argc, argv);
25
// define debug output section:
26
TGo4Log::Instance
();
// init logger object
27
TGo4Log::SetIgnoreLevel
(0);
// set this to 1 to suppress detailed debug output
28
// set this to 2 to get warnings and errors only
29
// set this to 3 to get errors only
30
TGo4Log::LogfileEnable
(kFALSE);
// will enable or disable logging all messages to file
31
32
if
(argc < 4) {
33
std::cout <<
"usage: MainGo4AnalysisClient clientname serverhostname connectorport"
<< std::endl;
34
return
0;
35
}
36
37
const
char
*name = argv[1];
38
const
char
*hostname = argv[2];
39
const
char
*connector = argv[3];
40
UInt_t con = atoi(connector);
41
std::cout <<
"Client:"
<< name <<
",\tHost:"
<< hostname <<
",\tConnector:"
<< con << std::endl;
42
43
// variant 1: use demo with internal plain analysis base class
44
auto
myclient =
new
TGo4AnalysisClient
(name, 0, hostname, con);
45
46
// variant 2: create user analysis and pass it to client, client adopts it
47
// auto myanalysis= new TEbAnalysis;
48
// myanalysis->SetAutoSaveFile("EbAutoSave");
49
// myanalysis->SetAutoSaveInterval(200000);
50
// auto myclient = new TGo4AnalysisClient(name,myanalysis,hostname,con);
51
52
std::cout <<
"Created AnalysisClient Instance: "
<< myclient->GetName() << std::endl;
// dummy action for warnings
53
theApp.Run();
54
55
return
0;
56
}
main
int main(int argc, char **argv)
Definition
MainGo4AnalysisClient.cxx:22
TGo4AnalysisClient.h
TGo4Log.h
TGo4AnalysisClient
Definition
TGo4AnalysisClientImp.h:34
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