ROOT  6.06/09
Reference Guide
TXProofServ.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_TXProofServ
13 #define ROOT_TXProofServ
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TXProofServ //
18 // //
19 // TXProofServ is the XRD version of the PROOF server. It differs from //
20 // TProofServ only for the underlying connection technology //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TProofServ
25 #include "TProofServ.h"
26 #endif
27 #ifndef ROOT_TXHandler
28 #include "TXHandler.h"
29 #endif
30 
31 class TXProofServInterruptHandler;
32 class TXSocketHandler;
33 
34 class TXProofServ : public TProofServ, public TXHandler {
35 
36 private:
37  TXProofServInterruptHandler *fInterruptHandler;
40 
41  Bool_t fTerminated; //true if Terminate() has been already called
42 
43  Int_t LockSession(const char *sessiontag, TProofLockPath **lck);
44 
45  Int_t Setup();
46 
47 public:
48  TXProofServ(Int_t *argc, char **argv, FILE *flog = 0);
49  virtual ~TXProofServ();
50 
52 
53  // Disable / Enable read timeout
54  void DisableTimeout();
55  void EnableTimeout();
56 
57  EQueryAction GetWorkers(TList *workers, Int_t &prioritychange,
58  Bool_t resume = kFALSE);
59 
60  Bool_t HandleError(const void *in = 0); // Error Handler
61  Bool_t HandleInput(const void *in = 0); // Input handler
62 
63  void HandleUrgentData();
64  void HandleSigPipe();
65  void HandleTermination();
66 
67  void ReleaseWorker(const char *ord);
68  void Terminate(Int_t status);
69 
70  ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface
71 };
72 
73 #endif
TXSocketHandler * fInputHandler
Definition: TXProofServ.h:38
Int_t Setup()
Print the ProofServ logo on standard output.
Int_t CreateServer()
Finalize the server setup.
Bool_t HandleInput(const void *in=0)
Handle asynchronous input on the input socket.
Basic string class.
Definition: TString.h:137
TAlienJobStatus * status
Definition: TAlienJob.cxx:51
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Int_t LockSession(const char *sessiontag, TProofLockPath **lck)
Try locking query area of session tagged sessiontag.
void HandleUrgentData()
Handle high priority data sent by the master or client.
void DisableTimeout()
Disable read timeout on the underlying socket.
void EnableTimeout()
Enable read timeout on the underlying socket.
#define ClassDef(name, id)
Definition: Rtypes.h:254
const char * ord
Definition: TXSlave.cxx:46
TXProofServInterruptHandler * fInterruptHandler
Definition: TXProofServ.h:37
void ReleaseWorker(const char *ord)
Send message to intermediate coordinator to release worker of last ordinal ord.
TString flog
Definition: pq2main.cxx:37
EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
A doubly linked list.
Definition: TList.h:47
void Terminate(Int_t status)
Terminate the proof server.
virtual ~TXProofServ()
Cleanup.
void HandleSigPipe()
Called when the client is not alive anymore; terminate the session.
void HandleTermination()
Called when the client is not alive anymore; terminate the session.
Bool_t HandleError(const void *in=0)
Handle error on the input socket.
TXProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
TString fSockPath
Definition: TXProofServ.h:39
Bool_t fTerminated
Definition: TXProofServ.h:41