45 const char *confdir,
Int_t loglevel,
56 if (!conffile || !conffile[0])
58 else if (!strncasecmp(conffile,
"sm:", 3))
60 if (!confdir || !confdir[0])
69 Init(masterurl, conffile, confdir, loglevel, alias);
72 gROOT->GetListOfProofs()->Add(
this);
91 Error(
"StartSlaves",
"getting list of submaster nodes");
100 UInt_t nSubmastersDone = 0;
102 TList validSubmasters;
110 while ((to = next())) {
146 Info(
"StartSlaves",
"submaster on host %s created and"
152 m <<
TString(
"Opening connections to submasters") << nSubmasters
153 << nSubmastersDone << submasterOk;
167 TIter nxsc(&validPairs);
169 while ((sc = (
TPair *) nxsc())) {
181 Error(
"StartSlaves",
"master and submaster protocols"
182 " not compatible (%d and %d)",
188 validSubmasters.
Add(sl);
198 m <<
TString(
"Setting up submasters") << nSubmasters
199 << nSubmastersDone << submasterOk;
204 TIter nextSubmaster(&validSubmasters);
205 while (
TSlave* sl =
dynamic_cast<TSlave*
>(nextSubmaster())) {
206 if (sl->GetStatus() == -99) {
207 Error(
"StartSlaves",
"not allowed to connect to PROOF master server");
212 if (!sl->IsValid()) {
213 Error(
"StartSlaves",
"failed to setup connection with PROOF master server");
264 while (
TSlave *sl =
dynamic_cast<TSlave*
>(nextSubmaster())) {
271 smholder.
Add(smlist);
274 elemholder.
Add(elemlist);
275 msds.
Add(
new TPair(smlist, elemlist));
277 smlist =
dynamic_cast<TList*
>(p->
Key());
279 if (smlist) smlist->
Add(sl);
284 if (elem->GetValid())
continue;
286 if (p && p->
Value()) {
288 if (xl) xl->
Add(elem);
290 Error(
"ValidateDSet",
"no mass storage domain '%s' associated"
291 " with available submasters",
301 while (
TPair *msd =
dynamic_cast<TPair*
>(nextSM())) {
302 TList *sms =
dynamic_cast<TList*
>(msd->Key());
303 TList *setelements =
dynamic_cast<TList*
>(msd->Value());
307 Int_t nelements = setelements ? setelements->
GetSize() : -1;
308 for (
Int_t i=0; i<nsms; i++) {
312 for (
Int_t j = (i*nelements)/nsms;
313 j < ((i+1)*nelements)/nsms;
332 "Sending TDSet with %d elements to worker %s"
333 " to be validated", set.GetListOfElements()->GetSize(),
338 Warning(
"ValidateDSet",
"not a TSlave object");
345 Info(
"ValidateDSet",
"Calling Collect");
const Bool_t kSortDescending
R__EXTERN TProofServ * gProofServ
const char *const kPROOF_ConfFile
const char *const kPROOF_ConfDir
const Int_t kPROOF_Protocol
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
void SetName(const char *name)
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Manages an element of a TDSet.
const char * GetObjName() const
const char * GetDirectory() const
Return directory where to look for object.
const char * GetMsd() const
const char * GetFileName() const
Long64_t GetFirst() const
This class implements a data set to be used for PROOF processing.
virtual Bool_t Add(const char *file, const char *objname=0, const char *dir=0, Long64_t first=0, Long64_t num=-1, const char *msd=0)
Add file to list of files to be analyzed.
Bool_t ElementsValid()
Check if all elements are valid.
const char * GetType() const
TList * GetListOfElements() const
const char * GetDirectory() const
const char * GetObjName() const
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
Collectable string class.
const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Class used by TMap to store (key,value) pairs.
Long_t ExecPlugin(int nargs, const T &... params)
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session,...
The purpose of this class is to provide a complete node description for masters, submasters and worke...
const TString & GetMsd() const
const TString & GetImage() const
const TString & GetConfig() const
const TString & GetNodeName() const
const char * GetOrdinal() const
const char * GetImage() const
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
const char * GetUser() const
TSocket * GetSocket() const
const char * GetGroup() const
const char * GetWorkDir() const
Implementation of TProof controlling PROOF federated clusters.
TProofSuperMaster(const char *masterurl, const char *conffile=kPROOF_ConfFile, const char *confdir=kPROOF_ConfDir, Int_t loglevel=0, const char *alias=0, TProofMgr *mgr=0)
Start super master PROOF session.
Bool_t StartSlaves(Bool_t)
Start up PROOF submasters.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
void ValidateDSet(TDSet *dset)
Validate a TDSet.
Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process a data set (TDSet) using the specified selector (.C) file.
TVirtualProofPlayer * GetPlayer() const
TPluginHandler * GetProgressDialog() const
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
void SetPlayer(TVirtualProofPlayer *player)
Set a new PROOF player.
void InitMembers()
Default initializations.
TSlave * CreateSubmaster(const char *url, const char *ord, const char *image, const char *msd, Int_t nwk=1)
Create a new TSlave of type TSlave::kMaster.
Int_t Init(const char *masterurl, const char *conffile, const char *confdir, Int_t loglevel, const char *alias=0)
Start the PROOF environment.
TList * GetListOfActiveSlaves() const
void SetDSet(TDSet *dset)
Class describing a PROOF worker server.
TSocket * GetSocket() const
virtual Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
virtual Bool_t IsValid() const
const char * GetOrdinal() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
A sorted doubly linked list.
const char * Data() const
virtual const char * HostName()
Return the system's host name.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void SetUser(const char *user)
const char * GetUser() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
void SetPasswd(const char *pw)
Abstract interface for the PROOF player.
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
static constexpr double s
static constexpr double pc