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

/Go4CommandsTaskHandler/TGo4ComLaunchClient.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 "TGo4ComLaunchClient.h"
00017 
00018 #include "Go4TaskHandler/TGo4ServerTask.h"
00019 #include "Go4Log/TGo4Log.h"
00020 
00021 TGo4ComLaunchClient::TGo4ComLaunchClient()
00022 :TGo4TaskHandlerCommand("SVLaunchClient","launch new client process"), fiMode(0)
00023 
00024    {
00025    SetReceiverName("ServerTask"); // sets the receiver name checked by command invoker
00026                                   // receiver name neednt be class name!
00027    fbIsLocal = kTRUE;
00028    fxClientName = "MyAnalysis";
00029    fxClientHost = "localhost";
00030    fxClientDir = "./Go4Example2Step";
00031    fxClientExecutable = "MainUserAnalysis";
00032 }
00033 
00034 TGo4ComLaunchClient::~TGo4ComLaunchClient()
00035 {
00036 }
00037 
00038 void TGo4ComLaunchClient::SetClientName(const char* name)
00039 {
00040    fxClientName = name;
00041 }
00042 
00043 void TGo4ComLaunchClient::SetClientHost(const char* name)
00044 {
00045    fxClientHost = name;
00046 }
00047 
00048 void TGo4ComLaunchClient::SetClientDir(const char* name)
00049 {
00050    fxClientDir = name;
00051 }
00052 
00053 void TGo4ComLaunchClient::SetClientExecutable(const char* name)
00054 {
00055    fxClientExecutable = name;
00056 }
00057 
00058 Int_t TGo4ComLaunchClient::ExeCom()
00059 {
00060    Int_t rev = 0;
00061    TGo4ServerTask* serv=dynamic_cast<TGo4ServerTask*>(fxReceiverBase);
00062    if(serv)
00063       {
00064        rev= serv->LaunchClient(
00065                fxClientName.Data(), fxClientHost.Data(),
00066                fxClientDir.Data(), fxClientExecutable.Data(), fiMode);
00067       }
00068    else
00069       {
00070          TGo4Log::Debug(" !!! ComLaunchClient ''%s'': NO RECEIVER ERROR!!!",GetName());
00071          rev = 1;
00072       }
00073    return rev;
00074 }
00075 
00076 ClassImp(TGo4ComLaunchClient)
00077 
00078 //----------------------------END OF GO4 SOURCE FILE ---------------------

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