In this section we describe how to start a PROOF session in a few relevant cases:
1. Start a session in a PROOF-enabled facility
To start a PROOF session we have to know the network coordinates of the master, which represents the entry point to the PROOF-enabled facility. Assuming that the URL of the master is 'master.url.dom' we will get some thing like this:
root [0] TProof *proof = TProof::Open("master.url.com")
Starting master: opening connection ...
Starting master: OK
Opening connections to workers: OK (114 workers)
Setting up worker servers: OK (114 workers)
PROOF set to parallel mode (114 workers)
root [1]
1.1 Controlling the number of workers
For initial tests on large facilities it may be wise to start a limited number of workers. This can be done by using the option 'workers=n' as second argument:
root [0] TProof *proof = TProof::Open("master.url.com", "workers=10")
Starting master: opening connection ...
Starting master: OK
+++ Starting max 10 workers following the setting of PROOF_NWORKERS
Opening connections to workers: OK (10 workers)
Setting up worker servers: OK (10 workers)
PROOF set to parallel mode (10 workers)
root [1]
PROOF-Lite sessions are started passing the special URL "lite://":
root [1] TProof *plite = TProof::Open("lite://")
+++ Starting PROOF-Lite with 2 workers +++
Opening connections to workers: OK (2 workers)
Setting up worker servers: OK (2 workers)
PROOF set to parallel mode (2 workers)
root [2]
The empty string "" defaults to "lite://" and therefore could also be used; however the meaning of the empty string can be customized differently, so, depending on the configuration, it can lead to something else.
Note, in the above examples, that many PROOF sessions - i.e. instances on TProof - can be started in the same client session. The global gProof is set by default to the latest instance of TProof created. It can be modified using the TProof::cd method:
root [2] gProof
(class TProof*)0x1018dc800
root [3] plite
(class TProof*)0x1018dc800
root [4] proof
(class TProof*)0x101860600
root [5] proof->cd()
root [6] gProof
(class TProof*)0x101860600
root [7]
So gProof is not a singleton - like gROOT or gSystem - but a convenient global pointer to the PROOF session to use; gProof is available via the TProof.h header file.