49 const
char *confdir,
Int_t loglevel,
58 fUrl =
TUrl(masterurl);
60 if (!conffile || !conffile[0])
62 else if (!strncasecmp(conffile,
"sm:", 3))
64 if (!confdir || !confdir[0])
73 Init(masterurl, conffile, confdir, loglevel, alias);
76 gROOT->GetListOfProofs()->Add(
this);
95 Error(
"StartSlaves",
"getting list of submaster nodes");
104 UInt_t nSubmastersDone = 0;
106 TList validSubmasters;
114 while ((to =
next())) {
131 if (strlen(u.GetUser()) <= 0)
150 Info(
"StartSlaves",
"submaster on host %s created and"
156 m <<
TString(
"Opening connections to submasters") << nSubmasters
157 << nSubmastersDone << submasterOk;
171 TIter nxsc(&validPairs);
173 while ((sc = (
TPair *) nxsc())) {
185 Error(
"StartSlaves",
"master and submaster protocols"
186 " not compatible (%d and %d)",
192 validSubmasters.
Add(sl);
202 m <<
TString(
"Setting up submasters") << nSubmasters
203 << nSubmastersDone << submasterOk;
208 TIter nextSubmaster(&validSubmasters);
209 while (
TSlave* sl = dynamic_cast<TSlave*>(nextSubmaster())) {
210 if (sl->GetStatus() == -99) {
211 Error(
"StartSlaves",
"not allowed to connect to PROOF master server");
216 if (!sl->IsValid()) {
217 Error(
"StartSlaves",
"failed to setup connection with PROOF master server");
268 while (
TSlave *sl = dynamic_cast<TSlave*>(nextSubmaster())) {
275 smholder.
Add(smlist);
278 elemholder.
Add(elemlist);
279 msds.
Add(
new TPair(smlist, elemlist));
281 smlist =
dynamic_cast<TList*
>(p->
Key());
283 if (smlist) smlist->
Add(sl);
287 while (
TDSetElement *elem = dynamic_cast<TDSetElement*>(nextElem())) {
288 if (elem->GetValid())
continue;
290 if (p && p->
Value()) {
292 if (xl) xl->
Add(elem);
294 Error(
"ValidateDSet",
"no mass storage domain '%s' associated"
295 " with available submasters",
305 while (
TPair *
msd = dynamic_cast<TPair*>(nextSM())) {
311 Int_t nelements = setelements ? setelements->
GetSize() : -1;
312 for (
Int_t i=0; i<nsms; i++) {
316 for (
Int_t j = (i*nelements)/nsms;
317 j < ((i+1)*nelements)/nsms;
328 if (set.GetListOfElements()->GetSize()>0) {
336 "Sending TDSet with %d elements to worker %s"
337 " to be validated", set.GetListOfElements()->GetSize(),
342 Warning(
"ValidateDSet",
"not a TSlave object");
349 Info(
"ValidateDSet",
"Calling Collect");
const char * GetName() const
Returns name of object.
Bool_t StartSlaves(Bool_t)
Start up PROOF submasters.
const char * GetOrdinal() const
void ValidateDSet(TDSet *dset)
Validate a TDSet.
TSocket * GetSocket() const
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
const char Int_t const char TProof Int_t const char const char * msd
Collectable string class.
const char * GetObjName() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
This class represents a WWW compatible URL.
void SetPlayer(TVirtualProofPlayer *player)
Set a new PROOF player.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
void SetDSet(TDSet *dset)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
const char * GetGroup() const
Long_t ExecPlugin(int nargs, const T &...params)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
const char * GetObjName() const
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
const char * Data() const
const TString & GetMsd() const
const char * GetDirectory() const
ClassImp(TProofSuperMaster) TProofSuperMaster
Start super master PROOF session.
const TString & GetConfig() const
const char * GetMsd() const
void Init(TClassEdit::TInterpreterLookupHelper *helper)
TVirtualProofPlayer * GetPlayer() const
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
TList * GetListOfElements() const
A sorted doubly linked list.
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const Bool_t kSortDescending
const char * GetWorkDir() const
Long64_t GetFirst() const
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
const char *const kPROOF_ConfFile
Bool_t ElementsValid()
Check if all elements are valid.
TSocket * GetSocket() const
const char * GetFileName() const
R__EXTERN TSystem * gSystem
const char *const kPROOF_ConfDir
TPluginHandler * GetProgressDialog() const
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.
char * Form(const char *fmt,...)
const Int_t kPROOF_Protocol
void SetName(const char *name)
const char * GetUser() const
const char * GetImage() const
Class used by TMap to store (key,value) pairs.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
TList * GetListOfActiveSlaves() const
virtual Int_t GetSize() const
virtual const char * HostName()
Return the system's host name.
const char * GetOrdinal() const
Mother of all ROOT objects.
R__EXTERN TProofServ * gProofServ
virtual void Add(TObject *obj)
const TString & GetNodeName() const
const char * GetType() const
virtual Bool_t IsValid() const
const TString & GetImage() const
virtual Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
const char * GetDirectory() const
Return directory where to look for object.
const char Int_t const char * image
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.