TProof


class description - source file - inheritance tree

class TProof : public TObject

    private:
TProof TProof() TProof TProof(const TProof&) Int_t Collect(TMonitor* mon) void ConnectFiles() void GetStatus() void GetUserInfo() Int_t Init(const char* cluster, const char* service, const char* master, const char* vers, Int_t loglevel, const char* confdir) void Limits(TSocket* s, TMessage& mess) void MarkBad(TSlave* sl) void MarkBad(TSocket* s) void operator=(const TProof&) Int_t SendGroupView() Int_t SendInitialState() public:
TProof TProof(const char* cluster, const char* master = pcna49a.cern.ch, const char* vers = kPROOF_Version, const char* service = proofslave, Int_t loglevel = 1, const char* confdir = /usr/proof) virtual void ~TProof() Int_t Broadcast(Int_t kind, TProof::ESlaves list = kActive) Int_t Broadcast(const char* mess, Int_t kind = kMESS_STRING, TProof::ESlaves list = kActive) Int_t Broadcast(const TMessage& mess, TProof::ESlaves list = kActive) TClass* Class() virtual void Close(Option_t* option) Int_t Collect(const TSlave* sl) Int_t Collect(TProof::ESlaves list = kActive) Int_t ConnectFile(const TFile* file) Int_t DisConnectFile(const TFile* file) TSlave* FindSlave(TSocket* s) const Double_t GetBytesRead() const const char* GetClusterName() const const char* GetConfDir() const const char* GetConfFile() const Float_t GetCpuTime() const TList* GetListOfActiveSlaves() const TList* GetListOfBadSlaves() const TList* GetListOfSlaves() const Int_t GetLogLevel() const const char* GetMaster() const Int_t GetNumberOfActiveSlaves() const Int_t GetNumberOfBadSlaves() const Int_t GetNumberOfSlaves() const Int_t GetProtocol() const Float_t GetRealTime() const const char* GetService() const const char* GetUser() const const char* GetVersion() const void Interrupt(TProof::EUrgent type, TProof::ESlaves list = kActive) virtual TClass* IsA() const Bool_t IsActive() Bool_t IsMaster() const Bool_t IsValid() const void Loop(TTree* tree) Int_t Ping(TProof::ESlaves list = kActive) virtual void Print(Option_t* option) void RecvLogFile(TSocket* s) Int_t SendCommand(const char* cmd, TProof::ESlaves list = kActive) Int_t SendCurrentState(TProof::ESlaves list = kActive) 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) TProof* This()

Data Members

private:
TString fCluster name of cluster, name will be used to find config file TString fService service we are connected to, either "proofserv" or "proofslave" TString fMaster name of master server (in case of "proofserv") TString fVersion proof server major version TString fConfDir directory containing cluster config information TString fConfFile file containing config information TString fUser user under which to run TString fPasswd user password Int_t fProtocol protocol level Int_t fLogLevel server debug logging level Bool_t fMasterServ true if we are a master server TList* fSlaves list of all slave servers as in config file TList* fActiveSlaves list of active slaves (subset of all slaves) 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::EUrgent kHardInterrupt static const TProof::EUrgent kSoftInterrupt static const TProof::EUrgent kShutdownInterrupt

Class Description

                                                                      
 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 *cluster, const char *master, const char *version, const char *service, Int_t loglevel, const char *confdir)
 Create a PROOF environment. Starting PROOF involves reading a config
 file describing the cluster and firing slave servers on all of the
 available nodes.

~TProof()
 Clean up PROOF environment.

Int_t Init(const char *cluster, const char *service, const char *master, const char *vers, Int_t loglevel, const char *confdir)
 Start the PROOF environment. Starting PROOF involves reading a config
 file describing the cluster and firing slave servers on all of the
 available nodes.

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).

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 GetUserInfo()
 Get user info: user name and password. This info is needed to validate
 the user on the PROOF cluster.

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 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 GetStatus()
 Get the status of the slaves.

void Interrupt(EUrgent type, ESlaves list)
 Send interrupt OOB byte to master or slave servers.

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 send 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 send 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 slaves
 that responded.

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)
 Print status of PROOF cluster.

void RecvLogFile(TSocket *s)
 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 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.

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 SendObject(const TObject *obj, ESlaves list)
 Send object to master or slave servers. Returns number slaves message
 was sent too, 0 in case of error.

void SetLogLevel(Int_t level)
 Set server logging level.

Int_t SetParallel(Int_t nodes)
 Set the number of nodes that should work in parallel. 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* cluster, const char* master = pcna49a.cern.ch, const char* vers = kPROOF_Version, const char* service = proofslave, Int_t loglevel = 1, const char* confdir = /usr/proof)
        const char* GetClusterName() const
        const char* GetService() const
        const char* GetMaster() const
        const char* GetConfDir() const
        const char* GetConfFile() const
        const char* GetUser() const
        const char* GetVersion() const
              Int_t GetProtocol() const
              Int_t GetLogLevel() const
             TList* GetListOfActiveSlaves() const
             TList* GetListOfSlaves() 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)


Author: Fons Rademakers 13/02/97
Last update: 2.23/12 28/01/2000 16.58.03 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


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.