13 #ifndef ROOT_TProofServ 14 #define ROOT_TProofServ 27 #ifndef ROOT_TApplication 33 #ifndef ROOT_TSysEvtHandler 36 #ifndef ROOT_TStopwatch 45 #ifndef ROOT_TProofQueryResult 202 const char *selec,
TObject *elist);
320 void Reset(
const char *dir);
409 static void SetDefaultPrefix(
const char *pfx);
410 static Int_t GetCmdRtn();
451 void AddPid(
Int_t pid);
virtual void HandleException(Int_t sig)
Exception handler: we do not try to recover here, just exit.
const char * GetSessionDir() const
Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *mergerPlayer)
Accept and merge results from a set of workers.
static FILE * SetErrorHandlerFile(FILE *ferr)
Set the file stream where to log (default stderr).
static FILE * fgErrorHandlerFile
Int_t CatMotd()
Print message of the day (in the file pointed by the env PROOFMOTD or from fConfDir/etc/proof/motd).
Bool_t IsIdle()
Return the idle status.
The PROOF package manager contains tools to manage packages.
virtual void HandleRemove(TMessage *mess, TString *slb=0)
Handle remove request.
void GetOptions(Int_t *argc, char **argv)
Get and handle command line options.
Version of the PROOF worker server for local running.
void LogToMaster(Bool_t on=kTRUE)
Bool_t IsWaiting()
Return kTRUE if the session is waiting for the OK to start processing.
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
static Long_t fgResMemMax
Int_t SetupCommon()
Common part (between TProofServ and TXProofServ) of the setup phase.
TProofLockPath * GetCacheLock()
const char * GetDataDir() const
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any. ...
This class implements a data set to be used for PROOF processing.
virtual Int_t HandleDataSets(TMessage *mess, TString *slb=0)
Handle here requests about datasets.
virtual void MakePlayer()
Make player instance.
virtual void HandleProcess(TMessage *mess, TString *slb=0)
Handle processing request.
TVirtualProofPlayer * fPlayer
Bool_t UnlinkDataDir(const char *path)
Scan recursively the datadir and unlink it if empty Return kTRUE if it can be unlinked, kFALSE otherwise.
const char * GetSessionTag() const
static Long_t GetVirtMemMax()
VirtMemMax getter.
TDataSetManager * fDataSetManager
Int_t WaitingQueries()
Return the number of waiting queries.
Int_t UpdateSessionStatus(Int_t xst=-1)
Update the session status in the relevant file.
Float_t GetCpuTime() const
virtual Int_t HandleLibIncPath(TMessage *mess)
Handle lib, inc search paths modification request.
TDataSetManagerFile * fDataSetStgRepo
void SetQueryRunning(TProofQueryResult *pq)
Set query in running state.
TReaperTimer * fReaperTimer
Int_t GetCompressionLevel() const
const char * GetGroup() const
const char * GetTopSessionTag() const
TMonitor * fMergingMonitor
Int_t GetActSessions() const
static void ResolveKeywords(TString &fname, const char *path=0)
Replace <ord>, <user>, <u>, <group>, <stag>, <qnum>, <file>, <rver> and <build> placeholders in fname...
static Float_t GetMemHWM()
MemHWM getter.
static Long_t fgVirtMemMax
virtual void HandleCheckFile(TMessage *mess, TString *slb=0)
Handle file checking request.
void SendParallel(Bool_t async=kFALSE)
Send number of parallel nodes to master or client.
const char * GetService() const
virtual void HandleSocketInput()
Handle input coming from the client or from the master server.
std::recursive_mutex fQMtx
virtual void HandleArchive(TMessage *mess, TString *slb=0)
Handle archive request.
Manages an element of a TDSet.
static void SetLastEntry(Long64_t lastentry)
Set the last entry before exception.
static struct mg_connection * fc(struct mg_context *ctx)
virtual void HandleTermination()
TIdleTOTimer(TProofServ *p, Int_t delay)
#define ClassDef(name, id)
virtual void HandleFork(TMessage *mess)
Cloning itself via fork. Not implemented.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual ~TIdleTOTimerGuard()
Float_t GetEffSessions() const
The TNamed class is the base class for all named ROOT classes.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
TIdleTOTimerGuard(TIdleTOTimer *t)
virtual void ReleaseWorker(const char *)
Int_t GetQuerySeqNum() const
TDSetElement * GetNextPacket(Long64_t totalEntries=-1)
Get next range of entries to be processed on this server.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
Float_t GetRealTime() const
virtual void HandleUrgentData()
Handle Out-Of-Band data sent by the master or client.
TFileHandler * fInputHandler
TIdleTOTimer * fIdleTOTimer
static Int_t RegisterDataSets(TList *in, TList *out, TDataSetManager *dsm, TString &e)
Register TFileCollections in 'out' as datasets according to the rules in 'in'.
TPackMgr * GetPackMgr() const
TProofQueryResult * NextQuery()
Get the next query from the waiting list.
void FlushLogFile()
Reposition the read pointer in the log file to the very end.
virtual ~TProofServ()
Cleanup.
Long64_t GetMsgSizeHWM() const
static Long_t GetResMemMax()
ResMemMax getter.
virtual Int_t HandleCache(TMessage *mess, TString *slb=0)
Handle here all cache and package requests.
virtual void HandleQueryList(TMessage *mess)
Handle request for list of queries.
A container class for query results.
const char * GetWorkDir() const
Bool_t ReadNotify()
Notify when something can be read from the descriptor associated with this handler.
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
virtual Int_t Fork()
Fork a child.
static TProofServ * This()
Static function returning pointer to global object gProofServ.
static Float_t GetMemStop()
MemStop getter.
void SendAsynMessage(const char *msg, Bool_t lf=kTRUE)
Send an asychronous message to the master / client .
virtual void DisableTimeout()
Int_t GetPriority()
Get the processing priority for the group the user belongs too.
TSocket * GetSocket() const
static Int_t fgLogToSysLog
Int_t ReceiveFile(const char *file, Bool_t bin, Long64_t size)
Receive a file, either sent by a client or a master server.
const char * GetPrefix() const
Class managing the query-result area.
Class providing the PROOF server.
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
TProof * GetProof() const
TProofLockPath(const char *path)
Int_t QueueQuery(TProofQueryResult *pq)
Add a query to the waiting list Returns the number of queries in the list.
const char * GetConfDir() const
TIdleTOTimer * fIdleTOTimer
TProofLockPathGuard(TProofLockPath *l)
virtual void HandleSigPipe()
Called when the client is not alive anymore (i.e.
Handles synchronous and a-synchronous timer events.
Bool_t IsEndMaster() const
TServerSocket * fMergingSocket
Int_t GetProtocol() const
static Bool_t IsActive()
Static function that returns kTRUE in case we are a PROOF server.
const char * GetCacheDir() const
virtual void ProcessNext(TString *slb=0)
process the next query from the queue of submitted jobs.
TShutdownTimer * fShutdownTimer
const char * GetUser() const
Int_t SendResults(TSocket *sock, TList *outlist=0, TQueryResult *pq=0)
Sends all objects from the given list to the specified socket.
const char * GetImage() const
virtual void HandleSubmerger(TMessage *mess)
Handle a message of type kPROOF_SUBMERGER.
virtual void HandleRetrieve(TMessage *mess, TString *slb=0)
Handle retrieve request.
virtual Int_t HandleWorkerLists(TMessage *mess)
Handle here all requests to modify worker lists.
TObject * Get(const char *namecycle)
Get object with name "name;cycle" (e.g.
Int_t OldAuthSetup(TString &wconf)
Setup authentication related stuff for old versions.
const char * GetConfFile() const
virtual void SendLogFile(Int_t status=0, Int_t start=-1, Int_t end=-1)
Send log file to master.
TList * GetListOfEnabled() const
Get list of enabled packages Returns a pointer to a TList object, transferring ownership to the calle...
void Reset(const char *dir)
Reset PROOF environment to be ready for execution of next command.
Int_t(* OldProofServAuthSetup_t)(TSocket *, Bool_t, Int_t, TString &, TString &, TString &)
Int_t Lock()
Locks the directory.
void Run(Bool_t retrn=kFALSE)
Main server eventloop.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
const char * GetOrdinal() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Int_t GetGroupSize() const
TList * GetEnabledPackages() const
Int_t Unlock()
Unlock the directory.
void SetIdle(Bool_t st=kTRUE)
Change the idle status.
TQueryResult version adapted to PROOF neeeds.
static TMap * GetDataSetNodeMap(TFileCollection *fc, TString &emsg)
Get a map {server-name, list-of-files} for collection 'fc' to be used in TPacketizerFile.
void Print(Option_t *option="") const
Print status of slave server.
static TString fgSysLogEntity
Mother of all ROOT objects.
void TruncateLogFile()
Truncate the log file to the 80% of the required max size if this is set.
Int_t GetLogLevel() const
R__EXTERN TProofServ * gProofServ
virtual Int_t CreateServer()
Finalize the server setup.
Int_t UnloadPackage(const char *package)
Int_t GetSessionStatus()
Return the status of this session: 0 idle 1 running 2 being terminated (currently unused) 3 queued 4 ...
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
TProofQueryResult * MakeQueryResult(Long64_t nentries, const char *opt, TList *inl, Long64_t first, TDSet *dset, const char *selec, TObject *elist)
Create a TProofQueryResult instance for this query.
virtual Int_t Setup()
Print the ProofServ logo on standard output.
Bool_t IsTopMaster() const
virtual void DeletePlayer()
Delete player instance.
Int_t GetTotSessions() const
void RedirectOutput(const char *dir=0, const char *mode="w")
Redirect stdout to a log file.
static void SetLastMsg(const char *lastmsg)
Set the message to be sent back in case of exceptions.
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
TReaperTimer(Long_t frequency=1000)
void RestartComputeTime()
Reset the compute time.
Abstract interface for the PROOF player.
virtual void Terminate(Int_t status)
Terminate the proof server.
Bool_t IsParallel() const
True if in parallel mode.
void SendStatistics()
Send statistics of slave server to master or client.
static void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
The PROOF error handler function.
virtual void EnableTimeout()
Int_t CleanupWaitingQueries(Bool_t del=kTRUE, TList *qls=0)
Cleanup the waiting queries list.
static TString fgSysLogService
TProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
TProofServLogHandler * fExecHandler
TProofLockPath * fCacheLock
TQueryResultManager * fQMgr
TProofLockPath * fQueryLock
static Long64_t fgLastEntry
const char * GetDataDirOpts() const