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())) {
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())) {
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;
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");
Bool_t StartSlaves(Bool_t)
Start up PROOF submasters.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void ValidateDSet(TDSet *dset)
Validate a TDSet.
virtual EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
Collectable string class.
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.
const char * GetGroup() const
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...
TSocket * GetSocket() const
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
Long64_t GetFirst() const
const char * GetOrdinal() const
void SetDSet(TDSet *dset)
const TString & GetImage() const
Implementation of TProof controlling PROOF federated clusters.
TList * GetListOfElements() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual Long64_t Process(TDSet *set, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)=0
Manages an element of a TDSet.
virtual Bool_t IsValid() const
TSocket * GetSocket() const
Int_t Collect(const TSlave *sl, Long_t timeout=-1, Int_t endtype=-1, Bool_t deactonfail=kFALSE)
Collect responses from slave sl.
const char * GetDirectory() const
Return directory where to look for object.
A sorted doubly linked list.
Int_t Init(const char *masterurl, const char *conffile, const char *confdir, Int_t loglevel, const char *alias=0)
Start the PROOF environment.
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.
const Bool_t kSortDescending
static TVirtualProofPlayer * Create(const char *player, TProof *p, TSocket *s=0)
Create a PROOF player.
const char * GetObjName() const
const char *const kPROOF_ConfFile
const char * GetName() const
Returns name of object.
Bool_t ElementsValid()
Check if all elements are valid.
void InitMembers()
Default initializations.
The purpose of this class is to provide a complete node description for masters, submasters and worke...
const TString & GetNodeName() const
R__EXTERN TSystem * gSystem
Long_t ExecPlugin(int nargs, const T &... params)
const char *const kPROOF_ConfDir
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
const TString & GetConfig() const
const Int_t kPROOF_Protocol
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
void SetName(const char *name)
const TString & GetMsd() const
Class used by TMap to store (key,value) pairs.
virtual TVirtualProofPlayer * MakePlayer(const char *player=0, TSocket *s=0)
Construct a TProofPlayer object.
TVirtualProofPlayer * GetPlayer() const
virtual const char * HostName()
Return the system's host name.
TPluginHandler * GetProgressDialog() const
static constexpr double s
const char * GetFileName() const
const char * GetType() const
Mother of all ROOT objects.
const char * GetImage() const
R__EXTERN TProofServ * gProofServ
virtual void Add(TObject *obj)
const char * GetWorkDir() const
const char * GetMsd() const
static constexpr double pc
Abstract interface for the PROOF player.
virtual Int_t GetSize() const
Class describing a PROOF worker server.
const char * GetUser() const
const char * GetObjName() const
TList * GetListOfActiveSlaves() const
const char * GetOrdinal() const
virtual Int_t SetupServ(Int_t stype, const char *conffile)
Init a PROOF slave object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
const char * GetDirectory() const
const char * Data() const