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

/Go4CommandsTaskHandler/TGo4ComConnectSlave.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 /* Generated by Together */
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"); // sets the receiver name checked by command invoker
00028                                   // receiver name neednt be class name!
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        //cout <<"TGo4ComConnectSlave with role "<<fiLoginMode<<" , passwd="<<fxPasswd.Data() << endl;
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 //----------------------------END OF GO4 SOURCE FILE ---------------------

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