GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MainGo4TaskHandlerServer.cxx
Go to the documentation of this file.
1 // $Id: MainGo4TaskHandlerServer.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 "Riostream.h"
15 #include "TApplication.h"
16 
17 #include "TGo4Log.h"
18 #include "TGo4ExampleServer.h"
19 
20 int main(int argc, char **argv)
21 {
22  TApplication theApp("App", &argc, argv);
23  TGo4Log::Instance(); // init logger object
24  TGo4Log::SetIgnoreLevel(0); // set this to 1 to suppress detailed debug output
25  // set this to 2 to get warnings and errors only
26  // set this to 3 to get errors only
27  TGo4Log::LogfileEnable(kFALSE); // will enable or disable logging all messages to file
28 
29  TGo4ExampleServer* myserver = new TGo4ExampleServer("MyExampleServer", 0, kFALSE);
30  // second parameter is negotiation portnumber
31  std::cout << "Created Example Server Instance:"<<myserver->GetName()<<std::endl; // dummy action for warnings
32  theApp.Run();
33  return 0;
34 }
static TGo4Log * Instance()
Definition: TGo4Log.cxx:87
static void SetIgnoreLevel(Int_t level)
Definition: TGo4Log.cxx:322
int main(int argc, char **argv)
static void LogfileEnable(Bool_t on=kTRUE)
Definition: TGo4Log.cxx:369