Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TXSlave.h
Go to the documentation of this file.
1// @(#)root/proofx:$Id$
2// Author: G. Ganis Oct 2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TXSlave
13#define ROOT_TXSlave
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TXSlave //
19// //
20// This is the version of TSlave for slave servers based on XRD. //
21// See TSlave for details. //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "TSlave.h"
26#include "TXHandler.h"
27
28class TObjString;
29class TSocket;
30class TSignalHandler;
31
32class TXSlave : public TSlave, public TXHandler {
33
34friend class TProof;
35friend class TXProofMgr;
36
37private:
39 Int_t fNWrks; // Number of workers when submaster in remote plite
40 TSignalHandler *fIntHandler; //interrupt signal handler (ctrl-c)
41
42 void Init(const char *host, Int_t stype);
43 void ParseBuffer();
44
45 // Static methods
47
48protected:
49 void FlushSocket() override;
50 void Interrupt(Int_t type) override;
51 Int_t Ping() override;
52 TObjString *SendCoordinator(Int_t kind, const char *msg = 0, Int_t int2 = 0) override;
53 Int_t SendGroupPriority(const char *grp, Int_t priority) override;
54 void SetAlias(const char *alias) override;
55 void StopProcess(Bool_t abort, Int_t timeout) override;
56
57public:
58 TXSlave(const char *url, const char *ord, Int_t perf,
59 const char *image, TProof *proof, Int_t stype,
60 const char *workdir, const char *msd, Int_t nwk = 1);
61 ~TXSlave() override;
62
63 void Close(Option_t *opt = "") override;
64 void DoError(int level, const char *location, const char *fmt,
65 va_list va) const override;
66
67 Bool_t HandleError(const void *in = 0) override; // Error Handler
68 Bool_t HandleInput(const void *in = 0) override; // Input handler
69
70 void SetInterruptHandler(Bool_t on = kTRUE) override;
71
72 Int_t SetupServ(Int_t stype, const char *conffile) override;
73
74 void Touch() override;
75
76 ClassDefOverride(TXSlave,0) //Xrd PROOF slave server
77};
78
79#endif
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Collectable string class.
Definition TObjString.h:28
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition TProof.h:316
Class describing a PROOF worker server.
Definition TSlave.h:46
friend class TXSlave
Definition TSlave.h:51
Handler of asynchronous events for XProofD sockets.
Definition TXHandler.h:28
Implementation of the functionality provided by TProofMgr in the case of a xproofd-based session.
Definition TXProofMgr.h:40
This is the version of TSlave for workers servers based on XProofD.
Definition TXSlave.h:32
Int_t SetupServ(Int_t stype, const char *conffile) override
Init a PROOF slave object.
Definition TXSlave.cxx:333
void SetInterruptHandler(Bool_t on=kTRUE) override
Set/Unset the interrupt handler.
Definition TXSlave.cxx:680
Int_t Ping() override
Ping the remote master or slave servers.
Definition TXSlave.cxx:396
Int_t SendGroupPriority(const char *grp, Int_t priority) override
Communicate to the coordinator the priprity of the group to which the user belongs Return 0 on succes...
Definition TXSlave.cxx:550
void Close(Option_t *opt="") override
Close slave socket.
Definition TXSlave.cxx:382
void SetAlias(const char *alias) override
Set an alias for this session.
Definition TXSlave.cxx:535
void FlushSocket() override
Clean any input on the socket.
Definition TXSlave.cxx:698
TObjString * SendCoordinator(Int_t kind, const char *msg=0, Int_t int2=0) override
Send message to intermediate coordinator.
Definition TXSlave.cxx:525
Bool_t HandleError(const void *in=0) override
Handle error on the input socket.
Definition TXSlave.cxx:563
Int_t fNWrks
Definition TXSlave.h:39
static Int_t GetProofdProtocol(TSocket *s)
Find out the remote proofd protocol version.
Definition TXSlave.cxx:469
~TXSlave() override
Destroy slave.
Definition TXSlave.cxx:374
void StopProcess(Bool_t abort, Int_t timeout) override
Sent stop/abort request to PROOF server.
Definition TXSlave.cxx:456
Bool_t fValid
Definition TXSlave.h:38
void Touch() override
Touch the client admin file to proof we are alive.
Definition TXSlave.cxx:406
void Interrupt(Int_t type) override
Send interrupt to master or slave servers.
Definition TXSlave.cxx:418
TSignalHandler * fIntHandler
Definition TXSlave.h:40
Bool_t HandleInput(const void *in=0) override
Handle asynchronous input on the socket.
Definition TXSlave.cxx:636
void ParseBuffer()
Parse fBuffer after a connection attempt.
Definition TXSlave.cxx:302
void Init(const char *host, Int_t stype)
Init a PROOF slave object.
Definition TXSlave.cxx:132
void DoError(int level, const char *location, const char *fmt, va_list va) const override
Interface to ErrorHandler (protected).
Definition TXSlave.cxx:68