45 const
char *confdir,
Int_t loglevel,
54 fUrl =
TUrl(masterurl);
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())) {
127 if (strlen(u.GetUser()) <= 0)
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);
283 while (
TDSetElement *elem = dynamic_cast<TDSetElement*>(nextElem())) {
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())) {
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;
324 if (set.GetListOfElements()->GetSize()>0) {
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 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.
This class implements a data set to be used for PROOF processing.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session...
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)
Implementation of TProof controlling PROOF federated clusters.
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
Manages an element of a TDSet.
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
The purpose of this class is to provide a complete node description for masters, submasters and worke...
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
Abstract interface for the PROOF player.
virtual Bool_t IsValid() const
Class describing a PROOF worker server.
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.