Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

MainGo4TaskHandlerClient.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "Riostream.h"
00017 #include <stdlib.h>
00018 
00019 #include "TApplication.h"
00020 
00021 #include "TGo4Log.h"
00022 #include "TGo4ExampleClient.h"
00023 
00024 void usage();
00025 
00026 int main(int argc, char **argv)
00027 {
00028    TApplication theApp("App", &argc, argv);
00029    TGo4Log::Instance(); // init logger object
00030    TGo4Log::SetIgnoreLevel(0); // set this to 1 to suppress detailed debug output
00031                                // set this to 2 to get warnings and errors only
00032                                // set this to 3 to get errors only
00033    TGo4Log::LogfileEnable(kFALSE); // will enable or disable logging all messages to file
00034 
00035    if(argc<4)
00036       {
00037          usage();
00038 
00039       }
00040    else
00041       {
00042          Text_t* name=argv[1];
00043          Text_t* hostname=argv[2];
00044          Text_t* connector=argv[3];
00045          UInt_t con=atoi(connector);
00046          cout << "Client:"<<name<<",\tHost:"<<hostname<<",\tConnector:"<<con<<endl;
00047          TGo4ExampleClient* myclient = new TGo4ExampleClient(name,hostname,con);
00048          cout << "Created ExampleClient Instance: "<<myclient->GetName()<<endl; // dummy action for warnings
00049          theApp.Run();
00050          return 0;
00051    } // if(argc<4)
00052 }
00053 
00054 
00055 void usage()
00056 {
00057 cout << "usage: MainGo4TaskHandlerClient clientname serverhostname connectorport"<<endl;
00058 }
00059 
00060 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:30 2008 for Go4-v3.04-1 by  doxygen 1.4.2