TProof
class description - source file - inheritance tree
private:
TProof TProof()
TProof TProof(const TProof&)
void AskStatus()
Int_t Collect(TMonitor* mon)
void ConnectFiles()
Int_t GoParallel(Int_t nodes)
Int_t Init(const char* masterurl, const char* conffile, const char* confdir, Int_t loglevel)
void Limits(TSocket* s, TMessage& mess)
void MarkBad(TSlave* sl)
void MarkBad(TSocket* s)
void operator=(const TProof&)
Int_t SendGroupView()
Int_t SendInitialState()
Int_t SendPrint()
public:
TProof TProof(const char* masterurl, const char* conffile = kPROOF_ConfFile, const char* confdir = kPROOF_ConfDir, Int_t loglevel = 1)
virtual void ~TProof()
void ActivateAsyncInput()
Int_t Broadcast(const TMessage& mess, TProof::ESlaves list = kActive)
Int_t Broadcast(const char* mess, Int_t kind = kMESS_STRING, TProof::ESlaves list = kActive)
Int_t Broadcast(Int_t kind, TProof::ESlaves list = kActive)
Int_t BroadcastObject(const TObject* obj, Int_t kind = kMESS_OBJECT, TProof::ESlaves list = kActive)
Int_t BroadcastRaw(const void* buffer, Int_t length, TProof::ESlaves list = kActive)
static TClass* Class()
void Close(Option_t* option)
Int_t Collect(TProof::ESlaves list = kActive)
Int_t Collect(const TSlave* sl)
Int_t ConnectFile(const TFile* file)
void DeActivateAsyncInput()
Int_t DisConnectFile(const TFile* file)
Int_t Exec(const char* cmd, TProof::ESlaves list = kActive)
TSlave* FindSlave(TSocket* s) const
void FindUniqueSlaves()
Double_t GetBytesRead() const
const char* GetConfDir() const
const char* GetConfFile() const
Float_t GetCpuTime() const
const char* GetImage() const
TList* GetListOfActiveSlaves() const
TList* GetListOfBadSlaves() const
TList* GetListOfSlaves() const
TList* GetListOfUniqueSlaves() const
Int_t GetLogLevel() const
const char* GetMaster() const
Int_t GetNumberOfActiveSlaves() const
Int_t GetNumberOfBadSlaves() const
Int_t GetNumberOfSlaves() const
Int_t GetNumberOfUniqueSlaves() const
Int_t GetPort() const
Int_t GetProtocol() const
Float_t GetRealTime() const
Int_t GetStatus() const
const char* GetUser() const
const char* GetWorkDir() const
void HandleAsyncInput(TSocket* s)
void Interrupt(TProof::EUrgent type, TProof::ESlaves list = kActive)
virtual TClass* IsA() const
static Bool_t IsActive()
Bool_t IsMaster() const
Bool_t IsParallel() const
Bool_t IsValid() const
void Loop(TTree* tree)
Int_t Ping(TProof::ESlaves list = kActive)
virtual void Print(Option_t* option) const
void RecvLogFile(TSocket* s, Int_t size)
Int_t SendCommand(const char* cmd, TProof::ESlaves list = kActive)
Int_t SendCurrentState(TProof::ESlaves list = kActive)
Int_t SendFile(const char* file, Bool_t bin = kTRUE, TProof::ESlaves list = kUnique)
Int_t SendObject(const TObject* obj, TProof::ESlaves list = kActive)
void SetLogLevel(Int_t level)
Int_t SetParallel(Int_t nodes = 9999)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
static TProof* This()
private:
TString fMaster name of master server (use "" if this is a master)
TString fConfDir directory containing cluster config information
TString fConfFile file containing config information
TString fWorkDir current work directory on remote servers
TString fUser user under which to run
TString fPasswd user password
TString fImage master's image name
Int_t fPort port we are connected to (proofd = 1093)
Int_t fSecurity security level used to connect to master server
Int_t fProtocol protocol version number
Int_t fLogLevel server debug logging level
Int_t fStatus remote return status (part of kPROOF_LOGDONE)
Int_t fParallel number of active slaves (only set on client, on server use fActiveSlaves)
Bool_t fMasterServ true if we are a master server
Bool_t fSendGroupView if true send new group view
TList* fSlaves list of all slave servers as in config file
TList* fActiveSlaves list of active slaves (subset of all slaves)
TList* fUniqueSlaves list of all active slaves with unique file systems
TList* fBadSlaves dead slaves (subset of all slaves)
TMonitor* fAllMonitor monitor activity on all valid slave sockets
TMonitor* fActiveMonitor monitor activity on all active slave sockets
Double_t fBytesRead bytes read by all slaves during the session
Float_t fRealTime realtime spent by all slaves during the session
Float_t fCpuTime CPU time spent by all slaves during the session
TTree* fTree Object being PROOFed
Int_t fLimits Used by Limits()
public:
static const TProof::ESlaves kAll
static const TProof::ESlaves kActive
static const TProof::ESlaves kUnique
static const TProof::EUrgent kHardInterrupt
static const TProof::EUrgent kSoftInterrupt
static const TProof::EUrgent kShutdownInterrupt
TProof
This class controls a Parallel ROOT Facility, PROOF, cluster.
It fires the slave servers, it keeps track of how many slaves are
running, it keeps track of the slaves running status, it broadcasts
messages to all slaves, it collects results, etc.
TProof(const char *masterurl, const char *conffile,
const char *confdir, Int_t loglevel)
Create a PROOF environment. Starting PROOF involves either connecting
to a master server, which in turn will start a set of slave servers, or
directly starting as master server (if master = ""). Masterurl is of
the form: proof://host[:port] or proofs://host[:port]. Conffile is
the name of the config file describing the remote PROOF cluster
(this argument alows you to describe different cluster configurations).
The default proof.conf. Confdir is the directory where the config
file and other PROOF related files are (like motd and noproof files).
Loglevel is the og level (default = 1).
~TProof()
Clean up PROOF environment.
Int_t Init(const char *masterurl, const char *conffile,
const char *confdir, Int_t loglevel)
Start the PROOF environment. Starting PROOF involves either connecting
to a master server, which in turn will start a set of slave servers, or
directly starting as master server (if master = ""). For a description
of the arguments see the TProof ctor.
Int_t ConnectFile(const TFile *file)
Send message to all slaves to connect "file". This method is
called by the TFile ctor (no user method). Message is only send
if file was opened in READ mode.
void ConnectFiles()
Tell all servers to open all files currently opened by the client.
void Close(Option_t *)
Close all open slave servers.
Int_t DisConnectFile(const TFile *file)
Send message to all slaves to disconnect "file". This method is
called by the TFile::Close() (no user method).
TSlave* FindSlave(TSocket *s) const
Find slave that has TSocket s. Returns 0 in case slave is not found.
void FindUniqueSlaves()
Add to the fUniqueSlave list the active slaves that have a unique
(user) file system image. This information is used to transfer files
only once to nodes that share a file system (an image).
Int_t GetNumberOfSlaves() const
Return number of slaves as described in the config file.
Int_t GetNumberOfActiveSlaves() const
Return number of active slaves, i.e. slaves that are valid and in
the current computing group.
Int_t GetNumberOfUniqueSlaves() const
Return number of unique slaves, i.e. active slaves that have each a
unique different user files system.
Int_t GetNumberOfBadSlaves() const
Return number of bad slaves. This are slaves that we in the config
file, but refused to startup or that died during the PROOF session.
void AskStatus()
Ask the status of the slaves.
void Interrupt(EUrgent type, ESlaves list)
Send interrupt OOB byte to master or slave servers.
Bool_t IsParallel() const
Returns true if PROOF is in parallel mode.
Int_t Broadcast(const TMessage &mess, ESlaves list)
Broadcast a message to all slaves in the specified list (either
all slaves or only the active slaves). Returns the number of slaves
the message was successfully sent to.
Int_t Broadcast(const char *str, Int_t kind, ESlaves list)
Broadcast a character string buffer to all slaves in the specified
list (either all slaves or only the active slaves). Use kind to
set the TMessage what field. Returns the number of slaves the message
was sent to.
Int_t BroadcastObject(const TObject *obj, Int_t kind, ESlaves list)
Broadcast an object to all slaves in the specified list. Use kind to
set the TMEssage what field. Returns the number of slaves the message
was sent to.
Int_t BroadcastRaw(const void *buffer, Int_t length, ESlaves list)
Broadcast a raw buffer of specified length. Returns the number of slaves
the buffer was sent to.
Int_t Collect(const TSlave *sl)
Collect responses from slave sl. Returns the number of slaves that
responded (=1).
Int_t Collect(ESlaves list)
Collect responses from the slave servers. Returns the number of slaves
that responded.
Int_t Collect(TMonitor *mon)
Collect responses from the slave servers. Returns the number of messages
received. Can be 0 if there are no active slaves.
void ActivateAsyncInput()
Activate the a-sync input handler.
void DeActivateAsyncInput()
De-actiate a-sync input handler.
void HandleAsyncInput(TSocket *sl)
Handle input coming from the master server (when this is a client)
or from a slave server (when this is a master server). This is mainly
for a-synchronous communication. Normally when PROOF issues a command
the (slave) server messages are directly handle by Collect().
void Limits(TSocket *s, TMessage &mess)
Calculate histogram limits after TTree::fEstimate entries have
been processed.
This function is called via Collect() in response to a kPROOF_LIMITS
message send from a PROOF slave in TTree::TakeEstimate().
void Loop(TTree *tree)
Handle message comming from the remote TTree method currently being
executed.
void MarkBad(TSlave *sl)
Add a bad slave server to the bad slave list and remove it from
the active list and from the two monitor objects.
void MarkBad(TSocket *s)
Add slave with socket s to the bad slave list and remove if from
the active list and from the two monitor objects.
Int_t Ping(ESlaves list)
Ping PROOF slaves. Returns the number of slaves that responded.
void Print(Option_t *option) const
Print status of PROOF cluster.
void RecvLogFile(TSocket *s, Int_t size)
Receive the log file of the slave with socket s.
Int_t SendGroupView()
Send to all active slaves servers the current slave group size
and their unique id. Returns number of active slaves.
Int_t Exec(const char *cmd, ESlaves list)
Send command to be executed on the PROOF master and/or slaves.
Command can be any legal command line command. Commands like
".x file.C" or ".L file.C" will cause the file file.C to be send
to the PROOF cluster. Returns -1 in case of error, >=0 in case of
succes.
Int_t SendCommand(const char *cmd, ESlaves list)
Send command to be executed on the PROOF master and/or slaves.
Command can be any legal command line command, however commands
like ".x file.C" or ".L file.C" will not cause the file.C to be
transfered to the PROOF cluster. In that case use TProof::Exec().
Returns the status send by the remote server as part of the
kPROOF_LOGDONE message. Typically this is the return code of the
command on the remote side.
Int_t SendCurrentState(ESlaves list)
Transfer the current state of the master to the active slave servers
just before starting the TTree loop. The current state includes: the
current working directory, TChain defintion, MaxVirtualSize, Selector,
etc.
Int_t SendInitialState()
Transfer the initial (i.e. current) state of the master to all
slave servers. The initial state includes: log level, currently open
files.
Int_t SendFile(const char *file, Bool_t bin, ESlaves list)
Send a file to master or slave servers. Returns number of slaves
the file was sent to, maybe 0 in case master and slaves have the same
file system image, -1 in case of error. If bin is true binary
file transfer is used, otherwise ASCII mode.
Int_t SendObject(const TObject *obj, ESlaves list)
Send object to master or slave servers. Returns number slaves object
was sent to, 0 in case of error.
Int_t SendPrint()
Send print command to master server.
void SetLogLevel(Int_t level)
Set server logging level.
Int_t SetParallel(Int_t nodes)
Tell RPOOF how many slaves to use in parallel. Returns the number of
parallel slaves.
Int_t GoParallel(Int_t nodes)
Go in parallel mode with at most "nodes" slaves. Since the fSlaves
list is sorted by slave performace the active list will contain first
the most performant nodes.
Bool_t IsActive()
Static function that returns kTRUE in case a PROOF connection exists
with more than 1 active slave. When only one active slave we run in
sequential mode.
TProof* This()
Static function returning pointer to global object gProof.
Mainly for use via CINT, where the gProof symbol might be
deleted from the symbol table.
Inline Functions
TProof TProof(const TProof&)
void operator=(const TProof&)
TProof TProof(const char* masterurl, const char* conffile = kPROOF_ConfFile, const char* confdir = kPROOF_ConfDir, Int_t loglevel = 1)
const char* GetMaster() const
const char* GetConfDir() const
const char* GetConfFile() const
const char* GetUser() const
const char* GetWorkDir() const
const char* GetImage() const
Int_t GetPort() const
Int_t GetProtocol() const
Int_t GetStatus() const
Int_t GetLogLevel() const
TList* GetListOfSlaves() const
TList* GetListOfActiveSlaves() const
TList* GetListOfUniqueSlaves() const
TList* GetListOfBadSlaves() const
Double_t GetBytesRead() const
Float_t GetRealTime() const
Float_t GetCpuTime() const
Bool_t IsMaster() const
Bool_t IsValid() const
Int_t Broadcast(Int_t kind, TProof::ESlaves list = kActive)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Author: Fons Rademakers 13/02/97
Last update: root/proof:$Name: $:$Id: TProof.cxx,v 1.11 2000/12/22 12:36:00 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.