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

MainGo4AnalysisClient.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 #include "TGo4Log.h"
00019 
00020 #include "TApplication.h"
00021 #include "TGo4AnalysisClient.h"
00022 
00023 void usage();
00024 
00025 int main(int argc, char **argv)
00026 {
00027    TApplication theApp("App", &argc, argv);
00028    // define debug output section:
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 
00036    if(argc<4)
00037       {
00038          usage();
00039 
00040       }
00041    else
00042       {
00043          Text_t* name=argv[1];
00044          Text_t* hostname=argv[2];
00045          Text_t* connector=argv[3];
00046          UInt_t con=atoi(connector);
00047          cout << "Client:"<<name<<",\tHost:"<<hostname<<",\tConnector:"<<con<<endl;
00048 
00049          // variant 1: use demo with internal plain analysis base class
00050          TGo4AnalysisClient* myclient = new TGo4AnalysisClient(name,0,hostname,con);
00051 
00052          // variant 2: create user analysis and pass it to client, client adopts it
00053 //         TEbAnalysis* myanalysis= new TEbAnalysis;
00054 //         myanalysis->SetAutoSaveFile("EbAutoSave");
00055 //         myanalysis->SetAutoSaveInterval(200000);
00056 //         TGo4AnalysisClient* myclient = new TGo4AnalysisClient(name,myanalysis,hostname,con);
00057 
00058 
00059          cout << "Created AnalysisClient Instance: "<<myclient->GetName()<<endl; // dummy action for warnings
00060          theApp.Run();
00061 
00062          return 0;
00063 
00064    } // if(argc<4)
00065 
00066 //} // if (rev)
00067 
00068 }
00069 
00070 
00071 void usage()
00072 {
00073 cout << "usage: MainGo4AnalysisClient clientname serverhostname connectorport"<<endl;
00074 
00075 }
00076 
00077 
00078 
00079 
00080 //----------------------------END OF GO4 SOURCE FILE ---------------------

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