27 #ifndef ROOT_TProofMgr 30 #ifndef ROOT_TProofDebug 39 #ifndef ROOT_MessageTypes 48 #ifndef ROOT_TSysEvtHandler 54 #ifndef ROOT_TProofOutputList 57 #ifndef ROOT_TStopwatch 60 #ifndef ROOT_TVirtualMutex 71 namespace std { using ::map; }
74 #define CANNOTUSE(x) Info(x,"Not manager: cannot use this method") 171 const char*
const kCP =
"/bin/cp -fp";
172 const char*
const kRM =
"/bin/rm -rf";
173 const char*
const kLS =
"/bin/ls -l";
174 const char*
const kUNTAR =
"%s -c %s/%s | (cd %s; tar xf -)";
175 const char*
const kUNTAR2 =
"%s -c %s | (cd %s; tar xf -)";
176 const char*
const kUNTAR3 =
"%s -c %s | (tar xf -)";
179 const char*
const kCP =
"copy";
180 const char*
const kRM =
"delete";
181 const char*
const kLS =
"dir";
182 const char*
const kUNTAR =
"...";
183 const char*
const kUNTAR2 =
"...";
184 const char*
const kUNTAR3 =
"...";
185 const char*
const kGUNZIP =
"gunzip";
207 fTotal(tot), fProcessed(proc), fBytesRead(bytes),
208 fInitTime(initt), fProcTime(proct), fEvtRateI(evts), fMBRateI(mbs),
209 fActWorkers(actw), fTotSessions(tsess), fEffSessions(esess) { }
255 const char *msd =
"",
const char *datadir =
"") :
256 fOrdinal(ordinal), fHostName(host), fMsd(msd), fDataDir(datadir),
257 fPerfIndex(perfidx), fSysInfo(), fStatus(kNotActive) { }
260 const char *
GetMsd()
const {
return fMsd; }
261 const char *
GetName()
const {
return fHostName; }
297 fMerger(t), fPort(port), fMergedObjects(0), fWorkersToMerge(forHowManyWorkers),
298 fMergedWorkers(0), fWorkers(0), fIsActive(
kTRUE) { }
301 void AddWorker(
TSlave *sl);
311 void SetMergedWorker();
314 Bool_t AreAllWorkersAssigned();
315 Bool_t AreAllWorkersMerged();
335 fExp.
Form(
"%c (%d workers still sending) ", fgCr[fIdx], fNWrks);
336 changed = (fLastNWrks != fNWrks || fLastNWrks == -1) ?
kTRUE :
kFALSE;
338 return fExp.
Data(); }
349 friend class TPacketizerDev;
372 kUsingSessionGui =
BIT(14),
377 kUseProgressDialog =
BIT(19)
385 kOverwriteDataSet = 0x2,
386 kNoOverwriteDataSet = 0x4,
387 kOverwriteAllFiles = 0x8,
388 kOverwriteNoFiles = 0x10,
393 kOverwriteIfExists = 1,
424 kLocalInterrupt = -1,
438 kShowEnabledPackages = 8,
441 kShowSubPackages = 11,
442 kDisableSubPackages = 12,
443 kDisableSubPackage = 13,
444 kBuildSubPackage = 14,
446 kDisablePackage = 16,
447 kUnloadPackages = 17,
448 kDisablePackages = 18,
450 kListEnabledPackages = 20,
455 kCheckDataSetName = 2,
457 kRegisterDataSet = 4,
465 kSetDefaultTreeName = 12,
467 kRequestStaging = 14,
481 kDeactivateWorker = 2
484 kDontBuildOnClient = -2,
485 kBuildOnSlavesNoWait = -1,
487 kCollectBuildResults = 1
628 void operator=(
const TProof &);
630 void CleanGDirectory(
TList *ol);
633 Int_t SendCommand(
const char *cmd,
ESlaves list = kActive);
638 Int_t SendGroupView();
639 Int_t SendInitialState();
643 void AskStatistics();
649 void NotifyLogMsg(
const char *msg,
const char *sfx =
"\n");
653 Int_t UnloadPackage(
const char *package);
654 Int_t UnloadPackages();
655 Int_t DisablePackage(
const char *package);
656 Int_t DisablePackages();
658 void Activate(
TList *slaves = 0);
665 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile,
TList *wrks);
666 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile = 0,
ESlaves list = kAllUnique);
667 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
ESlaves list = kAllUnique);
668 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
TList *workers);
682 virtual void FindUniqueSlaves();
688 Int_t GetNumberOfSlaves()
const;
689 Int_t GetNumberOfActiveSlaves()
const;
690 Int_t GetNumberOfInactiveSlaves()
const;
691 Int_t GetNumberOfUniqueSlaves()
const;
692 Int_t GetNumberOfBadSlaves()
const;
696 Int_t RestoreActiveList();
697 void SaveActiveList();
700 void InterruptCurrentMonitor();
704 void MarkBad(
TSlave *wrk,
const char *reason = 0);
705 void MarkBad(
TSocket *s,
const char *reason = 0);
706 void TerminateWorker(
TSlave *wrk);
707 void TerminateWorker(
const char *ord);
709 void ActivateAsyncInput();
710 void DeActivateAsyncInput();
719 Int_t GetActiveMergersCount();
720 Int_t FindNextFreeMerger();
722 void AskForOutput(
TSlave *sl);
726 void ResetMergePrg();
727 void ParseConfigField(
const char *config);
729 Bool_t Prompt(
const char *p);
732 static TList *GetDataSetSrvMaps(
const TString &srvmaps);
737 Int_t Init(
const char *masterurl,
const char *conffile,
738 const char *confdir,
Int_t loglevel,
739 const char *alias = 0);
751 void HandleLibIncPath(
const char *
what,
Bool_t add,
const char *dirs);
754 TSlave *CreateSlave(
const char *url,
const char *ord,
755 Int_t perf,
const char *image,
const char *workdir);
756 TSlave *CreateSubmaster(
const char *url,
const char *ord,
757 const char *image,
const char *msd,
Int_t nwk = 1);
759 virtual Int_t PollForNewWorkers();
760 virtual void SaveWorkerInfo();
768 virtual void ValidateDSet(
TDSet *dset);
770 Int_t VerifyDataSetParallel(
const char *uri,
const char *optStr);
774 Int_t AssertPath(
const char *path,
Bool_t writable);
777 void PrepareInputDataFile(
TString &dataFile);
778 virtual void SendInputDataFile();
779 Int_t SendFile(
const char *file,
Int_t opt = (kBinary | kForward | kCp | kCpBin),
780 const char *rfile = 0,
TSlave *sl = 0);
787 static void *SlaveStartupThread(
void *arg);
791 static void AssertMacroPath(
const char *macro);
802 static void SystemCmd(
const char *cmd,
Int_t fdout);
807 const char *alias = 0,
TProofMgr *mgr = 0);
810 void cd(
Int_t id = -1);
817 TString Getenv(
const char *env,
const char *ord =
"0");
818 Int_t GetRC(
const char *RCenv,
Int_t &env,
const char *ord =
"0");
819 Int_t GetRC(
const char *RCenv,
Double_t &env,
const char *ord =
"0");
820 Int_t GetRC(
const char *RCenv,
TString &env,
const char *ord =
"0");
828 virtual Long64_t Process(
const char *dsetname,
const char *selector,
847 const char *selection =
"",
850 Long64_t DrawSelect(
const char *dsetname,
const char *varexp,
851 const char *selection =
"",
855 Int_t Archive(
const char *queryref,
const char *url = 0);
856 Int_t CleanupSession(
const char *sessiontag);
861 Int_t Retrieve(
Int_t query,
const char *path = 0);
862 Int_t Retrieve(
const char *queryref,
const char *path = 0);
864 void DisableGoAsyn();
865 void GoAsynchronous();
866 void StopProcess(
Bool_t abort,
Int_t timeout = -1);
870 virtual Int_t Echo(
const char *str);
880 virtual void ClearCache(
const char *file = 0);
881 TList *GetListOfPackages();
882 TList *GetListOfEnabledPackages();
885 Int_t ClearPackages();
886 Int_t ClearPackage(
const char *package);
887 Int_t DownloadPackage(
const char *
par,
const char *dstdir = 0);
889 Int_t EnablePackage(
const char *package,
const char *loadopts,
891 Int_t EnablePackage(
const char *package,
TList *loadopts,
904 Int_t UploadDataSet(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
905 Int_t UploadDataSetFromFile(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
908 virtual TMap *
GetDataSets(
const char *uri =
"",
const char* optStr =
"");
909 virtual void ShowDataSets(
const char *uri =
"",
const char* optStr =
"");
911 TMap *GetDataSetQuota(
const char* optStr =
"");
912 void ShowDataSetQuota(
Option_t* opt = 0);
915 void ShowDataSet(
const char *dataset =
"",
const char* opt =
"filter:SsCc");
919 TList *FindDataSets(
const char *searchString,
const char* optStr =
"");
920 virtual Bool_t RequestStagingDataSet(
const char *dataset);
922 virtual void ShowStagingStatusDataSet(
const char *dataset,
const char *optStr =
"filter:SsCc");
923 virtual Bool_t CancelStagingDataSet(
const char *dataset);
925 virtual Int_t SetDataSetTreeName(
const char *dataset,
const char *treename);
927 virtual void ShowDataSetCache(
const char *dataset = 0);
928 virtual void ClearDataSetCache(
const char *dataset = 0);
930 virtual void ShowData();
931 void ClearData(
UInt_t what = kUnregistered,
const char *dsname = 0);
947 Int_t GetParallel()
const;
950 TList *GetListOfSlaveInfos();
977 void SetParameter(
const char *par,
const char *value);
978 void SetParameter(
const char *par,
Int_t value);
979 void SetParameter(
const char *par,
Long_t value);
980 void SetParameter(
const char *par,
Long64_t value);
981 void SetParameter(
const char *par,
Double_t value);
982 TObject *GetParameter(
const char *par)
const;
983 void DeleteParameters(
const char *wildcard);
984 void ShowParameters(
const char *wildcard =
"PROOF_*")
const;
988 TList *GetInputList();
989 TObject *GetOutput(
const char *name);
990 TList *GetOutputList();
991 static TObject *GetOutput(
const char *name,
TList *out);
997 void SetInputDataFile(
const char *datafile);
998 void ClearInputData(
TObject *obj = 0);
999 void ClearInputData(
const char *name);
1001 void AddFeedback(
const char *name);
1002 void RemoveFeedback(
const char *name);
1003 void ClearFeedback();
1004 void ShowFeedback()
const;
1005 TList *GetFeedbackList()
const;
1008 Int_t GetNumberOfQueries();
1010 TList *GetQueryResults();
1012 void GetMaxQueries();
1013 void SetMaxDrawQueries(
Int_t max);
1014 void ShowQueries(
Option_t *opt =
"");
1020 void LogMessage(
const char *msg,
Bool_t all);
1029 void Feedback(
TList *objs);
1030 void QueryResultReady(
const char *ref);
1031 void CloseProgressDialog();
1032 void ResetProgressDialog(
const char *sel,
Int_t sz,
1034 void StartupMessage(
const char *msg,
Bool_t status,
Int_t done,
1036 void DataSetStatus(
const char *msg,
Bool_t status,
1041 void GetLog(
Int_t start = -1,
Int_t end = -1);
1044 void ShowLog(
Int_t qry = -1);
1045 void ShowLog(
const char *queryref);
1054 TList *GetOutputNames();
1056 void AddChain(
TChain *chain);
1057 void RemoveChain(
TChain *chain);
1065 virtual void SetAlias(
const char *alias=
"");
1081 Int_t SavePerfTree(
const char *pf = 0,
const char *qref = 0);
1082 void SetPerfTree(
const char *pf =
"perftree.root",
Bool_t withWrks =
kFALSE);
1085 static TProof *Open(
const char *url = 0,
const char *conffile = 0,
1086 const char *confdir = 0,
Int_t loglevel = 0);
1087 static void LogViewer(
const char *url = 0,
Int_t sessionidx = 0);
1091 static void AddEnvVar(
const char *name,
const char *value);
1092 static void DelEnvVar(
const char *name);
1093 static const TList *GetEnvVars();
1094 static void ResetEnvVars();
std::map< TString, MD5Mod_t > FileMap_t
std::string GetName(const std::string &scope_name)
void(* PrintProgress_t)(Long64_t tot, Long64_t proc, Float_t proctime, Long64_t bytes)
This class starts a PROOF session on the local machine: no daemons, client and master merged...
const Long64_t kPROOF_DynWrkPollInt_s
TMap * GetDataSets(const char *owner="", const char *server="", const char *opt=0)
GetDataSets wrapper.
TList * GetListOfBadSlaves() const
The PROOF package manager contains tools to manage packages.
const char *const kGUNZIP
const char * GetName() const
Returns name of object.
Long64_t GetBytesRead() const
Internal class steering processing in PROOF.
TMonitor * fAllUniqueMonitor
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
This class represents a WWW compatible URL.
This class implements a data set to be used for PROOF processing.
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session...
const char *const kPROOF_WorkDir
Int_t Broadcast(Int_t kind, TList *slaves)
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
const char * GetOrdinal() const
TList * GetListOfInactiveSlaves() const
Class supporting a collection of lines with C++ code.
TList * GetListOfSlaves() const
void SetDSet(TDSet *dset)
Int_t GetClientProtocol() const
Version of TSlave for local worker servers.
const char *const kPROOF_PackageLockFile
const char * GetConfFile() const
Int_t VerifyDataSet(const char *dsname, const char *opt=0, const char *redir=0)
VerifyDataSet wrapper.
static TPluginHandler * fgLogViewer
This is the version of TSlave for workers servers based on XProofD.
Bool_t UseDynamicStartup() const
Int_t GetWorkersToMerge()
const char * GetDataPoolUrl() const
const char *const kPROOF_PackDownloadDir
TVirtualProofPlayer * fPlayer
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
Int_t GetSessionID() const
Bool_t fFinalizationRunning
This class generates packets to be processed on PROOF worker servers.
const char * GetConfDir() const
TSignalHandler * fIntHandler
void AddMergedObjects(Int_t objects)
static struct mg_connection * fc(struct mg_context *ctx)
Bool_t SendingLogToWindow() const
TPluginHandler * fProgressDialog
Int_t fLastAssignedMerger
Bool_t fSendGroupView
list returned by kPROOF_GETSLAVEINFO
const char * Export(Bool_t &changed)
#define ClassDef(name, id)
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
This code implements the MD5 message-digest algorithm.
The TNamed class is the base class for all named ROOT classes.
Int_t GetLogLevel() const
const char *const kPROOF_QueryDir
Bool_t IsEndMaster() const
void Init(TClassEdit::TInterpreterLookupHelper *helper)
const char *const kPROOF_WorkerIdleTO
const char * GetGroup() const
TProofInterruptHandler(TProof *p)
const char * GetWorkDir() const
const char * GetSessionTag() const
TList * GetEnabledPackages() const
const char * GetDataDir() const
Version of TProofPlayerRemote merges the functionality needed by clients and masters.
A container class for query results.
PrintProgress_t fPrintProgress
TList * GetLoadedMacros() const
const char *const kPROOF_DataDir
static TList * fgProofEnvList
virtual const char * GetMssUrl(Bool_t=kFALSE)
Float_t GetRealTime() const
std::recursive_mutex fCloseMutex
This packetizer is based on TPacketizer but uses different load-balancing algorithms and data structu...
void SetDataPoolUrl(const char *url)
const char * GetUser() const
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
virtual void SetMssUrl(const char *mss)
TMonitor * fUniqueMonitor
Bool_t IsSortable() const
const char *const kPROOF_ConfFile
const char *const kPROOF_QueryLockFile
Using a TBrowser one can browse all ROOT objects.
Int_t RemoveDataSet(const char *dsname)
RemoveDataSet wrapper.
TFileCollection * GetDataSet(const char *ds, const char *server="")
GetDataSet wrapper.
const char *const kPROOF_TerminateWorker
Class providing the PROOF server.
void SetPrintProgress(PrintProgress_t pp)
const char *const kPROOF_DataSetDir
TMonitor * fCurrentMonitor
Input handler for XProofD sockets.
const char *const kPROOF_ConfDir
High level handler of connections to XProofD.
static int push(struct mg_context *ctx, FILE *fp, SOCKET sock, SSL *ssl, const char *buf, int len, double timeout)
Collection abstract base class.
void SetActive(Bool_t=kTRUE)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
const char *const kPROOF_CacheLockFile
ERunStatus GetRunStatus() const
A TEventList object is a list of selected events (entries) in a TTree.
const char *const kUNTAR2
Bool_t fProgressDialogStarted
const Int_t kPROOF_Protocol
TMergerInfo(TSlave *t, Int_t port, Int_t forHowManyWorkers)
void SetStatus(ESlaveStatus stat)
void Reset(Detail::TBranchProxy *x)
Implementation of the functionality provided by TProofMgr in the case of a xproofd-based session...
TSlaveInfo(const char *ordinal="", const char *host="", Int_t perfidx=0, const char *msd="", const char *datadir="")
static unsigned int total
The packetizer is a load balancing object created for each query.
R__EXTERN TProof * gProof
void SendLogToWindow(Bool_t mode)
void Print(std::ostream &os, const OptionType &opt)
const char *const kPROOF_InputDataFile
TVirtualProofPlayer * GetPlayer() const
const char * GetMaster() const
Int_t GetNumberOfDrawQueries()
TList * fNonUniqueMasters
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
TList * fEnabledPackagesOnCluster
This class controls a Parallel ROOT Facility, PROOF, cluster.
TPluginHandler * GetProgressDialog() const
const char *const kPROOF_MissingFiles
void SetRunStatus(ERunStatus rst)
void ShowDataSets(const char *ds, const char *opt="")
ShowDataSets wrapper.
bool IsEqual(const Transform &t1, const Transform &t2, unsigned int size)
Mother of all ROOT objects.
typedef void((*Func_t)())
void ResetProgressDialogStatus()
TString fActiveSlavesSaved
Float_t GetCpuTime() const
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
Utility class to draw objects in the feedback list during queries.
TProofOutputList fOutputList
SysInfo_t GetSysInfo() const
Int_t Compare(const void *item1, const void *item2)
A chain is a collection of files containg TTree objects.
const char * GetImage() const
TList * GetListOfUniqueSlaves() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
const char *const kUNTAR3
Int_t GetRemoteProtocol() const
Bool_t IsParallel() const
const char * GetUser() const
TList * fAvailablePackages
A TTree object has a header with a name and a title.
TProofMgr::EServType fServType
TList * fTerminatedSlaveInfos
Abstract interface for the PROOF player.
const char * GetMsd() const
Class describing a PROOF worker server.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Int_t RegisterDataSet(const char *dsname, TFileCollection *fc, const char *opt="")
RegisterDataSet wrapper.
TList * GetListOfActiveSlaves() const
TProofProgressInfo(Long64_t tot=0, Long64_t proc=0, Long64_t bytes=0, Float_t initt=-1., Float_t proct=-1., Float_t evts=-1., Float_t mbs=-1., Int_t actw=0, Int_t tsess=0, Float_t esess=0.)
TMonitor * fActiveMonitor
virtual ~TProofProgressInfo()
Derivation of TList with an overload of ls() and Print() allowing to filter out some of the variables...
Bool_t ExistsDataSet(const char *dsname)
ExistsDataSet wrapper.
Long64_t fLastPollWorkers_s
Int_t Broadcast(Int_t kind, ESlaves list=kActive)
const char *const kPROOF_CacheDir
const char * Data() const
void SetOrdinal(const char *ord)
const char *const kPROOF_PackDir