44 #define CANNOTUSE(x) Info(x,"Not manager: cannot use this method") 141 const char*
const kCP =
"/bin/cp -fp";
142 const char*
const kRM =
"/bin/rm -rf";
143 const char*
const kLS =
"/bin/ls -l";
144 const char*
const kUNTAR =
"%s -c %s/%s | (cd %s; tar xf -)";
145 const char*
const kUNTAR2 =
"%s -c %s | (cd %s; tar xf -)";
146 const char*
const kUNTAR3 =
"%s -c %s | (tar xf -)";
149 const char*
const kCP =
"copy";
150 const char*
const kRM =
"delete";
151 const char*
const kLS =
"dir";
152 const char*
const kUNTAR =
"...";
153 const char*
const kUNTAR2 =
"...";
154 const char*
const kUNTAR3 =
"...";
155 const char*
const kGUNZIP =
"gunzip";
177 fTotal(tot), fProcessed(proc), fBytesRead(bytes),
178 fInitTime(initt), fProcTime(proct), fEvtRateI(evts), fMBRateI(mbs),
179 fActWorkers(actw), fTotSessions(tsess), fEffSessions(esess) { }
225 const char *msd =
"",
const char *datadir =
"") :
226 fOrdinal(ordinal), fHostName(host), fMsd(msd), fDataDir(datadir),
227 fPerfIndex(perfidx), fSysInfo(), fStatus(kNotActive) { }
230 const char *
GetMsd()
const {
return fMsd; }
231 const char *
GetName()
const {
return fHostName; }
267 fMerger(t), fPort(port), fMergedObjects(0), fWorkersToMerge(forHowManyWorkers),
268 fMergedWorkers(0), fWorkers(0), fIsActive(
kTRUE) { }
271 void AddWorker(
TSlave *sl);
281 void SetMergedWorker();
284 Bool_t AreAllWorkersAssigned();
285 Bool_t AreAllWorkersMerged();
305 fExp.
Form(
"%c (%d workers still sending) ", fgCr[fIdx], fNWrks);
306 changed = (fLastNWrks != fNWrks || fLastNWrks == -1) ?
kTRUE :
kFALSE;
308 return fExp.
Data(); }
319 friend class TPacketizerDev;
342 kUsingSessionGui =
BIT(14),
347 kUseProgressDialog =
BIT(19)
355 kOverwriteDataSet = 0x2,
356 kNoOverwriteDataSet = 0x4,
357 kOverwriteAllFiles = 0x8,
358 kOverwriteNoFiles = 0x10,
363 kOverwriteIfExists = 1,
394 kLocalInterrupt = -1,
408 kShowEnabledPackages = 8,
411 kShowSubPackages = 11,
412 kDisableSubPackages = 12,
413 kDisableSubPackage = 13,
414 kBuildSubPackage = 14,
416 kDisablePackage = 16,
417 kUnloadPackages = 17,
418 kDisablePackages = 18,
420 kListEnabledPackages = 20,
425 kCheckDataSetName = 2,
427 kRegisterDataSet = 4,
435 kSetDefaultTreeName = 12,
437 kRequestStaging = 14,
451 kDeactivateWorker = 2
454 kDontBuildOnClient = -2,
455 kBuildOnSlavesNoWait = -1,
457 kCollectBuildResults = 1
600 void CleanGDirectory(
TList *ol);
603 Int_t SendCommand(
const char *cmd,
ESlaves list = kActive);
608 Int_t SendGroupView();
609 Int_t SendInitialState();
613 void AskStatistics();
619 void NotifyLogMsg(
const char *msg,
const char *sfx =
"\n");
623 Int_t UnloadPackage(
const char *package);
624 Int_t UnloadPackages();
625 Int_t DisablePackage(
const char *package);
626 Int_t DisablePackages();
628 void Activate(
TList *slaves = 0);
635 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile,
TList *wrks);
636 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile = 0,
ESlaves list = kAllUnique);
637 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
ESlaves list = kAllUnique);
638 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
TList *workers);
652 virtual void FindUniqueSlaves();
658 Int_t GetNumberOfSlaves()
const;
659 Int_t GetNumberOfActiveSlaves()
const;
660 Int_t GetNumberOfInactiveSlaves()
const;
661 Int_t GetNumberOfUniqueSlaves()
const;
662 Int_t GetNumberOfBadSlaves()
const;
666 Int_t RestoreActiveList();
667 void SaveActiveList();
670 void InterruptCurrentMonitor();
674 void MarkBad(
TSlave *wrk,
const char *reason = 0);
675 void MarkBad(
TSocket *s,
const char *reason = 0);
676 void TerminateWorker(
TSlave *wrk);
677 void TerminateWorker(
const char *ord);
679 void ActivateAsyncInput();
680 void DeActivateAsyncInput();
689 Int_t GetActiveMergersCount();
690 Int_t FindNextFreeMerger();
692 void AskForOutput(
TSlave *sl);
696 void ResetMergePrg();
697 void ParseConfigField(
const char *config);
699 Bool_t Prompt(
const char *p);
702 static TList *GetDataSetSrvMaps(
const TString &srvmaps);
707 Int_t Init(
const char *masterurl,
const char *conffile,
708 const char *confdir,
Int_t loglevel,
709 const char *alias = 0);
721 void HandleLibIncPath(
const char *what,
Bool_t add,
const char *dirs);
724 TSlave *CreateSlave(
const char *url,
const char *ord,
725 Int_t perf,
const char *image,
const char *workdir);
726 TSlave *CreateSubmaster(
const char *url,
const char *ord,
727 const char *image,
const char *msd,
Int_t nwk = 1);
729 virtual Int_t PollForNewWorkers();
730 virtual void SaveWorkerInfo();
738 virtual void ValidateDSet(
TDSet *dset);
740 Int_t VerifyDataSetParallel(
const char *uri,
const char *optStr);
744 Int_t AssertPath(
const char *path,
Bool_t writable);
747 void PrepareInputDataFile(
TString &dataFile);
748 virtual void SendInputDataFile();
749 Int_t SendFile(
const char *file,
Int_t opt = (kBinary | kForward | kCp | kCpBin),
750 const char *rfile = 0,
TSlave *sl = 0);
757 static void *SlaveStartupThread(
void *arg);
761 static void AssertMacroPath(
const char *macro);
772 static void SystemCmd(
const char *cmd,
Int_t fdout);
777 const char *alias = 0,
TProofMgr *mgr = 0);
780 void cd(
Int_t id = -1);
787 TString Getenv(
const char *env,
const char *ord =
"0");
788 Int_t GetRC(
const char *RCenv,
Int_t &env,
const char *ord =
"0");
789 Int_t GetRC(
const char *RCenv,
Double_t &env,
const char *ord =
"0");
790 Int_t GetRC(
const char *RCenv,
TString &env,
const char *ord =
"0");
798 virtual Long64_t Process(
const char *dsetname,
const char *selector,
817 const char *selection =
"",
820 Long64_t DrawSelect(
const char *dsetname,
const char *varexp,
821 const char *selection =
"",
825 Int_t Archive(
const char *queryref,
const char *url = 0);
826 Int_t CleanupSession(
const char *sessiontag);
831 Int_t Retrieve(
Int_t query,
const char *path = 0);
832 Int_t Retrieve(
const char *queryref,
const char *path = 0);
834 void DisableGoAsyn();
835 void GoAsynchronous();
836 void StopProcess(
Bool_t abort,
Int_t timeout = -1);
840 virtual Int_t Echo(
const char *str);
850 virtual void ClearCache(
const char *file = 0);
851 TList *GetListOfPackages();
852 TList *GetListOfEnabledPackages();
855 Int_t ClearPackages();
856 Int_t ClearPackage(
const char *package);
857 Int_t DownloadPackage(
const char *par,
const char *dstdir = 0);
859 Int_t EnablePackage(
const char *package,
const char *loadopts,
861 Int_t EnablePackage(
const char *package,
TList *loadopts,
874 Int_t UploadDataSet(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
875 Int_t UploadDataSetFromFile(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
878 virtual TMap *
GetDataSets(
const char *uri =
"",
const char* optStr =
"");
879 virtual void ShowDataSets(
const char *uri =
"",
const char* optStr =
"");
881 TMap *GetDataSetQuota(
const char* optStr =
"");
882 void ShowDataSetQuota(
Option_t* opt = 0);
885 void ShowDataSet(
const char *dataset =
"",
const char* opt =
"filter:SsCc");
889 TList *FindDataSets(
const char *searchString,
const char* optStr =
"");
890 virtual Bool_t RequestStagingDataSet(
const char *dataset);
892 virtual void ShowStagingStatusDataSet(
const char *dataset,
const char *optStr =
"filter:SsCc");
893 virtual Bool_t CancelStagingDataSet(
const char *dataset);
895 virtual Int_t SetDataSetTreeName(
const char *dataset,
const char *treename);
897 virtual void ShowDataSetCache(
const char *dataset = 0);
898 virtual void ClearDataSetCache(
const char *dataset = 0);
900 virtual void ShowData();
901 void ClearData(
UInt_t what = kUnregistered,
const char *dsname = 0);
917 Int_t GetParallel()
const;
920 TList *GetListOfSlaveInfos();
947 void SetParameter(
const char *par,
const char *value);
948 void SetParameter(
const char *par,
Int_t value);
949 void SetParameter(
const char *par,
Long_t value);
950 void SetParameter(
const char *par,
Long64_t value);
951 void SetParameter(
const char *par,
Double_t value);
952 TObject *GetParameter(
const char *par)
const;
953 void DeleteParameters(
const char *wildcard);
954 void ShowParameters(
const char *wildcard =
"PROOF_*")
const;
958 TList *GetInputList();
959 TObject *GetOutput(
const char *name);
960 TList *GetOutputList();
961 static TObject *GetOutput(
const char *name,
TList *out);
967 void SetInputDataFile(
const char *datafile);
968 void ClearInputData(
TObject *obj = 0);
969 void ClearInputData(
const char *name);
971 void AddFeedback(
const char *name);
972 void RemoveFeedback(
const char *name);
973 void ClearFeedback();
974 void ShowFeedback()
const;
975 TList *GetFeedbackList()
const;
978 Int_t GetNumberOfQueries();
980 TList *GetQueryResults();
982 void GetMaxQueries();
983 void SetMaxDrawQueries(
Int_t max);
984 void ShowQueries(
Option_t *opt =
"");
990 void LogMessage(
const char *msg,
Bool_t all);
999 void Feedback(
TList *objs);
1000 void QueryResultReady(
const char *ref);
1001 void CloseProgressDialog();
1002 void ResetProgressDialog(
const char *sel,
Int_t sz,
1004 void StartupMessage(
const char *msg,
Bool_t status,
Int_t done,
1006 void DataSetStatus(
const char *msg,
Bool_t status,
1011 void GetLog(
Int_t start = -1,
Int_t end = -1);
1014 void ShowLog(
Int_t qry = -1);
1015 void ShowLog(
const char *queryref);
1024 TList *GetOutputNames();
1026 void AddChain(
TChain *chain);
1027 void RemoveChain(
TChain *chain);
1035 virtual void SetAlias(
const char *alias=
"");
1051 Int_t SavePerfTree(
const char *pf = 0,
const char *qref = 0);
1052 void SetPerfTree(
const char *pf =
"perftree.root",
Bool_t withWrks =
kFALSE);
1055 static TProof *Open(
const char *url = 0,
const char *conffile = 0,
1056 const char *confdir = 0,
Int_t loglevel = 0);
1057 static void LogViewer(
const char *url = 0,
Int_t sessionidx = 0);
1061 static void AddEnvVar(
const char *name,
const char *value);
1062 static void DelEnvVar(
const char *name);
1063 static const TList *GetEnvVars();
1064 static void ResetEnvVars();
std::map< TString, MD5Mod_t > FileMap_t
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
TList * GetListOfBadSlaves() const
The PROOF package manager contains tools to manage packages.
const char *const kGUNZIP
const char * GetName() const
Returns name of object.
Int_t RemoveDataSet(const char *dsname)
RemoveDataSet wrapper.
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.
TFileCollection * GetDataSet(const char *ds, const char *server)
GetDataSet wrapper.
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
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
void SetDSet(TDSet *dset)
Int_t GetClientProtocol() const
Version of TSlave for local worker servers.
const char *const kPROOF_PackageLockFile
const char * GetConfFile() const
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
static TPluginHandler * fgLogViewer
This is the version of TSlave for workers servers based on XProofD.
Bool_t UseDynamicStartup() const
Int_t GetWorkersToMerge()
Int_t RegisterDataSet(const char *dsname, TFileCollection *fc, const char *opt)
RegisterDataSet wrapper.
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.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
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
TObject & operator=(const TObject &rhs)
TObject assignment operator.
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
virtual Bool_t IsEqual(const TObject *obj) const
Default equal comparison (objects are equal if they have the same address in memory).
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.
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.
Collection abstract base class.
void SetActive(Bool_t=kTRUE)
Bool_t ExistsDataSet(const char *dsname)
ExistsDataSet wrapper.
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
virtual Int_t Compare(const TObject *obj) const
Compare abstract method.
TMergerInfo(TSlave *t, Int_t port, Int_t forHowManyWorkers)
void SetStatus(ESlaveStatus stat)
void Reset(Detail::TBranchProxy *x)
TMap * GetDataSets(const char *owner, const char *server, const char *opt)
GetDataSets wrapper.
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)
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
static constexpr double s
Int_t VerifyDataSet(const char *dsname, const char *opt, const char *redir)
VerifyDataSet wrapper.
void SetRunStatus(ERunStatus rst)
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
A chain is a collection of files containing 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
void ShowDataSets(const char *ds, const char *opt)
ShowDataSets wrapper.
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
virtual const char * GetName() const
Returns name of object.
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...
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...
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