39 void finalizeProof(
const char *what =
"simple",
40 const char *url =
"proof://localhost:11093",
47 Printf(
"runProof: creating the temporary directory" 48 " for the tutorial (%s) ... ", tutdir.
Data());
50 Printf(
"runProof: could not assert / create the temporary directory" 51 " for the tutorial (%s)", tutdir.
Data());
59 Printf(
"runProof: could not start/attach a PROOF session");
68 FILE *fs = fopen(proofsessions.Data(),
"r");
70 Printf(
"runProof: could not create files for sessions tags");
73 while (fgets(line,
sizeof(line), fs)) {
76 if (strncmp(line,
"session-",strlen(
"session-")))
continue;
77 if (line[l-1] ==
'\n') line[l-1] = 0;
86 if (!ql || ql->
GetSize() <= 0) {
87 Printf(
"runProof: no queries to be finalized");
95 Printf(
"runProof: root.exe not found: please check the environment!");
100 TString tutorials(
Form(
"%s/tutorials", rootsys.Data()));
108 args.ReplaceAll(
"(",
" ");
109 args.ReplaceAll(
")",
" ");
110 args.ReplaceAll(
",",
" ");
113 if (!args.Tokenize(act, from,
" ")) {
115 Printf(
"runProof: action not found: check your arguments (%s)", what);
122 if (act ==
"simple") {
124 }
else if (act ==
"h1") {
126 }
else if (act ==
"pythia8") {
130 Printf(
"runProof: unknown tutorial: %s", what);
136 while (ref.
IsNull() && nt--) {
139 Printf(
"runProof: checking session: %s", lasttag.
Data());
153 Printf(
"finalizeProof: queries completed for analysis '%s'", act.
Data());
159 char *answer = Getline(
"finalizeProof: enter the one you would like to finalize? [0] ");
161 if (answer[0] ==
'Q' || answer[0] ==
'q') {
166 sn.Remove(sn.Length()-1);
169 if (qn >= 0 && qn < qa->GetEntriesFast()) {
172 Printf(
"finalizeProof: choice must be in [0,%d] ('Q' to quit)",
180 Printf(
"finalizeProof: choice must be a number in [0,%d] ('Q' to quit) (%s)",
196 Printf(
"runProof: no queries to be finalized for analysis '%s'", act.
Data());
virtual const char * GetName() const
Returns name of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Attaches to a PROOF session, possibly at the indicated URL.
Collectable string class.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
TObject * At(Int_t idx) const
virtual Bool_t IsDone() const
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
A container class for query results.
Int_t getProof(const char *where, Int_t verbose=1)
Open a PROOF session at gUrl.
virtual TList * GetListOfQueries(Option_t *opt="")
Ask the master for the list of queries.
R__EXTERN TSystem * gSystem
Int_t GetEntriesFast() const
char * Form(const char *fmt,...)
TMacro * GetSelecImp() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Long64_t Finalize(Int_t query=-1, Bool_t force=kFALSE)
Finalize the qry-th query in fQueries.
Utility class to draw objects in the feedback list during queries.
Int_t Retrieve(Int_t query, const char *path=0)
Send retrieve request for the qry-th query in fQueries.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const