00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "Riostream.h"
00015 #include <stdlib.h>
00016 #include "TApplication.h"
00017
00018 #include "TGo4Log.h"
00019 #include "TGo4ExampleClient.h"
00020
00021 void usage();
00022
00023 int main(int argc, char **argv)
00024 {
00025 TApplication theApp("App", &argc, argv);
00026 TGo4Log::Instance();
00027 TGo4Log::SetIgnoreLevel(0);
00028
00029
00030 TGo4Log::LogfileEnable(kFALSE);
00031
00032 if(argc<4)
00033 {
00034 usage();
00035
00036 }
00037 else
00038 {
00039 const char* name=argv[1];
00040 const char* hostname=argv[2];
00041 const char* connector=argv[3];
00042 UInt_t con=atoi(connector);
00043 cout << "Client:"<<name<<",\tHost:"<<hostname<<",\tConnector:"<<con<<endl;
00044 TGo4ExampleClient* myclient = new TGo4ExampleClient(name,hostname,con);
00045 cout << "Created ExampleClient Instance: "<<myclient->GetName()<<endl;
00046 theApp.Run();
00047 return 0;
00048 }
00049 }
00050
00051
00052 void usage()
00053 {
00054 cout << "usage: MainGo4TaskHandlerClient clientname serverhostname connectorport"<<endl;
00055 }