This macro uses an existing PROOF session or starts one at the indicated URL. In the case non existing PROOF session is found and no URL is given, the macro tries to start a local PROOF session.
Currently available analysis are (to see how all this really works check the scope for the specified option inside the macro):
"simple"
Selector: ProofSimple.h.C
root[] runProof("simple")
This will create a local PROOF session and run an analysis filling 100 histos with 100000 gaussian random numbers, and displaying them in a canvas with 100 pads (10x10). The number of histograms can be passed as argument 'nhist' to 'simple', e.g. to fill 16 histos with 1000000 entries use
root[] runProof("simple(nevt=1000000,nhist=16)")
The argument nhist3 controls the creation of 3d histos to simulate merging load. By default, no 3D hitogram is created.
"h1"
Selector: tutorials/tree/h1analysis.h.C
root[] runProof("h1")
This runs the 'famous' H1 analysis from $ROOTSYS/tree/h1analysis.C.h. By default the data are read from the HTTP server at root.cern.ch, the data source can be changed via the argument 'h1src', e.g.
root[] runProof("h1,h1src=/data/h1")
(the directory specified must contain the 4 H1 files).
The 'h1' example is also used to show how to use entry-lists in PROOF. To fill the list for the events used for the final plots add the option 'fillList':
root[] runProof("h1,fillList")
To use the list previously created for the events used for the final plots add the option 'useList':
root[] runProof("h1,useList")
"event"
Selector: ProofEvent.h,.C
This is an example of using PROOF par files. It runs event generation and simple analysis based on the 'Event' class found under test.
root[] runProof("event")
"eventproc"
Selector: ProofEventProc.h.C
This is an example of using PROOF par files and process 'event' data from the ROOT HTTP server. It runs the ProofEventProc selector which is derived from the EventTree_Proc one found under test/ProofBench. The following specific arguments are available:
- 'readall' to read the whole event, by default only the branches needed by the analysis are read (read 25% more bytes)
- 'datasrc=<dir-with-files>' to read the files from another server, the files must be named 'event_<num>.root' where <num>=1,2,... or
- 'datasrc=<file-with-files>' to take the file content from a text file, specified one file per line; usefull when testing differences between several sources and distributions
- 'files=N' to change the number of files to be analysed (default is 10, max is 50 for the HTTP server).
- 'uneven' to process uneven entries from files following the scheme {50000,5000,5000,5000,5000} and so on
root[] runProof("eventproc")
"pythia8"
Selector: ProofPythia.h.C
This runs Pythia8 generation based on main03.cc example in Pythia 8.1
To run this analysis ROOT must be configured with pythia8.
Note that before executing this analysis, the env variable PYTHIA8 must point to the pythia8100 (or newer) directory, in particular, $PYTHIA8/xmldoc must contain the file Index.xml. The tutorial assumes that the Pythia8 directory is the same on all machines, i.e. local and worker ones.
root[] runProof("pythia8")
"ntuple"
Selector: ProofNtuple.h.C
This is an example of final merging via files created on the workers, using TProofOutputFile. The final file is called ProofNtuple.root and it is created in the directory where the tutorial is run. If the PROOF cluster is remote, the file is received by a local xrootd daemon started for the purpose. Because of this, this example can be run only on unix clients.
root[] runProof("ntuple")
By default the random numbers are generate anew. There is the possibility use a file of random numbers (to have reproducible results) by specify the option 'inputrndm', e.g.
root[] runProof("ntuple(inputrndm)")
By default the output will be saved in the local file SimpleNtuple.root; location and name of the file can be changed via the argument 'outfile', e.g.
root[] runProof("simplefile(outfile=/data0/testntuple.root)") root[] runProof("simplefile(outfile=root://aserver//data/testntuple.root)")
"dataset"
Selector: ProofNtuple.h.C
This is an example of automatic creation of a dataset from files created on the workers, using TProofOutputFile. The dataset is called testNtuple and it is automatically registered and verified. The files contain the same ntuple as in previous example/tutorial 6 (the same selector ProofNTuple is used with a slightly different configuration). The dataset is then used to produce the same plot as in 5 but using the DrawSelect methods of PROOF, which also show how to set style, color and other drawing attributes in PROOF. Depending on the relative worker perforance, some of the produced files may result in having no entries. If this happens, the file will be added to the missing (skipped) file list. Increasing the number of events (via nevt=...) typically solves this issue.
root[] runProof("dataset")
"friends"
Selectors: ProofFriends.h(.C), ProofAux.h(.C)
This is an example of TTree friend processing in PROOF. It also shows how to use the TPacketizerFile to steer creation of files.
root[] runProof("friends")
The trees are by default created in separate files; to create them in the same file use option 'samefile', e.g.
root[] runProof("friends(samefile)")
"simplefile"
Selector: ProofSimpleFile.h.C
root[] runProof("simplefile")
This will create a local PROOF session and run an analysis filling 16+16 histos with 100000 gaussian random numbers. The merging of these histos goes via file; 16 histos are saved in the top directory, the other 16 into a subdirectory called 'blue'. The final display is done in two canvanses, one for each set of histograms and with 16 pads each (4x4). The number of histograms in each set can be passed as argument 'nhist' to 'simplefile', e.g. to fill 25 histos with 1000000 entries use
root[] runProof("simplefile(nevt=1000000,nhist=25)")
By default the output will be saved in the local file SimpleFile.root; location and name of the file can be changed via the argument 'outfile', e.g.
root[] runProof("simplefile(outfile=/data0/testsimple.root)") root[] runProof("simplefile(outfile=root://aserver//data/testsimple.root)")
"stdvec"
Selector: ProofStdVect.h.C
This is an example of using standard vectors (vector<vector<bool> > and vector<vector<float> >) in a TSelector. The same selector is run twice: in 'create' mode it creates a dataset with the tree 'stdvec' containing 3 branches, a vector<vector<bool> > and two vector<vector<float> >. The tree is saved into a file on each worker and a dataset is created with these files (the dataset is called 'TestStdVect'); in 'read' mode the dataset is read and a couple fo histograms filled and displayed.
root[] runProof("stdvec")
The following arguments are valid for all examples (the ones specific to each tutorial have been explained above)
In all cases, to run on a remote PROOF cluster, the master URL must be passed as second argument; e.g.
A rough parsing of the URL is done to determine the locality of the cluster. If using a tunnel the URL can start by localhost even for external clusters: in such cases the default locality determination will be wrong, so one has to tell explicity that the cluster is external via the option field, e.g.
In the case of local running it is possible to specify the number of workers to start as third argument (the default is the number of cores of the machine), e.g.
will start 4 workers. Note that the real number of workers is changed only the first time you call runProof into a ROOT session. Following calls can reduce the number of active workers, but not increase it. For example, in the same session of the call above starting 4 workers, this
will disable 2 workers and use the other 2.
Finally, it is possible to pass as 4th argument a list of objects to be added to the input list to further control the PROOF behaviour:
the content of 'ins' will then be copied to the input list before processing.
void plotNtuple(
TProof *p,
const char *ds,
const char *ntptitle);
void SavePerfTree(
TProof *proof,
const char *fn);
const char *pythia8dir = 0;
const char *pythia8data = 0;
void runProof(
const char *
what =
"simple",
const char *masterurl = "proof://localhost:40000",
{
if (!u.IsNull() && u != "lite://") {
if ((!strcmp(uu.GetHost(), "localhost") && !uopts.Contains("external")) ||
}
if (!u.BeginsWith(uu.GetProtocol())) uu.SetProtocol("proof");
uopts.ReplaceAll("external", "");
uu.SetOptions(uopts.Data());
u = uu.GetUrl();
}
const char *url = u.Data();
if (!ug) {
Printf(
"runProof: could not get user info");
return;
}
if (!tmpdir.EndsWith(us.
Data())) tmpdir += us;
Printf(
"runProof: unable to get a writable tutorial directory (tried: %s)"
" - cannot continue", tmpdir.Data());
return;
}
TString tutdir =
Form(
"%s/.proof-tutorial", tmpdir.Data());
Printf(
"runProof: creating the temporary directory"
" for the tutorial (%s) ... ", tutdir.
Data());
Printf(
"runProof: could not assert / create the temporary directory"
" for the tutorial (%s)", tutdir.
Data());
return;
}
}
if (
what && !strncmp(
what,
"pythia8", 7)) {
if (!pythia8dir || strlen(pythia8dir) <= 0) {
Printf(
"runProof: pythia8: environment variable PYTHIA8 undefined:"
" it must contain the path to pythia81xx root directory (local and remote) !");
return;
}
if (!pythia8data || strlen(pythia8data) <= 0) {
if (!pythia8data || strlen(pythia8data) <= 0) {
Printf(
"runProof: pythia8: environment variable PYTHIA8DATA undefined:"
" it one must contain the path to pythia81xx/xmldoc"
" subdirectory (local and remote) !");
return;
}
}
TString env =
Form(
"echo export PYTHIA8=%s; export PYTHIA8DATA=%s",
pythia8dir, pythia8data);
}
TProof *proof = getProof(url, nwrks, tutdir.
Data(),
"ask");
if (!proof) {
Printf(
"runProof: could not start/attach a PROOF session");
return;
}
#ifdef WIN32
if (isProofLocal &&
what && !strcmp(
what,
"ntuple", 6)) {
Printf(
"runProof: the 'ntuple' example needs to run xrootd to receive the output file, \n"
" but xrootd is not supported on Windows - cannot continue");
return;
}
#endif
FILE *fs = fopen(proofsessions.Data(), "a");
if (!fs) {
Printf(
"runProof: could not create files for sessions tags");
} else {
fclose(fs);
}
if (!proof) {
Printf(
"runProof: could not start/attach a PROOF session");
return;
}
if (nwrks > 0)
if (!rootbin) {
Printf(
"runProof: root.exe not found: please check the environment!");
return;
}
delete[] rootbin;
args.ReplaceAll("("," ");
args.ReplaceAll(")"," ");
args.ReplaceAll(","," ");
if (!args.Tokenize(act, from, " ")) {
Printf(
"runProof: action not found: check your arguments (%s)",
what);
return;
}
aMode += "+";
}
TString aNevt, aFirst, aNwrk, opt, sel, punzip(
"off"), aCache, aOutFile,
aH1Src("http://root.cern.ch/files/h1"),
aDebug, aDebugEnum, aRateEst, aPerfTree("perftree.root"),
aFeedback("fb=stats");
while (args.Tokenize(tok, from, " ")) {
aDebug = tok;
aDebugEnum = aDebug(0, icol);
}
Printf(
"runProof: %s: error parsing the 'debug=' option (%s) - ignoring", act.
Data(), tok.
Data());
aDebug = "";
aDebugEnum = "";
}
}
aNevt = tok;
Printf(
"runProof: %s: error parsing the 'nevt=' option (%s) - ignoring", act.
Data(), tok.
Data());
aNevt = "";
}
}
aFirst = tok;
Printf(
"runProof: %s: error parsing the 'first=' option (%s) - ignoring", act.
Data(), tok.
Data());
aFirst = "";
}
}
opt = "ASYN";
aNwrk = tok;
Printf(
"runProof: %s: error parsing the 'nwrk=' option (%s) - ignoring", act.
Data(), tok.
Data());
aNwrk = "";
}
}
punzip = "on";
aCache = tok;
Printf(
"runProof: %s: error parsing the 'cache=' option (%s) - ignoring", act.
Data(), tok.
Data());
aCache = "";
}
}
aSubMg = 0;
}
}
}
opt += "fillList";
}
if (!(tok.
IsNull())) aH1Src = tok;
Printf(
"runProof: %s: reading data files from '%s'", act.
Data(), aH1Src.Data());
}
if (!(tok.
IsNull())) aRateEst = tok;
Printf(
"runProof: %s: progress-bar rate estimation option: '%s'", act.
Data(), aRateEst.
Data());
}
if (!(tok.
IsNull())) aPerfTree = tok;
}
Printf(
"runProof: %s: saving performance tree to '%s'", act.
Data(), aPerfTree.Data());
}
if (!(tok.
IsNull())) aOutFile = tok;
}
Printf(
"runProof: %s: output file: '%s'", act.
Data(), aOutFile.
Data());
}
if (tok == "off" || tok == "OFF" || tok == "0") {
aFeedback = "";
tok[0] = ',';
aFeedback += tok;
} else {
}
}
Printf(
"runProof: %s: feedback: '%s'", act.
Data(), aFeedback.Data());
}
}
from = 0;
if (nwrk > 0) {
Printf(
"runProof: %s: request for a number of workers larger then available - ignored", act.
Data());
} else {
}
}
if (!aDebugEnum.
IsNull()) scope = getDebugEnum(aDebugEnum.
Data());
Printf(
"runProof: %s: verbose mode for '%s'; level: %d", act.
Data(), aDebugEnum.
Data(), dbg);
}
if (aRateEst == "average")
if (punzip == "on") {
Printf(
"runProof: %s: parallel unzip enabled", act.
Data());
} else {
}
if (cachesz <= 0) {
Printf(
"runProof: %s: disabling tree cache", act.
Data());
} else {
Printf(
"runProof: %s: setting cache size to %lld", act.
Data(), cachesz);
}
} else {
}
if (aSubMg >= 0) {
if (aSubMg > 0) {
Printf(
"runProof: %s: enabling merging via %d sub-mergers", act.
Data(), aSubMg);
} else {
Printf(
"runProof: %s: enabling merging via sub-mergers (optimal number)", act.
Data());
}
} else {
}
if (makePerfTree) {
}
if (ins && ins->GetSize() > 0) {
while ((oin = nxo())) { proof->
AddInput(oin); }
}
if (act == "simple") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
nevt = (nevt < 0) ? 100000 : nevt;
while (args.Tokenize(tok, from, " ")) {
aNhist = tok;
Printf(
"runProof: error parsing the 'nhist=' option (%s) - ignoring", tok.
Data());
aNhist = "";
}
aNhist3 = tok;
Printf(
"runProof: error parsing the 'nhist3=' option (%s) - ignoring", tok.
Data());
aNhist3 = "";
}
}
}
Int_t nhist3 = (aNhist3.
IsNull()) ? -1 : aNhist3.Atoi();
Printf(
"\nrunProof: running \"simple\" with nhist= %d, nhist3=%d and nevt= %lld\n", nhist, nhist3, nevt);
sel.
Form(
"%s/proof/ProofSimple.C%s", tutorials.Data(), aMode.
Data());
} else if (act == "h1") {
if (useList) {
TString eln(
"elist"), elfn(
"elist.root");
Printf(
"\nrunProof: asked to use an entry list but '%s' not found or not readable", elfn.Data());
Printf(
"\nrunProof: did you forget to run with 'fillList=%s'?\n", elfn.Data());
} else {
if (elist) {
} else {
Printf(
"\nrunProof: could not find entry-list '%s' in file '%s': ignoring",
eln.Data(), elfn.Data());
}
} else {
Printf(
"\nrunProof: requested entry-list file '%s' not existing (or not readable):"
" ignoring", elfn.Data());
}
}
}
sel.
Form(
"%s/tree/h1analysis.C%s", tutorials.Data(), aMode.
Data());
Printf(
"\nrunProof: running \"h1\"\n");
while ((o = nxi())) {
if (!strncmp(o->
GetName(),
"elist", 5)) {
delete o;
}
}
} else if (act == "pythia8") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
Printf(
"runProof: pythia8: PYTHIA8DATA directory (%s) must"
" contain the Index.xml file !", pythia8data);
return;
}
Printf(
"runProof: pythia8: par file not found (tried %s)", pythia8par.
Data());
return;
}
Printf(
"runProof: pythia8: check settings:");
proof->
Exec(
".!echo hostname = `hostname`; echo \"ls pythia8:\"; ls pythia8");
Printf(
"runProof: pythia8: libEG not found \n");
return;
}
Printf(
"runProof: pythia8: libEGPythia8 not found \n");
return;
}
nevt = (nevt < 0) ? 100 : nevt;
Printf(
"\nrunProof: running \"Pythia01\" nevt= %lld\n", nevt);
sel.
Form(
"%s/proof/ProofPythia.C%s", tutorials.Data(), aMode.
Data());
} else if (act == "event") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
Printf(
"runProof: event: par file not found (tried %s)", eventpar.
Data());
return;
}
Printf(
"Enabled packages...\n");
nevt = (nevt < 0) ? 100 : nevt;
Printf(
"\nrunProof: running \"event\" nevt= %lld\n", nevt);
sel.
Form(
"%s/proof/ProofEvent.C%s", tutorials.Data(), aMode.
Data());
} else if (act == "eventproc") {
Printf(
"runProof: eventproc: par file not found (tried %s)", eventpar.
Data());
return;
}
Printf(
"Enabled packages...\n");
Printf(
"runProof: eventproc: ProcFileElements.C not found (tried %s)", pfelem.
Data());
return;
}
pfelem += aMode;
TString aFiles, aDataSrc(
"http://root.cern.ch/files/data"), aPartitions;
while (args.Tokenize(tok, from, " ")) {
aFiles = tok;
Printf(
"runProof: error parsing the 'files=' option (%s) - ignoring", tok.
Data());
aFiles = "";
}
Printf(
"runProof: error parsing the 'datasrc=' option (%s) - ignoring", tok.
Data());
} else {
aDataSrc = tok;
Printf(
"runProof: reading files from: %s", aDataSrc.Data());
}
} else if (tok == "readall") {
Printf(
"runProof: eventproc: reading the full event");
} else if (tok == "uneven") {
Printf(
"runProof: error parsing the 'partitions=' option (%s) - ignoring", tok.
Data());
} else {
aPartitions = tok;
Printf(
"runProof: partitions: %s included in packetizer operations", aPartitions.
Data());
}
}
}
Printf(
"runProof: found aFiles: '%s', nFiles: %d", aFiles.
Data(), nFiles);
if (nFiles > 50) {
Printf(
"runProof: max number of files is 50 - resizing request");
nFiles = 50;
}
c->AddFileInfoList(
fc->GetList());
} else {
for (i = 1; i <= nFiles; i++) {
k = (i - 1) % nds;
if (os) {
if (uneven) {
if ((i - 1)%5 == 0)
c->AddFile(fn.
Data(), 50000);
else
c->AddFile(fn.
Data(), 5000);
} else {
}
}
}
delete dsrcs;
}
proof->
SetParameter(
"PROOF_PacketizerPartitions", aPartitions);
}
sel.
Form(
"%s/proof/ProofEventProc.C%s", tutorials.Data(), aMode.
Data());
Printf(
"\nrunProof: running \"eventproc\"\n");
} else if (act == "ntuple") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
nevt = (nevt < 0) ? 1000 : nevt;
Printf(
"\nrunProof: running \"ntuple\" with nevt= %lld\n", nevt);
while (args.Tokenize(tok, from, " ")) {
if (tok == "inputrndm") {
break;
}
}
if (usentprndm)
Printf(
"runProof: taking randoms from input ntuple\n");
if (fout.IsNull()) {
if (!isProofLocal) {
while (port < 9010) {
if (checkXrootdAt(port) != 1) {
break;
}
}
port++;
}
if (!xrdok) {
Printf(
"runProof: could not start basic xrootd on ports 9000-9009 - cannot continue");
return;
}
}
}
if (usentprndm) {
Printf(
"runProof: taking randoms from '%s'", fnr.
Data());
}
sel.
Form(
"%s/proof/ProofNtuple.C%s", tutorials.Data(), aMode.
Data());
Printf(
"runProof: selector file '%s', options: '%s'", sel.
Data(), xopt.
Data());
if (usentprndm) {
}
} else if (act == "dataset") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
nevt = (nevt < 0) ? 1000000 : nevt;
Printf(
"\nrunProof: running \"dataset\" with nevt= %lld\n", nevt);
sel.
Form(
"%s/proof/ProofNtuple.C%s", tutorials.Data(), aMode.
Data());
plotNtuple(proof, "testNtuple", "proof ntuple from dataset");
} else {
Printf(
"runProof: dataset 'testNtuple' not found in the output list");
}
} else if (act == "friends") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
while (args.Tokenize(tok, from, " ")) {
if (tok == "samefile") {
break;
}
}
if (!wrks) {
Printf(
"runProof: could not get the list of information about the workers");
return;
}
files->
SetName(
"PROOF_FilesToProcess");
if (!wrklist) {
}
}
if (sameFile) {
Printf(
"runProof: friend tree stored in the same file as the main tree");
proof->
SetParameter(
"ProofAux_Action",
"GenerateTreesSameFile");
} else {
}
nevt = (nevt < 0) ? 10000 : nevt;
sel.
Form(
"%s/proof/ProofAux.C%s", tutorials.Data(), aMode.
Data());
while ((o = nxo())) {
if (
l && !strncmp(
l->GetName(),
"MainList-", 9)) {
}
}
nxo.Reset();
while ((o = nxo())) {
if (
l && !strncmp(
l->GetName(),
"FriendList-", 11)) {
}
}
}
sel.
Form(
"%s/proof/ProofFriends.C%s", tutorials.Data(), aMode.
Data());
} else if (act == "simplefile") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
nevt = (nevt < 0) ? 1000000 : nevt;
while (args.Tokenize(tok, from, " ")) {
aNhist = tok;
Printf(
"runProof: error parsing the 'nhist=' option (%s) - ignoring", tok.
Data());
aNhist = "";
}
}
}
Printf(
"\nrunProof: running \"simplefile\" with nhist= %d and nevt= %lld\n", nhist, nevt);
if (fout.IsNull()) {
if (!isProofLocal) {
while (port < 9010) {
if (checkXrootdAt(port) != 1) {
break;
}
}
port++;
}
if (!xrdok) {
Printf(
"runProof: could not start basic xrootd on ports 9000-9009 - cannot continue");
return;
}
}
}
sel.
Form(
"%s/proof/ProofSimpleFile.C%s", tutorials.Data(), aMode.
Data());
} else if (act == "stdvec") {
Printf(
"runProof: %s: warning concept of 'first' meaningless for this tutorial"
" - ignored", act.
Data());
nevt = (nevt < 0) ? 50000 * proof->
GetParallel() : nevt;
Printf(
"\nrunProof: running \"stdvec\" with nevt= %lld\n", nevt);
sel.
Form(
"%s/proof/ProofStdVect.C%s", tutorials.Data(), aMode.
Data());
xopt.
Form(
"%s %s create", aFeedback.Data(), opt.
Data());
xopt.
Form(
"%s %s", aFeedback.Data(), opt.
Data());
} else {
Printf(
"runProof: dataset 'TestStdVect' not available!");
}
} else {
}
if (makePerfTree) {
SavePerfTree(proof, aPerfTree.Data());
}
}
void plotNtuple(
TProof *p,
const char *ds,
const char *ntptitle)
{
p->
DrawSelect(ds,
"1.3*px+2",
"(px^2+py^2>4) && py>0",
"same");
p->
DrawSelect(ds,
"pz:py:px",
"(pz<10 && pz>6)+(pz<4 && pz>3)");
p->
DrawSelect(ds,
"pz:py:px",
"pz<6 && pz>4",
"same");
p->
DrawSelect(ds,
"pz:py:px",
"pz<4 && pz>3",
"same");
l2->
AddText(
"You can interactively rotate this view in 2 ways:");
l2->
AddText(
" - With the RotateCube in clicking in this pad");
l2->
AddText(
" - Selecting View with x3d in the View menu");
}
void SavePerfTree(
TProof *proof,
const char *fn)
{
if (!proof) {
Printf(
"PROOF must be run to save output performance information");;
return;
}
Printf(
"PROOF outputlist undefined or empty");;
return;
}
Printf(
"ERROR: could not open file '%s' for writing", fn);;
} else {
while ((obj = nxo())) {
if (objname.BeginsWith("PROOF_")) {
if (objname == "PROOF_PerfStats" ||
objname == "PROOF_PacketsHist" ||
objname == "PROOF_EventsHist" ||
objname == "PROOF_NodeHist" ||
objname == "PROOF_LatencyHist" ||
objname == "PROOF_ProcTimeHist" ||
objname == "PROOF_CpuTimeHist")
}
}
}
}
R__EXTERN TProof * gProof
char * Form(const char *fmt,...)
void Printf(const char *fmt,...)
Bool_t R_ISREG(Int_t mode)
R__EXTERN TSystem * gSystem
static struct mg_connection * fc(struct mg_context *ctx)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
A chain is a collection of files containing TTree objects.
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Process all entries in this chain, calling functions in filename.
virtual void SetEntryList(TEntryList *elist, Option_t *opt="")
Set the input entry list (processing the entries of the chain will then be limited to the entries in ...
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
virtual void SetProof(Bool_t on=kTRUE, Bool_t refresh=kFALSE, Bool_t gettreeheader=kFALSE)
Enable/Disable PROOF processing on the current default Proof (gProof).
virtual void ls(Option_t *option="") const
List the chain.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
void SetName(const char *name)
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class implements a data set to be used for PROOF processing.
virtual Bool_t Add(const char *file, const char *objname=0, const char *dir=0, Long64_t first=0, Long64_t num=-1, const char *msd=0)
Add file to list of files to be analyzed.
virtual void AddFriend(TDSet *friendset, const char *alias)
Add friend dataset to this set.
virtual Long64_t Process(TSelector *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0, TObject *enl=0)
Process TDSet on currently active PROOF session.
A List of entry numbers in a TTree or TChain.
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
The TNamed class is the base class for all named ROOT classes.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Collectable string class.
const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual const char * GetName() const
Returns name of object.
The most important graphics class in the ROOT system.
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
void SetLogy(Int_t value=1) override
Set Lin/Log scale for Y.
void RedrawAxis(Option_t *option="") override
Redraw the frame axis.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
TFrame * GetFrame() override
Get frame.
TVirtualPad * GetPad(Int_t subpadnumber) const override
Get a pointer to subpadnumber of this pad.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
This class controls a Parallel ROOT Facility, PROOF, cluster.
const char * GetSessionTag() const
Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster)
Send command to be executed on the PROOF master and/or slaves.
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
void ClearData(UInt_t what=kUnregistered, const char *dsname=0)
Remove files for the data directory.
Int_t SetParallel(Int_t nodes=-1, Bool_t random=kFALSE)
Tell PROOF how many slaves to use in parallel.
static void AddEnvVar(const char *name, const char *value)
Add an variable to the list of environment variables passed to proofserv on the master and slaves.
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
void SetInputDataFile(const char *datafile)
Set the file to be used to optimally distribute the input data objects.
void SetParameter(const char *par, const char *value)
Set input list parameter.
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
virtual Long64_t DrawSelect(TDSet *dset, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Execute the specified drawing action on a data set (TDSet).
virtual Int_t Load(const char *macro, Bool_t notOnClient=kFALSE, Bool_t uniqueOnly=kTRUE, TList *wrks=0)
Load the specified macro on master, workers and, if notOnClient is kFALSE, on the client.
TList * GetOutputList()
Get list with all object created during processing (see Process()).
void ClearInputData(TObject *obj=0)
Remove obj form the input data list; if obj is null (default), clear the input data info.
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
void SetLogLevel(Int_t level, UInt_t mask=TProofDebug::kAll)
Set server logging level.
virtual Long64_t Process(TDSet *dset, 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 or Tselector object Entry- or event...
virtual Bool_t ExistsDataSet(const char *dataset)
Returns kTRUE if 'dataset' exists, kFALSE otherwise.
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
TList * GetInputList()
Get input list.
void ShowEnabledPackages(Bool_t all=kFALSE)
List which packages are enabled.
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
const char * GetOrdinal() const
const char * GetName() const
Returns name of object.
Int_t Atoi() const
Return integer value of string.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * HostName()
Return the system's host name.
virtual Int_t GetUid(const char *user=nullptr)
Returns the user's id. If user = 0, returns current user's id.
virtual const char * WorkingDirectory()
Return working directory.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual void Setenv(const char *name, const char *value)
Set environment variable.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
This class represents a WWW compatible URL.
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
Attaches to a PROOF session, possibly at the indicated URL.