Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4TaskHandlerExample/MainGo4TaskHandlerClient.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include <iostream.h>
00017 
00018 #include "Go4Log/TGo4Log.h"
00019 #include "TApplication.h"
00020 #include "TGo4ExampleClient.h"
00021 
00022 void usage();
00023 
00024 int main(int argc, char **argv)
00025 {
00026    TApplication theApp("App", &argc, argv);
00027    TGo4Log::Instance(); // init logger object
00028    TGo4Log::SetIgnoreLevel(0); // set this to 1 to suppress detailed debug output
00029                                // set this to 2 to get warnings and errors only
00030                                // set this to 3 to get errors only
00031    TGo4Log::LogfileEnable(kFALSE); // will enable or disable logging all messages to file
00032 
00033    if(argc<4)
00034       {
00035          usage();
00036 
00037       }
00038    else
00039       {
00040          Text_t* name=argv[1];
00041          Text_t* hostname=argv[2];
00042          Text_t* connector=argv[3];
00043          UInt_t con=atoi(connector);
00044          cout << "Client:"<<name<<",\tHost:"<<hostname<<",\tConnector:"<<con<<endl;
00045          TGo4ExampleClient* myclient = new TGo4ExampleClient(name,hostname,con);
00046          cout << "Created ExampleClient Instance: "<<myclient->GetName()<<endl; // dummy action for warnings
00047          theApp.Run();
00048          return 0;
00049    } // if(argc<4)
00050 }
00051 
00052 
00053 void usage()
00054 {
00055 cout << "usage: MainGo4TaskHandlerClient clientname serverhostname connectorport"<<endl;
00056 }
00057 
00058 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:07 2005 for Go4-v2.10-5 by doxygen1.2.15