library: libProof
#include "TProofServ.h"


class description - header file - source file
viewCVS header - viewCVS source

class TProofServ: public TApplication

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
TProofServ(Int_t* argc, char** argv, FILE* flog = 0)
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual const char*TApplication::ApplicationName() const
Int_tTApplication::Argc() const
char**TApplication::Argv() const
char*TApplication::Argv(Int_t index) const
virtual voidTObject::Browse(TBrowser* b)
virtual voidTQObject::ChangedBy(const char* method)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
virtual voidTObject::Copy(TObject& object) const
static voidTApplication::CreateApplication()
virtual Int_tCreateServer()
virtual voidTObject::Delete(Option_t* option = "")
virtual voidTQObject::Destroyed()
virtual voidDisableTimeout()
Bool_tTQObject::Disconnect(const char* signal = "0", void* receiver = 0, const char* slot = "0")
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = "0", void* receiver = 0, const char* slot = "0")
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = "0")
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
virtual voidEnableTimeout()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TObject*Get(const char* namecycle)
virtual TApplicationImp*TApplication::GetApplicationImp()
const char*GetConfDir() const
const char*GetConfFile() const
Float_tGetCpuTime() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tGetGroupId() const
Int_tGetGroupSize() const
virtual const char*TObject::GetIconName() const
const char*TApplication::GetIdleCommand() const
const char*GetImage() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
Int_tGetLogLevel() const
virtual const char*TObject::GetName() const
TDSetElement*GetNextPacket(Long64_t totalEntries = -1)
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidGetOptions(Int_t* argc, char** argv)
const char*GetOrdinal() const
TProof*GetProof() const
Int_tGetProtocol() const
Float_tGetRealTime() const
const char*GetService() const
const char*GetSessionDir() const
TSignalHandler*TApplication::GetSignalHandler() const
TSocket*GetSocket() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
const char*GetUser() const
const char*GetWorkDir() const
virtual TProofServ::EQueryActionGetWorkers(TList* workers, Int_t& prioritychange)
virtual voidTApplication::HandleIdleTimer()
virtual voidHandleSigPipe()
virtual voidHandleSocketInput()
virtual Bool_tTApplication::HandleTermInput()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual voidHandleUrgentData()
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTObject::Hash() const
virtual voidTApplication::Hide()
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = "0")
virtual voidTApplication::Iconify()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTApplication::Init()
TObjArray*TApplication::InputFiles() const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
static Bool_tIsActive()
virtual Bool_tTApplication::IsCmdThread()
Bool_tIsEndMaster() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsMaster() const
Bool_tTObject::IsOnHeap() const
Bool_tIsParallel() const
Bool_tTApplication::IsRunning() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsTopMaster() const
Bool_tTObject::IsZombie() const
virtual voidTApplication::KeyPressed(Int_t key)
static voidTQObject::LoadRQ_OBJECT()
virtual voidTApplication::Lower()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = "0")
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)
Bool_tTApplication::NoLogoOpt() const
Bool_tTApplication::NoLogOpt() const
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
virtual voidTApplication::Open()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Long_tTApplication::ProcessFile(const char* line, Int_t* error = 0)
virtual Long_tTApplication::ProcessLine(const char* line, Bool_t sync = kFALSE, Int_t* error = 0)
Bool_tTApplication::QuitOpt() const
virtual voidTApplication::Raise()
virtual Int_tTObject::Read(const char* name)
Int_tReceiveFile(const char* file, Bool_t bin, Long64_t size)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTApplication::RemoveIdleTimer()
voidReset(const char* dir)
voidTObject::ResetBit(UInt_t f)
Bool_tTApplication::ReturnFromRun() const
virtual voidTApplication::ReturnPressed(char* text)
virtual voidRun(Bool_t retrn = kFALSE)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidSendLogFile(Int_t status = 0, Int_t start = -1, Int_t end = -1)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTApplication::SetEchoMode(Bool_t mode)
virtual voidTApplication::SetIdleTimer(UInt_t idleTimeInSec, const char* command)
static voidTObject::SetObjectStat(Bool_t stat)
voidTApplication::SetReturnFromRun(Bool_t ret)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTApplication::Show()
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTApplication::StartIdleing()
virtual voidTApplication::StopIdleing()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual voidTerminate(Int_t status)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
static TProofServ*This()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
static voidErrorHandler(Int_t level, Bool_t abort, const char* location, const char* msg)
virtual void*TQObject::GetSender()
virtual const char*TQObject::GetSenderClassName() const
virtual voidHandleArchive(TMessage* mess)
virtual Int_tHandleCache(TMessage* mess)
virtual voidHandleCheckFile(TMessage* mess)
virtual Int_tHandleDataSets(TMessage* mess)
virtual voidHandleLibIncPath(TMessage* mess)
virtual voidHandleProcess(TMessage* mess)
virtual voidHandleQueryList(TMessage* mess)
virtual voidHandleRemove(TMessage* mess)
virtual voidHandleRetrieve(TMessage* mess)
virtual voidHandleSocketInputDuringProcess()
virtual voidHandleWorkerLists(TMessage* mess)
virtual voidTApplication::Help(const char* line)
virtual voidTApplication::InitializeColors()
virtual voidTApplication::LoadGraphicsLibs()
virtual voidTApplication::MakeBatch()
virtual voidSetShutdownTimer(Bool_t, Int_t)
voidTApplication::SetSignalHandler(TSignalHandler* sh)
virtual Int_tSetup()
voidAddLogFile(TProofQueryResult* pq)
Int_tCleanupSession(const char* sessiontag)
voidFinalizeQuery(TProofPlayer* p, TProofQueryResult* pq)
TList*GetDataSet(const char* name)
TProofQueryResult*LocateQuery(TString queryref, Int_t& qry, TString& qdir)
virtual Int_tLockSession(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_tOldAuthSetup(TString& wconf)
virtual voidRedirectOutput()
voidRemoveQuery(const char* queryref)
voidRemoveQuery(TQueryResult* qr, Bool_t soft = kFALSE)
voidSaveQuery(TQueryResult* qr, const char* fout = "0")
voidScanPreviousQueries(const char* dir)
voidSetQueryRunning(TProofQueryResult* pq)
Int_tUnloadPackage(const char* package)

Data Members

enum EQueryAction { kQueryOK
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
TList*TQObject::fListOfSignals! list of signals from this object
TList*TQObject::fListOfConnections! list of connections to this object
TStringfServiceservice we are running, either "proofserv" or "proofslave"
TStringfUseruser as which we run
TStringfConfDirdirectory containing cluster config information
TStringfConfFilefile containing config information
TStringfWorkDirdirectory containing all proof related info
TStringfImageimage name of the session
TStringfSessionTagtag for the session
TStringfSessionDirdirectory containing session dependent files
TStringfPackageDirdirectory containing packages and user libs
TStringfCacheDirdirectory containing cache of user files
TStringfQueryDirdirectory containing query results and status
TStringfDataSetDirdirectory containing info about known data sets
TProofLockPath*fPackageLockpackage dir locker
TProofLockPath*fCacheLockcache dir locker
TProofLockPath*fQueryLockquery dir locker
TProofLockPath*fDataSetLockdataset dir locker
TStringfArchivePathdefault archive path
TSocket*fSocketsocket connection to client
TProof*fProofPROOF talking to slave servers
TProofPlayer*fPlayeractual player
FILE*fLogFilelog file
Int_tfLogFileDeslog file descriptor
TList*fEnabledPackageslist of enabled packages
Int_tfProtocolprotocol version number
TStringfOrdinalslave ordinal number
Int_tfGroupIdslave unique id in the active slave group
Int_tfGroupSizesize of the active slave group
Int_tfLogLeveldebug logging level
Int_tfNcmdcommand history number
Bool_tfEndMastertrue for a master in direct contact only with workers
Bool_tfMasterServtrue if we are a master server
Bool_tfInterruptif true macro execution will be stopped
Float_tfRealTimereal time spent executing commands
Float_tfCpuTimeCPU time spent executing commands
TStopwatchfLatencymeasures latency of packet requests
TStopwatchfComputemeasures time spend processing a packet
Int_tfSeqNumsequential number of last processed query
Int_tfDrawQueriesnumber of draw queries processed
Int_tfKeptQueriesnumber of queries fully in memory and in dir
TList*fQuerieslist of TProofQueryResult objects
TList*fPreviousQuerieslist of TProofQueryResult objects from previous sections
TList*fWaitingQuerieslist of TProofQueryResult wating to be processed
Bool_tfIdleTRUE if idle
Bool_tfShutdownWhenIdleIf TRUE, start shutdown delay countdown when idle
TTimer*fShutdownTimerTimer used for delayed session shutdown
TMutex*fShutdownTimerMtxActions on the timer must be atomic
static Int_tfgMaxQueriesMax number of queries fully kept

Class Description

 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
Int_t CreateServer()
 Finalize the server setup. If master, create the TProof instance to talk
 the worker or submaster nodes.
 Return 0 on success, -1 on error
 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 day. 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.
Int_t Setup()
 Print the ProofServ logo on standard output.
 Return 0 on success, -1 on failure
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
void FinalizeQuery(TProofPlayer *p, TProofQueryResult *pq)
 Final steps after Process() to complete the TQueryResult instance.
Int_t CleanupQueriesDir()
 Remove all queries results referring to previous sessions
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 checking 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)
{ }
TProof * GetProof()
{ return fProof; }
const char * GetService()
{ return fService; }
const char * GetConfDir()
{ return fConfDir; }
const char * GetConfFile()
{ return fConfFile; }
const char * GetUser()
{ return fUser; }
const char * GetWorkDir()
{ return fWorkDir; }
const char * GetImage()
{ return fImage; }
const char * GetSessionDir()
{ return fSessionDir; }
Int_t GetProtocol()
{ return fProtocol; }
const char * GetOrdinal()
{ return fOrdinal; }
Int_t GetGroupId()
{ return fGroupId; }
Int_t GetGroupSize()
{ return fGroupSize; }
Int_t GetLogLevel()
{ return fLogLevel; }
TSocket * GetSocket()
{ return fSocket; }
Float_t GetRealTime()
{ return fRealTime; }
Float_t GetCpuTime()
{ return fCpuTime; }
EQueryAction GetWorkers(TList *workers, Int_t &prioritychange)
void Interrupt()
{ fInterrupt = kTRUE; }
Bool_t IsEndMaster()
{ return fEndMaster; }
Bool_t IsMaster()
{ return fMasterServ; }
Bool_t IsTopMaster()
{ return fOrdinal == "0"; }
void DisableTimeout()
 Disable / Enable read timeout
{ }
void EnableTimeout()
{ }

Author: Fons Rademakers 16/02/97
Last update: root/proof:$Name: $:$Id: TProofServ.cxx,v 1.154 2006/12/12 14:05:41 rdm 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.