library: libProof
#include "TProofServ.h"

TProofServ


class description - header file - source file - inheritance tree (.pdf)

class TProofServ : public TApplication

Inheritance Chart:
TObject
TQObject
<-
TApplication
<-
TProofServ
    private:
void AddLogFile(TProofQueryResult* pq) Int_t CatMotd() Int_t CleanupSession(const char* sessiontag) void FinalizeQuery(TProofPlayer* p, TProofQueryResult* pq) TList* GetDataSet(const char* name) TProofQueryResult* LocateQuery(TString queryref, Int_t& qry, TString& qdir) virtual Int_t LockSession(const char* sessiontag, TProofLockPath** lck) TProofQueryResult* MakeQueryResult(Long64_t nentries, const char* opt, TList* inl, Long64_t first, TDSet* dset, const char* selec, TEventList* evl) Int_t OldAuthSetup(TString& wconf) virtual void RedirectOutput() void RemoveQuery(TQueryResult* qr, Bool_t soft = kFALSE) void RemoveQuery(const char* queryref) void SaveQuery(TQueryResult* qr, const char* fout = "0") void ScanPreviousQueries(const char* dir) void SetQueryRunning(TProofQueryResult* pq) Int_t UnloadPackage(const char* package) Int_t UnloadPackages() protected:
static void ErrorHandler(Int_t level, Bool_t abort, const char* location, const char* msg) virtual void HandleArchive(TMessage* mess) virtual Int_t HandleCache(TMessage* mess) virtual void HandleCheckFile(TMessage* mess) virtual Int_t HandleDataSets(TMessage* mess) virtual void HandleLibIncPath(TMessage* mess) virtual void HandleProcess(TMessage* mess) virtual void HandleQueryList(TMessage* mess) virtual void HandleRemove(TMessage* mess) virtual void HandleRetrieve(TMessage* mess) virtual void HandleSocketInputDuringProcess() virtual void HandleWorkerLists(TMessage* mess) virtual void SetShutdownTimer(Bool_t, Int_t) virtual void Setup() public:
TProofServ(Int_t* argc, char** argv, FILE* flog = 0) TProofServ(const TProofServ&) virtual ~TProofServ() static TClass* Class() virtual void CreateServer() virtual void DisableTimeout() virtual void EnableTimeout() TObject* Get(const char* namecycle) const char* GetConfDir() const const char* GetConfFile() const Float_t GetCpuTime() const Int_t GetGroupId() const Int_t GetGroupSize() const const char* GetImage() const Int_t GetLogLevel() const TDSetElement* GetNextPacket(Long64_t totalEntries = -1) virtual void GetOptions(Int_t* argc, char** argv) const char* GetOrdinal() const TProof* GetProof() const Int_t GetProtocol() const Float_t GetRealTime() const const char* GetService() const const char* GetSessionDir() const TSocket* GetSocket() const const char* GetUser() const const char* GetWorkDir() const virtual TProofServ::EQueryAction GetWorkers(TList* workers, Int_t& prioritychange) virtual void HandleSigPipe() virtual void HandleSocketInput() virtual void HandleUrgentData() void Interrupt() virtual TClass* IsA() const static Bool_t IsActive() Bool_t IsEndMaster() const Bool_t IsMaster() const Bool_t IsParallel() const Bool_t IsTopMaster() const virtual void Print(Option_t* option = "") const Int_t ReceiveFile(const char* file, Bool_t bin, Long64_t size) void Reset(const char* dir) virtual void Run(Bool_t retrn = kFALSE) virtual void SendLogFile(Int_t status = 0, Int_t start = -1, Int_t end = -1) void SendParallel() void SendStatistics() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Terminate(Int_t status) static TProofServ* This()

Data Members

    private:
TString fService service we are running, either "proofserv" or "proofslave" TString fUser user as which we run TString fConfDir directory containing cluster config information TString fConfFile file containing config information TString fWorkDir directory containing all proof related info TString fImage image name of the session TString fSessionTag tag for the session TString fSessionDir directory containing session dependent files TString fPackageDir directory containing packages and user libs TString fCacheDir directory containing cache of user files TString fQueryDir directory containing query results and status TString fDataSetDir directory containing info about known data sets TProofLockPath* fPackageLock package dir locker TProofLockPath* fCacheLock cache dir locker TProofLockPath* fQueryLock query dir locker TProofLockPath* fDataSetLock dataset dir locker TString fArchivePath default archive path TSocket* fSocket socket connection to client TProof* fProof PROOF talking to slave servers TProofPlayer* fPlayer actual player FILE* fLogFile log file Int_t fLogFileDes log file descriptor TList* fEnabledPackages list of enabled packages Int_t fProtocol protocol version number TString fOrdinal slave ordinal number Int_t fGroupId slave unique id in the active slave group Int_t fGroupSize size of the active slave group Int_t fLogLevel debug logging level Int_t fNcmd command history number Bool_t fEndMaster true for a master in direct contact only with workers Bool_t fMasterServ true if we are a master server Bool_t fInterrupt if true macro execution will be stopped Float_t fRealTime real time spent executing commands Float_t fCpuTime CPU time spent executing commands TStopwatch fLatency measures latency of packet requests TStopwatch fCompute measures time spend processing a packet Int_t fSeqNum sequential number of last processed query Int_t fDrawQueries number of draw queries processed Int_t fKeptQueries number of queries fully in memory and in dir TList* fQueries list of TProofQueryResult objects TList* fPreviousQueries list of TProofQueryResult objects from previous sections TList* fWaitingQueries list of TProofQueryResult wating to be processed Bool_t fIdle TRUE if idle Bool_t fShutdownWhenIdle If TRUE, start shutdown delay countdown when idle TTimer* fShutdownTimer Timer used for delayed session shutdown TMutex* fShutdownTimerMtx Actions on the timer must be atomic static Int_t fgMaxQueries Max number of queries fully kept public:
static const TProofServ::EQueryAction kQueryOK static const TProofServ::EQueryAction kQueryModify static const TProofServ::EQueryAction kQueryStop

Class Description

                                                                      
 TProofServ                                                           
                                                                      
 TProofServ is the PROOF server. It can act either as the master      
 server or as a slave server, depending on its startup arguments. It  
 receives and handles message coming from the client or from the      
 master server.                                                       
                                                                      

TProofServ(Int_t *argc, char **argv, FILE *flog)
 Main constructor. Create an application environment. The TProofServ
 environment provides an eventloop via inheritance of TApplication.
 Actual server creation work is done in CreateServer() to allow
 overloading.
void CreateServer()
 Finalize the server setup. If master, create the TProof instance to talk
 the worker or submaster nodes.
~TProofServ()
 Cleanup. Not really necessary since after this dtor there is no
 live anyway.
Int_t CatMotd()
 Print message of the day (in fConfDir/etc/proof/motd). The motd
 is not shown more than once a dat. If the file fConfDir/etc/proof/noproof
 exists, show its contents and close the connection.
TObject * Get(const char *namecycle)
 Get object with name "name;cycle" (e.g. "aap;2") from master or client.
 This method is called by TDirectory::Get() in case the object can not
 be found locally.
TDSetElement * GetNextPacket(Long64_t totalEntries)
 Get next range of entries to be processed on this server.
void GetOptions(Int_t *argc, char **argv)
 Get and handle command line options. Fixed format:
 "proofserv"|"proofslave" <confdir>
void HandleSocketInput()
 Handle input coming from the client or from the master server.
void HandleSocketInputDuringProcess()
 Handle messages that might arrive during processing while being in
 HandleSocketInput(). This avoids recursive calls into HandleSocketInput().
void HandleUrgentData()
 Handle Out-Of-Band data sent by the master or client.
void HandleSigPipe()
 Called when the client is not alive anymore (i.e. when kKeepAlive
 has failed).
Bool_t IsParallel()
 True if in parallel mode.
void Print(Option_t *option)
 Print status of slave server.
void RedirectOutput()
 Redirect stdout to a log file. This log file will be flushed to the
 client or master after each command.
void Reset(const char *dir)
 Reset PROOF environment to be ready for execution of next command.
Int_t ReceiveFile(const char *file, Bool_t bin, Long64_t size)
 Receive a file, either sent by a client or a master server.
 If bin is true it is a binary file, other wise it is an ASCII
 file and we need to check for Windows \r tokens. Returns -1 in
 case of error, 0 otherwise.
void Run(Bool_t retrn)
 Main server eventloop.
void SendLogFile(Int_t status, Int_t start, Int_t end)
 Send log file to master.
 If start > -1 send only bytes in the range from start to end,
 if end <= start send everything from start.
void SendStatistics()
 Send statistics of slave server to master or client.
void SendParallel()
 Send number of parallel nodes to master or client.
Int_t UnloadPackage(const char *package)
 Removes link to package in working directory,
 removes entry from include path,
 removes entry from enabled package list,
 does not currently remove entry from interpreter include path.
Int_t UnloadPackages()
 Unloads all enabled packages.
void Setup()
 Print the ProofServ logo on standard output.
void Terminate(Int_t status)
 Terminate the proof server.
Bool_t IsActive()
 Static function that returns kTRUE in case we are a PROOF server.
TProofServ * This()
 Static function returning pointer to global object gProofServ.
 Mainly for use via CINT, where the gProofServ symbol might be
 deleted from the symbol table.
Int_t OldAuthSetup(TString &conf)
 Setup authentication related stuff for old versions.
 Provided for backward compatibility.
TProofQueryResult * MakeQueryResult(Long64_t nent, const char *opt, TList *inlist, Long64_t fst, TDSet *dset, const char *selec, TEventList *evl)
 Create a TProofQueryResult instance for this query.
void SetQueryRunning(TProofQueryResult *pq)
 Set query in running state.
void AddLogFile(TProofQueryResult *pq)
 Add part of log file concerning TQueryResult pq to its macro
 container.
void FinalizeQuery(TProofPlayer *p, TProofQueryResult *pq)
 Final steps after Process() to complete the TQueryResult instance.
void ScanPreviousQueries(const char *dir)
 Scan the queries directory for the results of previous queries.
 The headers of the query results found are loaded in fPreviousQueries.
 The full query result can be retrieved via TProof::Retrieve.
Int_t LockSession(const char *sessiontag, TProofLockPath **lck)
 Try locking query area of session tagged sessiontag.
 The id of the locking file is returned in fid and must be
 unlocked via UnlockQueryFile(fid).
Int_t CleanupSession(const char *sessiontag)
 Cleanup query dir qdir.
void SaveQuery(TQueryResult *qr, const char *fout)
 Save current status of query 'qr' to file name fout.
 If fout == 0 (default) use the default name.
void RemoveQuery(const char *queryref)
 Remove everything about query queryref.
void RemoveQuery(TQueryResult *qr, Bool_t soft)
 Remove everything about query qr. If soft = TRUE leave a track
 in memory with the relevant info
TProofQueryResult * LocateQuery(TString queryref, Int_t &qry, TString &qdir)
 Locate query referenced by queryref. Return pointer to instance
 in memory, if any, or 0. Fills qdir with the query specific directory
 and qry with the query number for queries processed by this session.
void HandleArchive(TMessage *mess)
 Handle archive request.
void HandleProcess(TMessage *mess)
 Handle processing request.
void HandleQueryList(TMessage *mess)
 Handle request for list of queries.
void HandleRemove(TMessage *mess)
 Handle remove request.
void HandleRetrieve(TMessage *mess)
 Handle retrieve request.
void HandleLibIncPath(TMessage *mess)
 Handle lib, inc search paths modification request
void HandleCheckFile(TMessage *mess)
 Handle file checling request
Int_t HandleCache(TMessage *mess)
 Handle here all cache and package requests
void HandleWorkerLists(TMessage *mess)
 Handle here all requests to modify worker lists
Int_t HandleDataSets(TMessage *mess)
 Handle here all dataset requests
TList * GetDataSet(const char *name)
 Utility function used in various methods for user dataset upload.
void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
 The PROOF error handler function. It prints the message on stderr and
 if abort is set it aborts the application.
void SetShutdownTimer(Bool_t, Int_t)
TProofServ(Int_t *argc, char **argv, FILE *flog = 0)
Int_t GetProtocol()
Int_t GetGroupId()
Int_t GetGroupSize()
Int_t GetLogLevel()
Float_t GetRealTime()
Float_t GetCpuTime()
EQueryAction GetWorkers(TList *workers, Int_t &prioritychange)
void Interrupt()
Bool_t IsEndMaster()
Bool_t IsMaster()
Bool_t IsTopMaster()
void DisableTimeout()
 Disable / Enable read timeout
void EnableTimeout()

Author: Fons Rademakers 16/02/97
Last update: root/proof:$Name: $:$Id: TProofServ.cxx,v 1.131 2006/07/05 14:06:09 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.