00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "TGo4ComConnectSlave.h"
00019 #include "Go4Log/TGo4Log.h"
00020 #include "Go4TaskHandler/TGo4Master.h"
00021
00022
00023 TGo4ComConnectSlave::TGo4ComConnectSlave()
00024 :TGo4TaskHandlerCommand("MRConnectSlave","connect to slave process"), fiMode(0)
00025
00026 {
00027 SetReceiverName("MasterTask");
00028
00029 fbIsLocal = kTRUE;
00030 fuPort=0;
00031 fbStartServer=kFALSE;
00032 fxSlaveName = "MyAnalysis";
00033 fxSlaveHost = "localhost";
00034 fxSlaveDir = "./Go4Example2Step";
00035 fxSlaveExecutable = "MainUserAnalysis";
00036 }
00037 TGo4ComConnectSlave::~TGo4ComConnectSlave()
00038 {
00039
00040 }
00041
00042 Int_t TGo4ComConnectSlave::ExeCom()
00043 {
00044 Int_t rev = 0;
00045 TGo4Master* master=dynamic_cast<TGo4Master*>(fxReceiverBase);
00046 if(master)
00047 {
00048
00049 if(master->ConnectSlave(
00050 fxSlaveName.Data(),
00051 fxSlaveHost.Data(),
00052 fuPort,
00053 fxSlaveDir.Data(),
00054 fxSlaveExecutable.Data(),
00055 fiMode,
00056 fbStartServer,
00057 fiLoginMode,
00058 fxPasswd.Data()))
00059 rev=0;
00060 else
00061 rev=1;
00062 }
00063 else
00064 {
00065 TGo4Log::Debug(" !!! ComConnectSlave ''%s'': NO RECEIVER ERROR!!!",GetName());
00066 rev = 1;
00067 }
00068 return rev;
00069 }
00070
00071
00072
00073 ClassImp(TGo4ComConnectSlave);
00074