13 #ifndef ROOT_TProofServ 14 #define ROOT_TProofServ 188 const char *selec,
TObject *elist);
306 void Reset(
const char *dir);
395 static void SetDefaultPrefix(
const char *pfx);
396 static Int_t GetCmdRtn();
437 void AddPid(
Int_t pid);
virtual void HandleException(Int_t sig)
Exception handler: we do not try to recover here, just exit.
Bool_t AcceptResults(Int_t connections, TVirtualProofPlayer *mergerPlayer)
Accept and merge results from a set of workers.
Int_t GetLogLevel() const
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)
const char * GetCacheDir() const
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 * GetTopSessionTag() const
Long64_t GetMsgSizeHWM() 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.
const char * GetGroup() const
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.
TSocket * GetSocket() 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.
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 GetProtocol() const
Bool_t IsTopMaster() const
TMonitor * fMergingMonitor
const char * GetDataDirOpts() 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.
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.
TList * GetListOfEnabled() const
Get list of enabled packages Returns a pointer to a TList object, transferring ownership to the calle...
static struct mg_connection * fc(struct mg_context *ctx)
virtual void HandleTermination()
Int_t GetQuerySeqNum() const
Int_t GetCompressionLevel() const
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()
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 *)
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.
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'.
Float_t GetRealTime() const
Int_t GetActSessions() 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.
Int_t GetGroupSize() 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.
Bool_t ReadNotify()
Notify when something can be read from the descriptor associated with this handler.
Float_t GetCpuTime() const
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
const char * GetSessionTag() const
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.
Bool_t IsEndMaster() 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.
Class managing the query-result area.
Class providing the PROOF server.
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
const char * GetSessionDir() 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.
TIdleTOTimer * fIdleTOTimer
TProofLockPathGuard(TProofLockPath *l)
const char * GetConfDir() const
virtual void HandleSigPipe()
Called when the client is not alive anymore (i.e.
Handles synchronous and a-synchronous timer events.
TServerSocket * fMergingSocket
static Bool_t IsActive()
Static function that returns kTRUE in case we are a PROOF server.
TPackMgr * GetPackMgr() const
virtual void ProcessNext(TString *slb=0)
process the next query from the queue of submitted jobs.
TList * GetEnabledPackages() const
TShutdownTimer * fShutdownTimer
Int_t SendResults(TSocket *sock, TList *outlist=0, TQueryResult *pq=0)
Sends all objects from the given list to the specified socket.
virtual void HandleSubmerger(TMessage *mess)
Handle a message of type kPROOF_SUBMERGER.
const char * GetConfFile() const
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.
Float_t GetEffSessions() const
Int_t OldAuthSetup(TString &wconf)
Setup authentication related stuff for old versions.
virtual void SendLogFile(Int_t status=0, Int_t start=-1, Int_t end=-1)
Send log file to master.
const char * GetService() const
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 ...
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 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.
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.
const char * GetImage() 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...
const char * GetWorkDir() const
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.
TProof * GetProof() const
virtual void DeletePlayer()
Delete player instance.
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.
Int_t GetTotSessions() const
void Print(Option_t *option="") const
Print status of slave server.
void SendStatistics()
Send statistics of slave server to master or client.
const char * GetDataDir() const
const char * GetUser() const
static void ErrorHandler(Int_t level, Bool_t abort, const char *location, const char *msg)
The PROOF error handler function.
Bool_t IsParallel() const
True if in parallel mode.
virtual void EnableTimeout()
Int_t CleanupWaitingQueries(Bool_t del=kTRUE, TList *qls=0)
Cleanup the waiting queries list.
static TString fgSysLogService
const char * GetOrdinal() const
TProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
TProofServLogHandler * fExecHandler
TProofLockPath * fCacheLock
TQueryResultManager * fQMgr
const char * GetPrefix() const
TProofLockPath * fQueryLock
static Long64_t fgLastEntry