Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAlienFile.cxx
Go to the documentation of this file.
1// @(#)root/alien:$Id$
2// Author: Andreas Peters 11/09/2003
3
4/*************************************************************************
5 * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12//////////////////////////////////////////////////////////////////////////
13// //
14// TAlienFile //
15// //
16// A TAlienFile is like a normal TFile except that it reads and writes //
17// it's data via TXNetFile and gets authorization and the TXNetFile //
18// URL from an alien service. //
19// //
20// Filenames are standard URL format with protocol "alien". //
21// The following are valid TAlienFile URL's: //
22// //
23// alien:///alice/cern.ch/user/p/peters/test.root //
24// /alien/alice/cern.ch/user/p/peters/test.root //
25// //
26// - notice that URLs like /alien/alice... are converted internally //
27// to alien://alice... //
28// //
29//////////////////////////////////////////////////////////////////////////
30
31#include "TAlienFile.h"
32#include "TAlienResult.h"
33#include "TAlien.h"
34#include "TROOT.h"
35#include "TObjString.h"
36#include "TMap.h"
37#include "TObjArray.h"
38#include "TString.h"
39#include "Rtypes.h"
40#include "TSystem.h"
41#include "TStopwatch.h"
42#include "TVirtualMonitoring.h"
43#include "TVirtualMutex.h"
44#include "TProcessUUID.h"
45#include "TUrl.h"
46#include "TError.h"
47#include <cstdlib>
48
50
51#define MAX_FILE_IMAGES 16
52
53////////////////////////////////////////////////////////////////////////////////
54/// Create an Alien File Object. An AliEn File is the same as a TFile
55/// except that its real tranfer URL is resolved via an Alien service. The url
56/// argument must be of the form: alien:/[machine]/path/file.root
57/// Using the option access, another access protocol (PFN) can be
58/// specified for an LFN e.g.:
59/// "alien:///alice/test.root"
60/// If you want to write a file on specific storage element use the syntax
61/// "alien:///alice/test.root?&se=Alice::CERN::Storage"
62/// The default SE is specified by the environment variable alien_CLOSE_SE
63///
64/// If you read a file, the closest file image to alien_CLOSE_SE is taken.
65/// If the file cannot opened from the closest image, the next image is tried,
66/// until there is no image location left to be tried.
67///
68/// If the file specified in the URL does not exist, is not accessable
69/// or can not be created the kZombie bit will be set in the TAlienFile
70/// object. Use IsZombie() to see if the file is accessable.
71/// For a description of the option and other arguments see the TFile ctor.
72/// The preferred interface to this constructor is via TFile::Open().
73///
74/// Warning: TAlienFile objects should only be created through the factory functions:
75/// TFile::Open("alien://...");
76/// or
77/// TAlienFile::Open("alien://...");
78///
79/// Don't use "new TAlienFile" directly unless you know, what you are doing
80///
81
82TAlienFile::TAlienFile(const char *purl, Option_t *option,
83 const char *ftitle, Int_t compress,
84 Bool_t parallelopen, const char *lurl,
85 const char *authz) :
86 TXNetFile(purl, option, ftitle, compress, 0, parallelopen, lurl)
87{
88 TUrl logicalurl(lurl);
89 fLfn = logicalurl.GetFile();
90 fAuthz = authz;
91 fGUID = "";
92 fUrl = "";
93 fPfn = "";
94 fSE = "";
95 fImage = 0;
96 fNreplicas = 0;
97 fOpenedAt = time(0);
98}
99
100////////////////////////////////////////////////////////////////////////////////
101/// Static method used to create a TAlienFile object. For options see
102/// TAlienFile ctor.
103
104TAlienFile *TAlienFile::Open(const char *url, Option_t *option,
105 const char *ftitle, Int_t compress,
106 Bool_t parallelopen)
107{
108 if (!gGrid) {
109 ::Error("TAlienFileAccess", "No GRID connection available!");
110 return 0;
111 }
112 TUrl lUrl(url);
113
114 // Report this open phase as a temp one, since we have no object yet
116 gMonitoringWriter->SendFileOpenProgress(0, 0, "alienopen", kFALSE);
117
118 TString name(TString("alien://") + TString(lUrl.GetFile()));
119 TString fAName = name;
120 TString fAOption = option;
121 TUrl fAUrl;
122 TString sguid, pfnStr;
123 Int_t nreplicas = 0;
124 Bool_t fAWritable;
125 fAWritable = kFALSE;
126 TString authz;
127
128 // Access a URL.
129
130 TString stmp;
131 Bool_t create;
132 Bool_t recreate;
134 Bool_t read;
135
136 TUrl purl(url);
137
138 // find out the storage element and the lfn from the given url
139 TString storageelement;
140 storageelement = "";
141 TString file = purl.GetFile();
142
143 Bool_t publicaccess = kFALSE;
144 storageelement = gSystem->Getenv("alien_CLOSE_SE");
145
146 // get the options and set the storage element
147 TString urloptions = purl.GetOptions();
148 TObjArray *objOptions = urloptions.Tokenize("&");
149 for (Int_t n = 0; n < objOptions->GetEntries(); n++) {
150 TString loption = ((TObjString *) objOptions->At(n))->GetName();
151 TObjArray *objTags = loption.Tokenize("=");
152 if (objTags->GetEntries() == 2) {
153 TString key = ((TObjString *) objTags->At(0))->GetName();
154 TString value = ((TObjString *) objTags->At(1))->GetName();
155 if (!key.CompareTo("se", TString::kIgnoreCase)) {
156 storageelement = value;
157 }
158 if (!key.CompareTo("publicaccess")) {
159 if (atoi(value.Data()))
160 publicaccess = kTRUE;
161 }
162 }
163 delete objTags;
164 }
165 delete objOptions;
166
167 fAOption = option;
168 fAOption.ToUpper();
169
170 TObjString *urlStr = 0;
171 TString urlStrs;
172 TObjString *authzStr = 0;
173 TObjString *seStr = 0;
174 TString seStrs, snreplicas;
175
176 TString command;
177 TString repcommand;
178 TIterator *iter = 0;
179 TObject *object = 0;
180
181 TGridResult *result;
182 TAlienResult *alienResult;
183 TList *list;
184
185 TString stringurl;
186 TString anchor;
187 TObjArray *tokens;
188 anchor = "";
189
190 TString newurl;
191 if (fAOption == "NEW")
192 fAOption = "CREATE";
193
194 create = (fAOption == "CREATE") ? kTRUE : kFALSE;
195 recreate = (fAOption == "RECREATE") ? kTRUE : kFALSE;
196 update = (fAOption == "UPDATE") ? kTRUE : kFALSE;
197 read = (fAOption == "READ") ? kTRUE : kFALSE;
198
199 if (!create && !recreate && !update && !read) {
200 read = kTRUE;
201 fAOption = "READ";
202 }
203
204 if (create || recreate || update) {
205 fAWritable = kTRUE;
206 }
207
208 if (recreate) {
209 fAOption = "RECREATE";
210 create = kTRUE;
211 }
212 /////////////////////////////////////////////////////////////////////////////////////////
213 // first get an active Grid connection
214
215 if (!gGrid) {
216 // no TAlien existing ....
217 ::Error("TAlienFile::Open", "no active GRID connection found");
218 fAUrl = "";
219
220 // Reset the temp monitoring info
223
224 return 0;
225 } else {
226 if ((strcmp(gGrid->GetGrid(), "alien"))) {
227 ::Error("TAlienFile::Open", "you don't have an active <alien> grid!");
228 fAUrl = "";
229
230 // Reset the temp monitoring info
233
234 return 0;
235 }
236 }
237
238 /////////////////////////////////////////////////////////////////////////////////////////
239 // get the authorization from the catalogue
240
241 if (read) {
242 // get the read access
243 if (publicaccess)
244 command = TString("access -p read ");
245 else
246 command = TString("access read ");
247 }
248
249 if (create) {
250 command = TString("access write-once ");
251 }
252
253 if (recreate) {
254 command = TString("access write-version ");
255 }
256
257 if (update) {
258 command = TString("access write-version ");
259 }
260
261 command += file;
262
263 if (fAWritable) {
264 // append the storage element environment variable
265 command += " ";
266 command += storageelement;
267 }
268
269 TString fALfn = file;
270
271 int imagenr = 0;
272
273 do {
274 imagenr++;
275 repcommand = command;
276 if (!fAWritable) {
277 // in the read case, try all image locations
278 if (storageelement != "") {
279 repcommand += " ";
280 repcommand += storageelement;
281 } else {
282 repcommand += " ";
283 repcommand += "unknown";
284 }
285 repcommand += " 0 ";
286 repcommand += imagenr;
287 }
288
289 if (gSystem->Getenv("ALIEN_SITE")) {
290 repcommand += " 0 ";
291 repcommand += gSystem->Getenv("ALIEN_SITE");
292 }
293 result = gGrid->Command(repcommand.Data(), kFALSE, TAlien::kOUTPUT);
294 alienResult = dynamic_cast < TAlienResult * >(result);
295 list = dynamic_cast < TList * >(alienResult);
296 if (!list) {
297
298 if (seStr)
299 ::Error("TAlienFile::Open",
300 "cannot get the access envelope for %s and image %u in SE <%s>",
301 purl.GetUrl(), imagenr, seStr->GetName());
302 else
303 ::Error("TAlienFile::Open",
304 "cannot get the access envelope for %s and image %u",
305 purl.GetUrl(), imagenr);
306 fAUrl = "";
307 if (result) {
308 delete result;
309 }
310
311 // Reset the temp monitoring info
314
315 return 0;
316 }
317
318 iter = list->MakeIterator();
319 object = 0;
320
321 Bool_t imageeof = kFALSE;
322
323 while ((object = iter->Next()) != 0) {
324 TMap *map = dynamic_cast < TMap * >(object);
325
326 TObject *urlObject = map->GetValue("url");
327 urlStr = dynamic_cast < TObjString * >(urlObject);
328 if (urlStr) urlStrs = urlStr->GetName();
329
330 TObject *authzObject = map->GetValue("envelope");
331 authzStr = dynamic_cast < TObjString * >(authzObject);
332
333 TObject *seObject = map->GetValue("se");
334 seStr = dynamic_cast < TObjString * >(seObject);
335 if (seStr) seStrs = seStr->GetName();
336
337 TObject *nreplicasObject = map->GetValue("nSEs");
338 if (nreplicasObject) {
339 snreplicas = nreplicasObject->GetName();
340 nreplicas = snreplicas.Atoi();
341 }
342
343 TObject *guidObject = map->GetValue("guid");
344 if (guidObject) sguid = guidObject->GetName();
345
346 TObject *pfnObject = map->GetValue("pfn");
347 if (pfnObject) pfnStr = pfnObject->GetName();
348
349 if (map->GetValue("eof")) {
350 imageeof = kTRUE;
351 // there is only one result line .... in case it is at all ....
352 }
353 break;
354 }
355
356 if ((!urlStr) || (!authzStr)) {
357 if (fAWritable) {
358 ::Error("TAlienFile::Open",
359 "didn't get the authorization to write %s",
360 purl.GetUrl());
361 } else {
362 if (!imageeof) {
363 ::Error("TAlienFile::Open",
364 "didn't get the authorization to read %s from location %u",
365 purl.GetUrl(), imagenr);
366 }
367 }
368 if (!imageeof) {
369 ::Info("TAlienFile::Open",
370 "Command::Stdout !!!");
371 gGrid->Stdout();
372 ::Info("TAlienFile::Open",
373 "Command::Stderr !!!");
374 gGrid->Stderr();
375 ::Info("TAlienFile::Open",
376 "End of Output !!!");
377 }
378 delete iter;
379 delete result;
380 fAUrl = "";
381 if (!imageeof) {
382 continue;
383 } else {
384 // if the service signals eof, it makes no sense to check more replicas
385 ::Error("TAlienFile::Open",
386 "No more images to try - giving up");
387
388 // Reset the temp monitoring info
391
392 return 0;
393 }
394 }
395
396 delete iter;
397
398 authz = authzStr->GetName();
399 stringurl = urlStr->GetName();
400
401 tokens = stringurl.Tokenize("#");
402
403 if (tokens->GetEntries() == 2) {
404 anchor = ((TObjString *) tokens->At(1))->GetName();
405 urlStr->SetString(((TObjString *) tokens->At(0))->GetName());
406 }
407
408 delete tokens;
409
410 newurl = urlStr->GetName();
411 stmp = purl.GetAnchor();
412 newurl += TString("?&authz=");
413 newurl += authzStr->GetName();
414
415 if (!fAWritable) {
416 if (seStr)
417 ::Info("TAlienFile::Open", "Accessing image %u of %s in SE <%s>",
418 imagenr, purl.GetUrl(), seStr->GetName());
419 else
420 ::Info("TAlienFile::Open", "Accessing image %u of %s", imagenr, purl.GetUrl());
421 }
422 // the treatement of ZIP files is done in the following way:
423 // LFNs in AliEn pointing to files in ZIP archives don't contain the .zip suffix in the file name
424 // to tell TArchiveFile about the ZIP nature, we add to the URL options 'zip=<member>'
425 // This options are not visible in the file name, they are passed through TXNetFile to TNetFile to TArchiveFile
426
427 if (stmp != "") {
428 newurl += "#";
429 newurl += purl.GetAnchor();
430 TString lUrlfile = lUrl.GetFile();
431 TString lUrloption;
432 lUrloption = "zip=";
433 lUrloption += purl.GetAnchor();
434 lUrloption += "&mkpath=1";
435 lUrl.SetFile(lUrlfile);
436 lUrl.SetOptions(lUrloption);
437 } else {
438 if (anchor.Length()) {
439 newurl += "#";
440 newurl += anchor;
441 TString lUrlfile = lUrl.GetFile();
442 TString lUrloption;
443 lUrloption = "zip=";
444 lUrloption += anchor;
445 lUrloption += "&mkpath=1";
446 lUrl.SetFile(lUrlfile);
447 // lUrl.SetAnchor(anchor);
448 lUrl.SetOptions(lUrloption);
449 } else {
450 TString loption;
451 loption = lUrl.GetOptions();
452 if (loption.Length()) {
453 loption += "&mkpath=1";
454 lUrl.SetOptions(loption.Data());
455 } else {
456 lUrl.SetOptions("mkpath=1");
457 }
458 }
459 }
460
461 fAUrl = TUrl(newurl);
462
463 // append the original options
464 TString oldopt;
465 TString newopt;
466
467 if (TString(fAUrl.GetUrl()) == "") {
468 // error in file opening occured
469
470 // Reset the temp monitoring info
473
474 return 0;
475 }
476
477 TUrl nUrl = fAUrl;
478 TUrl oUrl(url);
479
480 oldopt = oUrl.GetOptions();
481 newopt = nUrl.GetOptions();
482
483 // add the original options from the alien URL
484 if (oldopt.Length()) {
485 nUrl.SetOptions(newopt + TString("&") + oldopt);
486 } else {
487 nUrl.SetOptions(newopt);
488 }
489
490 fAUrl = nUrl;
491 delete result;
492 if (gDebug > 1)
493 ::Info("TAlienFile","Opening AUrl <%s> lUrl <%s>",fAUrl.GetUrl(),lUrl.GetUrl());
494 TStopwatch timer;
495 timer.Start();
496 TAlienFile *alienfile =
497 new TAlienFile(fAUrl.GetUrl(), fAOption, ftitle, compress,
498 parallelopen, lUrl.GetUrl(), authz);
499 timer.Stop();
500 if (alienfile->IsZombie()) {
501 delete alienfile;
502 if (fAWritable) {
503 // for the moment we support only 1 try during writing - no alternative locations
504 break;
505 }
506 continue;
507 } else {
508 alienfile->SetSE(seStrs);
509 alienfile->SetPfn(pfnStr);
510 alienfile->SetImage(imagenr);
511 alienfile->SetNreplicas(nreplicas);
512 alienfile->SetGUID(sguid);
513 alienfile->SetUrl(urlStrs);
514 alienfile->SetElapsed(timer.RealTime());
515 return alienfile;
516 }
517 } while (imagenr < MAX_FILE_IMAGES);
518
519 if (!fAWritable) {
520 ::Error("TAlienFile::Open",
521 "Couldn't open any of the file images of %s", lUrl.GetUrl());
522 }
523
524 // Reset the temp monitoring info
527
528 return 0;
529}
530
531////////////////////////////////////////////////////////////////////////////////
532/// TAlienFile file dtor.
533
535{
536 if (IsOpen()) {
537 Close();
538 }
539 if (gDebug)
540 Info("~TAlienFile", "dtor called for %s", GetName());
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Close the file.
545
547{
548 if (!IsOpen()) return;
549
550
551 // Close file
552 TXNetFile::Close(option);
553
554 if (fOption == "READ")
555 return;
556
557 // set GCLIENT_EXTRA_ARG environment
558 gSystem->Setenv("GCLIENT_EXTRA_ARG", fAuthz.Data());
559
560 // commit the envelope
561 TString command("commit ");
562
563 Long64_t siz = GetSize();
564 if (siz <= 0)
565 Error("Close", "the reported size of the written file is <= 0");
566
567 command += siz;
568 command += " ";
569 command += fLfn;
570
571 TGridResult *result = gGrid->Command(command, kFALSE, TAlien::kOUTPUT);
572 TAlienResult *alienResult = dynamic_cast < TAlienResult * >(result);
573 TList *list = dynamic_cast < TList * >(alienResult);
574 if (!list) {
575 if (result) {
576 delete result;
577 result = nullptr;
578 }
579 Error("Close", "cannot commit envelope for %s", fLfn.Data());
581 }
582 TIterator *iter = list->MakeIterator();
583 TObject *object = 0;
584 if (fWritable) {
585 while ((object = iter->Next()) != 0) {
586 TMap *map = dynamic_cast < TMap * >(object);
587 TObject *commitObject = map->GetValue(fLfn.Data());
588 if (commitObject) {
589 TObjString *commitStr =
590 dynamic_cast < TObjString * >(commitObject);
591 if (!(strcmp(commitStr->GetName(), "1"))) {
592 // the file has been committed
593 break;
594 }
595 }
596
597 Error("Close", "cannot register %s!", fLfn.Data());
599 // there is only one result line .... in case it is at all ....
600 break;
601 }
602 }
603 delete iter;
604 delete result;
605
606 gSystem->Unsetenv("GCLIENT_EXTRA_ARG");
607
608}
609
610////////////////////////////////////////////////////////////////////////////////
611/// Get surl from lfn by asking AliEn catalog.
612
613TString TAlienFile::SUrl(const char *lfn)
614{
615 TString command;
616 TString surl;
617
618 if (!lfn) {
619 return surl;
620 }
621
622 TUrl lurl(lfn);
623 command = "access -p read ";
624 command += lurl.GetFile();
625
626 TGridResult* result;
627
628 if (!gGrid) {
629 ::Error("TAlienFile::SUrl","no grid connection");
630 return surl;
631 }
632
633 result = gGrid->Command(command.Data(), kFALSE, TAlien::kOUTPUT);
634 if (!result) {
635 ::Error("TAlienFile::SUrl","couldn't get access URL for alien file %s", lfn);
636 return surl;
637 }
638
639 TIterator *iter = result->MakeIterator();
640 TObject *object=0;
641 TObjString *urlStr=0;
642
643 object = iter->Next();
644 if (object) {
645 TMap *map = dynamic_cast < TMap * >(object);
646 TObject *urlObject = map->GetValue("url");
647 urlStr = dynamic_cast < TObjString * >(urlObject);
648
649 if (urlStr) {
650 surl = urlStr->GetName();
651 delete object;
652 return surl;
653 }
654 }
655
656 ::Error("TAlienFile::SUrl","couldn't get surl for alien file %s", lfn);
657 return surl;
658}
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
const Bool_t kFALSE
Definition RtypesCore.h:101
long long Long64_t
Definition RtypesCore.h:80
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
#define MAX_FILE_IMAGES
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition TError.cxx:220
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:187
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGrid * gGrid
Definition TGrid.h:128
Int_t gDebug
Definition TROOT.cxx:592
R__EXTERN TSystem * gSystem
Definition TSystem.h:559
R__EXTERN TVirtualMonitoringWriter * gMonitoringWriter
TString fSE
Definition TAlienFile.h:47
TString fLfn
Definition TAlienFile.h:42
void SetElapsed(Double_t real)
Definition TAlienFile.h:74
TString fPfn
Definition TAlienFile.h:46
Int_t fNreplicas
Definition TAlienFile.h:49
static TString SUrl(const char *lfn)
Get surl from lfn by asking AliEn catalog.
void SetUrl(const char *url)
Definition TAlienFile.h:79
void SetPfn(const char *pfn)
Definition TAlienFile.h:77
TString fUrl
Definition TAlienFile.h:45
virtual ~TAlienFile()
TAlienFile file dtor.
TString fGUID
Definition TAlienFile.h:44
static TAlienFile * Open(const char *lfn, const Option_t *option="", const char *title="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Bool_t parallelopen=kFALSE)
Static method used to create a TAlienFile object.
TString fAuthz
Definition TAlienFile.h:43
Long64_t fOpenedAt
Definition TAlienFile.h:50
void SetSE(const char *se)
Definition TAlienFile.h:78
Int_t fImage
Definition TAlienFile.h:48
void SetGUID(const char *guid)
Definition TAlienFile.h:73
virtual void Close(const Option_t *opt="")
Close the file.
void SetNreplicas(Int_t nrep)
Definition TAlienFile.h:76
void SetImage(Int_t image)
Definition TAlienFile.h:75
@ kOUTPUT
Definition TAlien.h:37
Bool_t fWritable
True if directory is writable.
virtual Long64_t GetSize() const
Returns the current file size.
Definition TFile.cxx:1285
TString fOption
File options.
Definition TFile.h:92
const char * GetGrid() const
Definition TGrid.h:60
virtual void Stderr()
Definition TGrid.h:70
virtual TGridResult * Command(const char *, Bool_t=kFALSE, UInt_t=2)
Definition TGrid.h:72
virtual void Stdout()
Definition TGrid.h:69
Iterator abstract base class.
Definition TIterator.h:30
virtual TObject * Next()=0
A doubly linked list.
Definition TList.h:38
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
Definition TList.cxx:722
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition TMap.h:40
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
Definition TMap.cxx:236
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
An array of TObjects.
Definition TObjArray.h:31
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const
Definition TObjArray.h:164
Collectable string class.
Definition TObjString.h:28
const char * GetName() const
Returns name of object.
Definition TObjString.h:38
void SetString(const char *s)
Definition TObjString.h:45
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:429
R__ALWAYS_INLINE Bool_t IsZombie() const
Definition TObject.h:153
Stopwatch class.
Definition TStopwatch.h:28
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Stop()
Stop the stopwatch.
Basic string class.
Definition TString.h:136
Ssiz_t Length() const
Definition TString.h:410
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Definition TString.cxx:442
Int_t Atoi() const
Return integer value of string.
Definition TString.cxx:1946
const char * Data() const
Definition TString.h:369
@ kIgnoreCase
Definition TString.h:268
void ToUpper()
Change string to upper case.
Definition TString.cxx:1163
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2222
virtual const char * Getenv(const char *env)
Get environment variable.
Definition TSystem.cxx:1663
virtual void Unsetenv(const char *name)
Unset environment variable.
Definition TSystem.cxx:1655
virtual void Setenv(const char *name, const char *value)
Set environment variable.
Definition TSystem.cxx:1647
virtual int Unlink(const char *name)
Unlink, i.e.
Definition TSystem.cxx:1381
This class represents a WWW compatible URL.
Definition TUrl.h:33
const char * GetAnchor() const
Definition TUrl.h:70
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
Definition TUrl.cxx:389
const char * GetFile() const
Definition TUrl.h:69
void SetOptions(const char *opt)
Definition TUrl.h:87
const char * GetOptions() const
Definition TUrl.h:71
void SetFile(const char *file)
Definition TUrl.h:85
virtual Bool_t SendFileOpenProgress(TFile *, TList *, const char *, Bool_t=kFALSE)
virtual void Close(const Option_t *opt="")
Close the file (see TNetFile::Close() or TFile::Close() for more details).
virtual Bool_t IsOpen() const
Return kTRUE if the file is open, kFALSE otherwise.
const Int_t n
Definition legend1.C:16
Definition file.py:1