TXSlave.h

Go to the documentation of this file.
00001 // @(#)root/proofx:$Id: TXSlave.h 25734 2008-10-07 22:40:37Z ganis $
00002 // Author: G. Ganis Oct 2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TXSlave
00013 #define ROOT_TXSlave
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TXSlave                                                              //
00019 //                                                                      //
00020 // This is the version of TSlave for slave servers based on XRD.        //
00021 // See TSlave for details.                                              //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TSlave
00026 #include "TSlave.h"
00027 #endif
00028 #ifndef ROOT_TXHandler
00029 #include "TXHandler.h"
00030 #endif
00031 
00032 class TObjString;
00033 class TSocket;
00034 class TSignalHandler;
00035 
00036 class TXSlave : public TSlave, public TXHandler {
00037 
00038 friend class TProof;
00039 friend class TXProofMgr;
00040 
00041 private:
00042    Bool_t   fValid;
00043    TSignalHandler *fIntHandler;     //interrupt signal handler (ctrl-c)
00044 
00045    void  Init(const char *host, Int_t stype);
00046 
00047    // Static methods
00048    static Int_t GetProofdProtocol(TSocket *s);
00049 
00050 protected:
00051    void     FlushSocket();
00052    void     Interrupt(Int_t type);
00053    Int_t    Ping();
00054    TObjString *SendCoordinator(Int_t kind, const char *msg = 0, Int_t int2 = 0);
00055    Int_t    SendGroupPriority(const char *grp, Int_t priority);
00056    void     SetAlias(const char *alias);
00057    void     StopProcess(Bool_t abort, Int_t timeout);
00058 
00059 public:
00060    TXSlave(const char *url, const char *ord, Int_t perf,
00061            const char *image, TProof *proof, Int_t stype,
00062            const char *workdir, const char *msd);
00063    virtual ~TXSlave();
00064 
00065    void   Close(Option_t *opt = "");
00066    void   DoError(int level, const char *location, const char *fmt,
00067                   va_list va) const;
00068 
00069    Bool_t HandleError(const void *in = 0); // Error Handler
00070    Bool_t HandleInput(const void *in = 0); // Input handler
00071 
00072    void   SetInterruptHandler(Bool_t on = kTRUE);
00073 
00074    Int_t  SetupServ(Int_t stype, const char *conffile);
00075 
00076    void   Touch();
00077 
00078    ClassDef(TXSlave,0)  //Xrd PROOF slave server
00079 };
00080 
00081 #endif

Generated on Tue Jul 5 14:52:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1