45 namespace std { using ::map; }
48 #define CANNOTUSE(x) Info(x,"Not manager: cannot use this method") 145 const char*
const kCP =
"/bin/cp -fp";
146 const char*
const kRM =
"/bin/rm -rf";
147 const char*
const kLS =
"/bin/ls -l";
148 const char*
const kUNTAR =
"%s -c %s/%s | (cd %s; tar xf -)";
149 const char*
const kUNTAR2 =
"%s -c %s | (cd %s; tar xf -)";
150 const char*
const kUNTAR3 =
"%s -c %s | (tar xf -)";
153 const char*
const kCP =
"copy";
154 const char*
const kRM =
"delete";
155 const char*
const kLS =
"dir";
156 const char*
const kUNTAR =
"...";
157 const char*
const kUNTAR2 =
"...";
158 const char*
const kUNTAR3 =
"...";
159 const char*
const kGUNZIP =
"gunzip";
181 fTotal(tot), fProcessed(proc), fBytesRead(bytes),
182 fInitTime(initt), fProcTime(proct), fEvtRateI(evts), fMBRateI(mbs),
183 fActWorkers(actw), fTotSessions(tsess), fEffSessions(esess) { }
229 const char *msd =
"",
const char *datadir =
"") :
230 fOrdinal(ordinal), fHostName(host), fMsd(msd), fDataDir(datadir),
231 fPerfIndex(perfidx), fSysInfo(), fStatus(kNotActive) { }
234 const char *
GetMsd()
const {
return fMsd; }
235 const char *
GetName()
const {
return fHostName; }
271 fMerger(t), fPort(port), fMergedObjects(0), fWorkersToMerge(forHowManyWorkers),
272 fMergedWorkers(0), fWorkers(0), fIsActive(
kTRUE) { }
275 void AddWorker(
TSlave *sl);
285 void SetMergedWorker();
288 Bool_t AreAllWorkersAssigned();
289 Bool_t AreAllWorkersMerged();
309 fExp.
Form(
"%c (%d workers still sending) ", fgCr[fIdx], fNWrks);
310 changed = (fLastNWrks != fNWrks || fLastNWrks == -1) ?
kTRUE :
kFALSE;
312 return fExp.
Data(); }
323 friend class TPacketizerDev;
346 kUsingSessionGui =
BIT(14),
351 kUseProgressDialog =
BIT(19)
359 kOverwriteDataSet = 0x2,
360 kNoOverwriteDataSet = 0x4,
361 kOverwriteAllFiles = 0x8,
362 kOverwriteNoFiles = 0x10,
367 kOverwriteIfExists = 1,
398 kLocalInterrupt = -1,
412 kShowEnabledPackages = 8,
415 kShowSubPackages = 11,
416 kDisableSubPackages = 12,
417 kDisableSubPackage = 13,
418 kBuildSubPackage = 14,
420 kDisablePackage = 16,
421 kUnloadPackages = 17,
422 kDisablePackages = 18,
424 kListEnabledPackages = 20,
429 kCheckDataSetName = 2,
431 kRegisterDataSet = 4,
439 kSetDefaultTreeName = 12,
441 kRequestStaging = 14,
455 kDeactivateWorker = 2
458 kDontBuildOnClient = -2,
459 kBuildOnSlavesNoWait = -1,
461 kCollectBuildResults = 1
604 void CleanGDirectory(
TList *ol);
607 Int_t SendCommand(
const char *cmd,
ESlaves list = kActive);
612 Int_t SendGroupView();
613 Int_t SendInitialState();
617 void AskStatistics();
623 void NotifyLogMsg(
const char *msg,
const char *sfx =
"\n");
627 Int_t UnloadPackage(
const char *package);
628 Int_t UnloadPackages();
629 Int_t DisablePackage(
const char *package);
630 Int_t DisablePackages();
632 void Activate(
TList *slaves = 0);
639 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile,
TList *wrks);
640 Int_t BroadcastFile(
const char *file,
Int_t opt,
const char *rfile = 0,
ESlaves list = kAllUnique);
641 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
ESlaves list = kAllUnique);
642 Int_t BroadcastGroupPriority(
const char *grp,
Int_t priority,
TList *workers);
656 virtual void FindUniqueSlaves();
662 Int_t GetNumberOfSlaves()
const;
663 Int_t GetNumberOfActiveSlaves()
const;
664 Int_t GetNumberOfInactiveSlaves()
const;
665 Int_t GetNumberOfUniqueSlaves()
const;
666 Int_t GetNumberOfBadSlaves()
const;
670 Int_t RestoreActiveList();
671 void SaveActiveList();
674 void InterruptCurrentMonitor();
678 void MarkBad(
TSlave *wrk,
const char *reason = 0);
679 void MarkBad(
TSocket *s,
const char *reason = 0);
680 void TerminateWorker(
TSlave *wrk);
681 void TerminateWorker(
const char *ord);
683 void ActivateAsyncInput();
684 void DeActivateAsyncInput();
693 Int_t GetActiveMergersCount();
694 Int_t FindNextFreeMerger();
696 void AskForOutput(
TSlave *sl);
700 void ResetMergePrg();
701 void ParseConfigField(
const char *config);
703 Bool_t Prompt(
const char *p);
706 static TList *GetDataSetSrvMaps(
const TString &srvmaps);
711 Int_t Init(
const char *masterurl,
const char *conffile,
712 const char *confdir,
Int_t loglevel,
713 const char *alias = 0);
725 void HandleLibIncPath(
const char *what,
Bool_t add,
const char *dirs);
728 TSlave *CreateSlave(
const char *url,
const char *ord,
729 Int_t perf,
const char *image,
const char *workdir);
730 TSlave *CreateSubmaster(
const char *url,
const char *ord,
731 const char *image,
const char *msd,
Int_t nwk = 1);
733 virtual Int_t PollForNewWorkers();
734 virtual void SaveWorkerInfo();
742 virtual void ValidateDSet(
TDSet *dset);
744 Int_t VerifyDataSetParallel(
const char *uri,
const char *optStr);
748 Int_t AssertPath(
const char *path,
Bool_t writable);
751 void PrepareInputDataFile(
TString &dataFile);
752 virtual void SendInputDataFile();
753 Int_t SendFile(
const char *file,
Int_t opt = (kBinary | kForward | kCp | kCpBin),
754 const char *rfile = 0,
TSlave *sl = 0);
761 static void *SlaveStartupThread(
void *arg);
765 static void AssertMacroPath(
const char *macro);
776 static void SystemCmd(
const char *cmd,
Int_t fdout);
781 const char *alias = 0,
TProofMgr *mgr = 0);
784 void cd(
Int_t id = -1);
791 TString Getenv(
const char *env,
const char *ord =
"0");
792 Int_t GetRC(
const char *RCenv,
Int_t &env,
const char *ord =
"0");
793 Int_t GetRC(
const char *RCenv,
Double_t &env,
const char *ord =
"0");
794 Int_t GetRC(
const char *RCenv,
TString &env,
const char *ord =
"0");
802 virtual Long64_t Process(
const char *dsetname,
const char *selector,
821 const char *selection =
"",
824 Long64_t DrawSelect(
const char *dsetname,
const char *varexp,
825 const char *selection =
"",
829 Int_t Archive(
const char *queryref,
const char *url = 0);
830 Int_t CleanupSession(
const char *sessiontag);
835 Int_t Retrieve(
Int_t query,
const char *path = 0);
836 Int_t Retrieve(
const char *queryref,
const char *path = 0);
838 void DisableGoAsyn();
839 void GoAsynchronous();
840 void StopProcess(
Bool_t abort,
Int_t timeout = -1);
844 virtual Int_t Echo(
const char *str);
854 virtual void ClearCache(
const char *file = 0);
855 TList *GetListOfPackages();
856 TList *GetListOfEnabledPackages();
859 Int_t ClearPackages();
860 Int_t ClearPackage(
const char *package);
861 Int_t DownloadPackage(
const char *
par,
const char *dstdir = 0);
863 Int_t EnablePackage(
const char *package,
const char *loadopts,
865 Int_t EnablePackage(
const char *package,
TList *loadopts,
878 Int_t UploadDataSet(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
879 Int_t UploadDataSetFromFile(
const char *,
const char *,
const char * = 0,
Int_t = 0,
TList * = 0);
882 virtual TMap *
GetDataSets(
const char *uri =
"",
const char* optStr =
"");
883 virtual void ShowDataSets(
const char *uri =
"",
const char* optStr =
"");
885 TMap *GetDataSetQuota(
const char* optStr =
"");
886 void ShowDataSetQuota(
Option_t* opt = 0);
889 void ShowDataSet(
const char *dataset =
"",
const char* opt =
"filter:SsCc");
893 TList *FindDataSets(
const char *searchString,
const char* optStr =
"");
894 virtual Bool_t RequestStagingDataSet(
const char *dataset);
896 virtual void ShowStagingStatusDataSet(
const char *dataset,
const char *optStr =
"filter:SsCc");
897 virtual Bool_t CancelStagingDataSet(
const char *dataset);
899 virtual Int_t SetDataSetTreeName(
const char *dataset,
const char *treename);
901 virtual void ShowDataSetCache(
const char *dataset = 0);
902 virtual void ClearDataSetCache(
const char *dataset = 0);
904 virtual void ShowData();
905 void ClearData(
UInt_t what = kUnregistered,
const char *dsname = 0);
921 Int_t GetParallel()
const;
924 TList *GetListOfSlaveInfos();
951 void SetParameter(
const char *par,
const char *value);
952 void SetParameter(
const char *par,
Int_t value);
953 void SetParameter(
const char *par,
Long_t value);
954 void SetParameter(
const char *par,
Long64_t value);
955 void SetParameter(
const char *par,
Double_t value);
956 TObject *GetParameter(
const char *par)
const;
957 void DeleteParameters(
const char *wildcard);
958 void ShowParameters(
const char *wildcard =
"PROOF_*")
const;
962 TList *GetInputList();
963 TObject *GetOutput(
const char *name);
964 TList *GetOutputList();
965 static TObject *GetOutput(
const char *name,
TList *out);
971 void SetInputDataFile(
const char *datafile);
972 void ClearInputData(
TObject *obj = 0);
973 void ClearInputData(
const char *name);
975 void AddFeedback(
const char *name);
976 void RemoveFeedback(
const char *name);
977 void ClearFeedback();
978 void ShowFeedback()
const;
979 TList *GetFeedbackList()
const;
982 Int_t GetNumberOfQueries();
984 TList *GetQueryResults();
986 void GetMaxQueries();
987 void SetMaxDrawQueries(
Int_t max);
988 void ShowQueries(
Option_t *opt =
"");
994 void LogMessage(
const char *msg,
Bool_t all);
1003 void Feedback(
TList *objs);
1004 void QueryResultReady(
const char *ref);
1005 void CloseProgressDialog();
1006 void ResetProgressDialog(
const char *sel,
Int_t sz,
1008 void StartupMessage(
const char *msg,
Bool_t status,
Int_t done,
1010 void DataSetStatus(
const char *msg,
Bool_t status,
1015 void GetLog(
Int_t start = -1,
Int_t end = -1);
1018 void ShowLog(
Int_t qry = -1);
1019 void ShowLog(
const char *queryref);
1028 TList *GetOutputNames();
1030 void AddChain(
TChain *chain);
1031 void RemoveChain(
TChain *chain);
1039 virtual void SetAlias(
const char *alias=
"");
1055 Int_t SavePerfTree(
const char *pf = 0,
const char *qref = 0);
1056 void SetPerfTree(
const char *pf =
"perftree.root",
Bool_t withWrks =
kFALSE);
1059 static TProof *Open(
const char *url = 0,
const char *conffile = 0,
1060 const char *confdir = 0,
Int_t loglevel = 0);
1061 static void LogViewer(
const char *url = 0,
Int_t sessionidx = 0);
1065 static void AddEnvVar(
const char *name,
const char *value);
1066 static void DelEnvVar(
const char *name);
1067 static const TList *GetEnvVars();
1068 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
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
void SetDSet(TDSet *dset)
Int_t GetClientProtocol() const
Version of TSlave for local worker servers.
const char *const kPROOF_PackageLockFile
const char * GetConfFile() const
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.
Int_t GetLogLevel() const
const char *const kPROOF_QueryDir
Bool_t IsEndMaster() const
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.
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)
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
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)
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
Int_t VerifyDataSet(const char *dsname, const char *opt, const char *redir)
VerifyDataSet wrapper.
void SetRunStatus(ERunStatus rst)
bool IsEqual(const Transform &t1, const Transform &t2, unsigned int size)
Binding & operator=(OUT(*fun)(void))
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 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
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