ROOT logo
ROOT » PROOF » PROOFX » TXProofMgr

class TXProofMgr: public TProofMgr, public TXHandler


TXProofMgr

The PROOF manager interacts with the PROOF server coordinator to
create or destroy a PROOF session, attach to or detach from
existing one, and to monitor any client activity on the cluster.
At most one manager instance per server is allowed.


Function Members (Methods)

public:
TXProofMgr(const char* url, Int_t loglevel = -1, const char* alias = "")
virtual~TXProofMgr()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual TProof*AttachSession(Int_t id, Bool_t gui = kFALSE)
virtual TProof*AttachSession(TProofDesc* d, Bool_t gui = kFALSE)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
voidTProofMgr::Close()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tCp(const char* src, const char* dst = 0, const char* opts = 0)
static TProofMgr*TProofMgr::Create(const char* url, Int_t loglevel = -1, const char* alias = 0, Bool_t xpd = kTRUE)
virtual TProof*TProofMgr::CreateSession(const char* = 0, const char* = 0, Int_t = -1)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidDetachSession(Int_t, Option_t* = "")
virtual voidDetachSession(TProof*, Option_t* = "")
virtual voidTProofMgr::DiscardSession(TProof* p)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual voidFind(const char* what = "~/", const char* how = "-type f", const char* where = 0)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Int_tGetFile(const char* remote, const char* local, const char* opt = 0)
virtual const char*TObject::GetIconName() const
static TList*TProofMgr::GetListOfManagers()
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual TProofDesc*TProofMgr::GetProofDesc(Int_t id)
virtual TProofDesc*TProofMgr::GetProofDesc(TProof* p)
virtual Int_tTProofMgr::GetRemoteProtocol() const
virtual TProofLog*GetSessionLogs(Int_t ridx = 0, const char* stag = 0, const char* pattern = "-v \"| SvcMsg\"", Bool_t rescan = kFALSE)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual const char*TProofMgr::GetUrl()
virtual voidGrep(const char* what, const char* how = 0, const char* where = 0)
virtual Bool_tHandleError(const void* in = 0)
virtual Bool_tHandleInput(const void*)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTProofMgr::IsLite() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTProofMgr::IsProofd() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidLs(const char* what = "~/", const char* how = 0, const char* where = 0)
virtual Bool_tMatchUrl(const char* url)
voidTObject::MayNotUse(const char* method) const
virtual Int_tMd5sum(const char* what, TString& sum, const char* where = 0)
virtual voidMore(const char* what, const char* how = 0, const char* where = 0)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tPutFile(const char* local, const char* remote, const char* opt = 0)
virtual TList*QuerySessions(Option_t* opt = "S")
virtual Int_tTObject::Read(const char* name)
virtual TObjString*ReadBuffer(const char* file, const char* pattern)
virtual TObjString*ReadBuffer(const char* file, Long64_t ofs, Int_t len)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Int_tReset(Bool_t hard = kFALSE, const char* usr = 0)
voidTObject::ResetBit(UInt_t f)
virtual Int_tRm(const char* what, const char* how = 0, const char* where = 0)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual Int_tSendMsgToUsers(const char* msg, const char* usr = 0)
virtual voidTProofMgr::SetAlias(const char* alias = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetInvalid()
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetROOTVersion(const char* tag)
virtual voidTNamed::SetTitle(const char* title = "")MENU
static voidTProofMgr::SetTXProofMgrHook(TProofMgr_t pmh)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidShowROOTVersions()
virtual voidShowWorkers()
virtual voidTProofMgr::ShutdownSession(Int_t id)
virtual voidTProofMgr::ShutdownSession(TProof* p)
virtual Int_tTNamed::Sizeof() const
virtual Int_tStat(const char* what, FileStat_t& st, const char* where = 0)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual voidTail(const char* what, const char* how = 0, const char* where = 0)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidCpProgress(const char* pfx, Long64_t bytes, Long64_t size, TStopwatch* watch, Bool_t cr = kFALSE)
TObjString*Exec(Int_t action, const char* what, const char* how, const char* where)
Int_tInit(Int_t loglevel = -1)

Data Members

protected:
TSignalHandler*TProofMgr::fIntHandlerInterrupt signal handler (ctrl-c)
TStringTNamed::fNameobject identifier
Int_tTProofMgr::fRemoteProtocolProtocol number run by the daemon server
TProofMgr::EServTypeTProofMgr::fServTypeType of server: old-proofd, XrdProofd
TList*TProofMgr::fSessionsPROOF session managed by this server
TStringTNamed::fTitleobject title
TUrlTProofMgr::fUrlServer URL
static TListTProofMgr::fgListOfManagersSub-list of TROOT::ListOfProofs for managers
private:
TXSocket*fSocketConnection to XRD

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TXProofMgr(const char* url, Int_t loglevel = -1, const char* alias = "")
 Create a PROOF manager for the standard (old) environment.
Int_t Init(Int_t loglevel = -1)
 Do real initialization: open the connection and set the relevant
 variables.
 Login and authentication are dealt with at this level, if required.
 Return 0 in case of success, 1 if the remote server is a 'proofd',
 -1 in case of error.
~TXProofMgr()
 Destructor: close the connection
void SetInvalid()
 Invalidate this manager by closing the connection
TProof * AttachSession(TProofDesc* d, Bool_t gui = kFALSE)
 Dummy version provided for completeness. Just returns a pointer to
 existing session 'id' (as shown by TProof::QuerySessions) or 0 if 'id' is
 not valid. The boolena 'gui' should be kTRUE when invoked from the GUI.
void DetachSession(Int_t , Option_t* = "")
 Detach session with 'id' from its proofserv. The 'id' is the number
 shown by QuerySessions. The correspondent TProof object is deleted.
 If id == 0 all the known sessions are detached.
 Option opt="S" or "s" forces session shutdown.
void DetachSession(TProof* , Option_t* = "")
 Detach session 'p' from its proofserv. The instance 'p' is invalidated
 and should be deleted by the caller
Bool_t MatchUrl(const char* url)
 Checks if 'url' refers to the same 'user@host:port' entity as the URL
 in memory. TProofMgr::MatchUrl cannot be used here because of the
 'double' default port, implying an additional check on the port effectively
 open.
void ShowWorkers()
 Show available workers
TList * QuerySessions(Option_t* opt = "S")
 Get list of sessions accessible to this manager
Bool_t HandleInput(const void* )
 Handle asynchronous input on the socket
Bool_t HandleError(const void* in = 0)
 Handle error on the input socket
Int_t Reset(Bool_t hard = kFALSE, const char* usr = 0)
 Send a cleanup request for the sessions associated with the current user.
 If 'hard' is true sessions are signalled for termination and moved to
 terminate at all stages (top master, sub-master, workers). Otherwise
 (default) only top-master sessions are asked to terminate, triggering
 a gentle session termination. In all cases all sessions should be gone
 after a few (2 or 3) session checking cycles.
 A user with superuser privileges can also asks cleaning for an different
 user, specified by 'usr', or for all users (usr = *)
 Return 0 on success, -1 in case of error.
TProofLog * GetSessionLogs(Int_t ridx = 0, const char* stag = 0, const char* pattern = "-v \"| SvcMsg\"", Bool_t rescan = kFALSE)
 Get logs or log tails from last session associated with this manager
 instance.
 The arguments allow to specify a session different from the last one:
      isess   specifies a position relative to the last one, i.e. 1
              for the next to last session; the absolute value is taken
              so -1 and 1 are equivalent.
      stag    specifies the unique tag of the wanted session
 The special value stag = "NR" allows to just initialize the TProofLog
 object w/o retrieving the files; this may be useful when the number
 of workers is large and only a subset of logs is required.
 If 'stag' is specified 'isess' is ignored (unless stag = "NR").
 If 'pattern' is specified only the lines containing it are retrieved
 (remote grep functionality); to filter out a pattern 'pat' use
 pattern = "-v pat".
 If 'rescan' is TRUE, masters will rescan the worker sandboxes for the exact
 paths, instead of using the save information; may be useful when the
 ssave information looks wrong or incomplete.
 Returns a TProofLog object (to be deleted by the caller) on success,
 0 if something wrong happened.
TObjString * ReadBuffer(const char* file, Long64_t ofs, Int_t len)
 Read, via the coordinator, 'len' bytes from offset 'ofs' of 'file'.
 Returns a TObjString with the content or 0, in case of failure
TObjString * ReadBuffer(const char* file, const char* pattern)
 Read, via the coordinator, lines containing 'pattern' in 'file'.
 Returns a TObjString with the content or 0, in case of failure
void ShowROOTVersions()
 Display what ROOT versions are available on the cluster
void SetROOTVersion(const char* tag)
 Set the default ROOT version to be used
Int_t SendMsgToUsers(const char* msg, const char* usr = 0)
 Send a message to connected users. Only superusers can do this.
 The first argument specifies the message or the file from where to take
 the message.
 The second argument specifies the user to which to send the message: if
 empty or null the message is send to all the connected users.
 return 0 in case of success, -1 in case of error
void Grep(const char* what, const char* how = 0, const char* where = 0)
 Run 'grep' on the nodes
void Find(const char* what = "~/", const char* how = "-type f", const char* where = 0)
 Run 'find' on the nodes
void Ls(const char* what = "~/", const char* how = 0, const char* where = 0)
 Run 'ls' on the nodes
void More(const char* what, const char* how = 0, const char* where = 0)
 Run 'more' on the nodes
Int_t Rm(const char* what, const char* how = 0, const char* where = 0)
 Run 'rm' on the nodes. The user is prompted before removal, unless 'how'
 contains "--force" or a combination of single letter options including 'f',
 e.g. "-fv".
void Tail(const char* what, const char* how = 0, const char* where = 0)
 Run 'tail' on the nodes
Int_t Md5sum(const char* what, TString& sum, const char* where = 0)
 Run 'md5sum' on one of the nodes
Int_t Stat(const char* what, FileStat_t& st, const char* where = 0)
 Run 'stat' on one of the nodes
TObjString * Exec(Int_t action, const char* what, const char* how, const char* where)
 Execute 'action' (see EAdminExecType in 'XProofProtocol.h') at 'where'
 (default master), with options 'how', on 'what'. The option specified by
 'how' are typically unix option for the relate commands. In addition to
 the unix authorizations, the limitations are:

      action = kRm        limited to the sandbox (but basic dirs cannot be
                          removed) and on files owned by the user in the
                          allowed directories
      action = kTail      option '-f' is not supported and will be ignored

Int_t GetFile(const char* remote, const char* local, const char* opt = 0)
 Get file 'remote' into 'local' from the master.
 If opt contains "force", the file, if it exists remotely, is copied in all cases,
 otherwise a check is done on the MD5sum.
 If opt contains "silent" standard notificatons are not printed (errors and
 warnings and prompts still are).
 Return 0 on success, -1 on error.
Int_t PutFile(const char* local, const char* remote, const char* opt = 0)
 Put file 'local'to 'remote' to the master
 If opt is "force", the file, if it exists remotely, is copied in all cases,
 otherwise a check is done on the MD5sum.
 Return 0 on success, -1 on error
void CpProgress(const char* pfx, Long64_t bytes, Long64_t size, TStopwatch* watch, Bool_t cr = kFALSE)
 Print file copy progress.
Int_t Cp(const char* src, const char* dst = 0, const char* opts = 0)
 Copy files in/out of the sandbox. Either 'src' or 'dst' must be in the
 sandbox.
 Return 0 on success, -1 on error
Bool_t IsValid() const
{ return fSocket; }
TProof * AttachSession(Int_t id, Bool_t gui = kFALSE)
{ return TProofMgr::AttachSession(id, gui); }