Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFileInfo.cxx
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Andreas-Joachim Peters 20/9/2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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/** \class TFileInfo
13\ingroup Base
14
15Class describing a generic file including meta information.
16*/
17
18#include "TFileInfo.h"
19#include "TRegexp.h"
20#include "TSystem.h"
21#include "TClass.h"
22#include "TUrl.h"
23#include "TUUID.h"
24#include "TMD5.h"
25
26
27////////////////////////////////////////////////////////////////////////////////
28/// Constructor.
29
30TFileInfo::TFileInfo(const char *in, Long64_t size, const char *uuid,
31 const char *md5, TObject *meta)
32 : fCurrentUrl(nullptr), fUrlList(nullptr), fSize(-1), fUUID(nullptr), fMD5(nullptr),
33 fMetaDataList(nullptr), fIndex(-1)
34{
35 // Get initializations form the input string: this will set at least the
36 // current URL; but it may set more: see TFileInfo::ParseInput(). Please note
37 // that MD5 sum should be provided as a string in md5ascii form.
39
40 // Now also honour the input arguments: the size
41 if (size > -1) fSize = size;
42 // The UUID
43 if (uuid) {
45 fUUID = new TUUID(uuid);
46 } else if (!fUUID) {
47 fUUID = new TUUID;
48 }
49 // The MD5
50 if (md5) {
52 fMD5 = new TMD5();
53 fMD5->SetDigest(md5); // sets digest from md5ascii representation
54 }
55 // The meta information
56 if (meta) {
57 RemoveMetaData(meta->GetName());
59 }
60
61 // Now set the name from the UUID
63 SetTitle("TFileInfo");
64
65 // By default we ignore the index
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Copy constructor.
71
72TFileInfo::TFileInfo(const TFileInfo &fi) : TNamed(fi.GetName(), fi.GetTitle()),
73 fCurrentUrl(nullptr), fUrlList(nullptr),
74 fSize(fi.fSize), fUUID(nullptr), fMD5(nullptr),
75 fMetaDataList(nullptr), fIndex(fi.fIndex)
76{
77 if (fi.fUrlList) {
78 fUrlList = new TList;
80 TIter nxu(fi.fUrlList);
81 TUrl *u = nullptr;
82 while ((u = (TUrl *)nxu())) {
83 fUrlList->Add(new TUrl(u->GetUrl(), kTRUE));
84 }
85 ResetUrl();
86 }
87 fSize = fi.fSize;
88
89 if (fi.fUUID)
90 fUUID = new TUUID(fi.fUUID->AsString());
91
92 if (fi.fMD5)
93 fMD5 = new TMD5(*(fi.fMD5));
94
95 // Staged and corrupted bits
100
101 if (fi.fMetaDataList) {
102 fMetaDataList = new TList;
104 TIter nxm(fi.fMetaDataList);
105 TFileInfoMeta *fim = nullptr;
106 while ((fim = (TFileInfoMeta *)nxm())) {
108 }
109 }
110
111 // By default we ignore the index
113}
114
115////////////////////////////////////////////////////////////////////////////////
116/// Destructor.
117
125
126////////////////////////////////////////////////////////////////////////////////
127/// Parse the input line to extract init information from 'in'; the input
128/// string is tokenized on ' '; the tokens can be prefixed by the following
129/// keys:
130///
131/// - `url:<url1>,<url2>,...` URLs for the file; stored in the order given
132/// - `sz:<size>` size of the file in bytes
133/// - `md5:<md5_ascii>` MD5 sum of the file in ASCII form
134/// - `uuid:<uuid>` UUID of the file
135///
136/// - `tree:<name>,<entries>,<first>,<last>`
137/// meta-information about a tree in the file; the
138/// should be in the form "<subdir>/tree-name";'entries' is
139/// the number of entries in the tree; 'first' and 'last'
140/// define the entry range.
141///
142/// - `obj:<name>,<class>,<entries>`
143/// meta-information about a generic object in the file;
144/// the should be in the form "<subdir>/obj-name"; 'class'
145/// is the object class; 'entries' is the number of occurrences
146/// for this object.
147///
148/// - `idx:<index>` Index of this file if sorting with index
149///
150/// Multiple occurrences of 'tree:' or 'obj:' can be specified.
151/// The initializations done via the input string are super-seeded by the ones by other
152/// parameters in the constructor, if any.
153/// If no key is given, the token is interpreted as URL(s).
154
155void TFileInfo::ParseInput(const char *in)
156{
157 // Nothing to do if the string is empty
158 if (!in || strlen(in) <= 0) return;
159
160 TString sin(in), t;
161 Int_t f1 = 0;
162 while (sin.Tokenize(t, f1, " ")) {
163 if (t.BeginsWith("sz:")) {
164 // The size
165 t.Replace(0, 3, "");
166 if (t.IsDigit()) sscanf(t.Data(), "%lld", &fSize);
167 } else if (t.BeginsWith("md5:")) {
168 // The MD5
169 t.Replace(0, 4, "");
170 if (t.Length() >= 32) {
171 fMD5 = new TMD5;
172 if (fMD5->SetDigest(t) != 0)
174 }
175 } else if (t.BeginsWith("uuid:")) {
176 // The UUID
177 t.Replace(0, 5, "");
178 if (t.Length() > 0) fUUID = new TUUID(t);
179 } else if (t.BeginsWith("tree:")) {
180 // A tree
181 t.Replace(0, 5, "");
182 TString nm, se, sf, sl;
183 Long64_t ent = -1, fst= -1, lst = -1;
184 Int_t f2 = 0;
185 if (t.Tokenize(nm, f2, ","))
186 if (t.Tokenize(se, f2, ","))
187 if (t.Tokenize(sf, f2, ","))
188 t.Tokenize(sl, f2, ",");
189 if (!(nm.IsNull())) {
190 if (se.IsDigit()) sscanf(se.Data(), "%lld", &ent);
191 if (sf.IsDigit()) sscanf(sf.Data(), "%lld", &fst);
192 if (sl.IsDigit()) sscanf(sl.Data(), "%lld", &lst);
193 TFileInfoMeta *meta = new TFileInfoMeta(nm, "TTree", ent, fst, lst);
194 RemoveMetaData(meta->GetName());
196 }
197 } else if (t.BeginsWith("obj:")) {
198 // A generic object
199 t.Replace(0, 4, "");
200 TString nm, cl, se;
201 Long64_t ent = -1;
202 Int_t f2 = 0;
203 if (t.Tokenize(nm, f2, ","))
204 if (t.Tokenize(cl, f2, ","))
205 t.Tokenize(se, f2, ",");
206 if (cl.IsNull()) cl = "TObject";
207 if (!(nm.IsNull())) {
208 if (se.IsDigit()) sscanf(se.Data(), "%lld", &ent);
209 TFileInfoMeta *meta = new TFileInfoMeta(nm, cl, ent);
211 }
212 } else if (t.BeginsWith("idx:")) {
213 // The size
214 t.Replace(0, 4, "");
215 if (t.IsDigit()) sscanf(t.Data(), "%d", &fIndex);
216 } else {
217 // A (set of) URL(s)
218 if (t.BeginsWith("url:")) t.Replace(0, 4, "");
219 TString u;
220 Int_t f2 = 0;
221 while (t.Tokenize(u, f2, ",")) {
222 if (!(u.IsNull())) AddUrl(u);
223 }
224 }
225 }
226}
227
228////////////////////////////////////////////////////////////////////////////////
229/// Set the UUID to the value associated to the string 'uuid'. This is
230/// useful to set the UUID to the one of the ROOT file during verification.
231///
232/// NB: we do not change the name in here, because this would screw up lists
233/// of these objects hashed on the name. Those lists need to be rebuild.
234/// TFileCollection does that in RemoveDuplicates.
235
236void TFileInfo::SetUUID(const char *uuid)
237{
238 if (uuid) {
239 if (fUUID) delete fUUID;
240 fUUID = new TUUID(uuid);
241 }
242}
243
244////////////////////////////////////////////////////////////////////////////////
245/// Return the current url.
246
248{
249 if (!fCurrentUrl)
250 const_cast<TFileInfo*>(this)->ResetUrl();
251 return fCurrentUrl;
252}
253
254////////////////////////////////////////////////////////////////////////////////
255/// Iterator function, start iteration by calling ResetUrl().
256/// The first call to NextUrl() will return the 1st element,
257/// the seconde the 2nd element etc. Returns 0 in case no more urls.
258
260{
261 if (!fUrlList)
262 return nullptr;
263
265
266 if (fCurrentUrl)
268
269 return returl;
270}
271
272////////////////////////////////////////////////////////////////////////////////
273/// Find an element from a URL. Returns 0 if not found.
274
276{
279
280 TRegexp rg(url);
281 while ((urlelement = (TUrl*) nextUrl())) {
282 if (TString(urlelement->GetUrl(withDeflt)).Index(rg) != kNPOS) {
283 return urlelement;
284 }
285 }
286 return nullptr;
287}
288
289////////////////////////////////////////////////////////////////////////////////
290/// Add a new URL. If 'infront' is TRUE the new url is pushed at the beginning
291/// of the list; otherwise is pushed back.
292/// Returns kTRUE if successful, kFALSE otherwise.
293
295{
296 if (FindByUrl(url))
297 return kFALSE;
298
299 if (!fUrlList) {
300 fUrlList = new TList;
302 }
303
304 TUrl *newurl = new TUrl(url, kTRUE);
305 // We set the current Url to the first url added
306 if (fUrlList->GetSize() == 0)
308
309 if (infront)
311 else
313 return kTRUE;
314}
315
316////////////////////////////////////////////////////////////////////////////////
317/// Remove an URL. Returns kTRUE if successful, kFALSE otherwise.
318
320{
321 TUrl *lurl;
322 if ((lurl = FindByUrl(url))) {
324 if (lurl == fCurrentUrl)
325 ResetUrl();
326 delete lurl;
327 return kTRUE;
328 }
329 return kFALSE;
330}
331
332////////////////////////////////////////////////////////////////////////////////
333/// Remove URL at given position. Returns kTRUE on success, kFALSE on error.
334
336{
337 TUrl *tUrl;
338 if ((tUrl = dynamic_cast<TUrl *>(fUrlList->At(i))) != nullptr) {
340 if (tUrl == fCurrentUrl)
341 ResetUrl();
342 delete tUrl;
343 return kTRUE;
344 }
345
346 return kFALSE;
347}
348
349////////////////////////////////////////////////////////////////////////////////
350/// Set 'url' as current URL, if in the list
351/// Return kFALSE if not in the list
352
354{
355 TUrl *lurl;
356 if ((lurl = FindByUrl(url))) {
358 return kTRUE;
359 }
360 return kFALSE;
361}
362
363////////////////////////////////////////////////////////////////////////////////
364/// Set 'url' as current URL, if in the list
365/// Return kFALSE if not in the list
366
368{
369 if (url && fUrlList && fUrlList->FindObject(url)) {
371 return kTRUE;
372 }
373 return kFALSE;
374}
375
376////////////////////////////////////////////////////////////////////////////////
377/// Add's a meta data object to the file info object. The object will be
378/// adopted by the TFileInfo and should not be deleted by the user.
379/// Typically objects of class TFileInfoMeta or derivatives should be added,
380/// but any class is accepted.
381/// Returns kTRUE if successful, kFALSE otherwise.
382
384{
385 if (meta) {
386 if (!fMetaDataList) {
387 fMetaDataList = new TList;
389 }
391 return kTRUE;
392 }
393 return kFALSE;
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Remove the metadata object. If meta is 0 remove all meta data objects.
398/// Returns kTRUE if successful, kFALSE otherwise.
399
401{
402 if (fMetaDataList) {
403 if (!meta || strlen(meta) <= 0) {
405 return kTRUE;
406 } else {
408 if (o) {
410 delete o;
411 return kTRUE;
412 }
413 }
414 }
415 return kFALSE;
416}
417
418////////////////////////////////////////////////////////////////////////////////
419/// Get meta data object with specified name. If meta is 0
420/// get first meta data object. Returns 0 in case no
421/// suitable meta data object is found.
422
424{
425 if (fMetaDataList) {
427 if (!meta || strlen(meta) <= 0)
429 else
431 if (m) {
432 TClass *c = m->IsA();
433 return (c && c->InheritsFrom(TFileInfoMeta::Class())) ? m : nullptr;
434 }
435 }
436 return nullptr;
437}
438
439////////////////////////////////////////////////////////////////////////////////
440/// Compare TFileInfo object by their first urls.
441
443{
444 Int_t rc = 0;
446 const TFileInfo *fi = dynamic_cast<const TFileInfo *>(obj);
447 if (!fi) {
448 rc = -1;
449 } else {
451 rc = -1;
452 } else if (fIndex > fi->fIndex) {
453 rc = 1;
454 }
455 }
456 } else {
457 if (this == obj) {
458 rc = 0;
459 } else if (TFileInfo::Class() != obj->IsA()) {
460 rc = -1;
461 } else {
462 rc = (GetFirstUrl()->Compare(((TFileInfo*)obj)->GetFirstUrl()));
463 }
464 }
465 // Done
466 return rc;
467}
468
469////////////////////////////////////////////////////////////////////////////////
470/// Print information about this object. If option contains 'L' a long listing
471/// will be printed (on multiple lines). Otherwise one line is printed with the
472/// following information: current url, default tree name|class|entries, md5;
473/// the default tree name is passed via the option ("T:<default_tree>") by the
474/// owning TFileCollection.
475
477{
478 if (GetMD5()) GetMD5()->Final();
479 TString opt(option);
480 if (opt.Contains("L", TString::kIgnoreCase)) {
481
482 Printf("UUID: %s\nMD5: %s\nSize: %lld\nIndex: %d",
483 GetUUID() ? GetUUID()->AsString() : "undef",
484 GetMD5() ? GetMD5()->AsString() : "undef",
485 GetSize(), GetIndex());
486
487 TIter next(fUrlList);
488 TUrl *u;
489 Printf(" === URLs ===");
490 while ((u = (TUrl*)next()))
491 Printf(" URL: %s", u->GetUrl());
492
494 TObject *m = nullptr; // can be any TObject not only TFileInfoMeta
495 while ((m = (TObject*) nextm())) {
496 Printf(" === Meta Data Object ===");
497 m->Print();
498 }
499 } else {
500 TString out("current-url-undef -|-|- md5-undef");
501 if (GetCurrentUrl()) out.ReplaceAll("current-url-undef", GetCurrentUrl()->GetUrl());
502 // Extract the default tree name, if any
504 if (opt.Contains("T:")) deft = opt(opt.Index("T:")+2, opt.Length());
505 TFileInfoMeta *meta = nullptr;
508 if (meta) out.ReplaceAll("-|-|-", TString::Format("%s|%s|%lld", meta->GetName(),
509 meta->GetTitle(), meta->GetEntries()));
510 if (GetMD5())
511 out.ReplaceAll("md5-undef", TString::Format("%s", GetMD5()->AsString()));
512 Printf("%s", out.Data());
513 }
514}
515
516
517////////////////////////////////////////////////////////////////////////////////
518/// Create file meta data object.
519
521 Long64_t entries, Long64_t first, Long64_t last,
523 : TNamed(objPath, objClass), fEntries(entries), fFirst(first),
524 fLast(last), fTotBytes(totbytes), fZipBytes(zipbytes)
525{
526 TString p = objPath;
527 if (!p.BeginsWith("/")) {
528 p.Prepend("/");
529 SetName(p);
530 }
531
533 fIsTree = (c && c->InheritsFrom("TTree")) ? kTRUE : kFALSE;
535}
536
537////////////////////////////////////////////////////////////////////////////////
538/// Create file meta data object.
539
541 const char *objClass, Long64_t entries,
542 Long64_t first, Long64_t last,
544 : TNamed(objPath, objClass), fEntries(entries), fFirst(first),
545 fLast(last), fTotBytes(totbytes), fZipBytes(zipbytes)
546{
548 if (!sdir.BeginsWith("/"))
549 sdir.Prepend("/");
550 if (!sdir.EndsWith("/"))
551 sdir += "/";
552 sdir += objPath;
553 SetName(sdir);
554
556 fIsTree = (c && c->InheritsFrom("TTree")) ? kTRUE : kFALSE;
558}
559
560////////////////////////////////////////////////////////////////////////////////
561/// Copy constructor
562
564 : TNamed(m.GetName(), m.GetTitle())
565{
566 fEntries = m.fEntries;
567 fFirst = m.fFirst;
568 fLast = m.fLast;
569 fIsTree = m.fIsTree;
570 fTotBytes = m.fTotBytes;
571 fZipBytes = m.fZipBytes;
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Get the object's directory in the ROOT file.
578
580{
581 return gSystem->DirName(GetName());
582}
583
584////////////////////////////////////////////////////////////////////////////////
585/// Get the object name, with path stripped off. For full path
586/// use GetName().
587
588const char *TFileInfoMeta::GetObject() const
589{
590 return gSystem->BaseName(GetName());
591}
592
593////////////////////////////////////////////////////////////////////////////////
594/// Print information about this object.
595
596void TFileInfoMeta::Print(Option_t * /* option */) const
597{
598 Printf(" Name: %s\n Class: %s\n Entries: %lld\n"
599 " First: %lld\n Last: %lld",
601}
dim_t fSize
#define SafeDelete(p)
Definition RConfig.hxx:533
#define c(i)
Definition RSha256.hxx:101
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
Definition RtypesCore.h:131
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2509
R__EXTERN TSystem * gSystem
Definition TSystem.h:572
T1 fFirst
Definition X11Events.mm:86
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2973
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.
const char * GetDirectory() const
Get the object's directory in the ROOT file.
Bool_t fIsTree
Definition TFileInfo.h:114
Long64_t fZipBytes
Definition TFileInfo.h:116
Long64_t fFirst
Definition TFileInfo.h:112
Long64_t fTotBytes
Definition TFileInfo.h:115
Long64_t fLast
Definition TFileInfo.h:113
static TClass * Class()
const char * GetObject() const
Get the object name, with path stripped off.
Long64_t fEntries
Definition TFileInfo.h:111
void Print(Option_t *options="") const override
Print information about this object.
Class describing a generic file including meta information.
Definition TFileInfo.h:39
virtual ~TFileInfo()
Destructor.
TList * fUrlList
current URL to access the file, points to URL
Definition TFileInfo.h:44
Int_t GetIndex() const
Definition TFileInfo.h:99
TUrl * fCurrentUrl
Definition TFileInfo.h:42
TUUID * fUUID
Definition TFileInfo.h:46
@ kSortWithIndex
Definition TFileInfo.h:60
TUrl * NextUrl()
Iterator function, start iteration by calling ResetUrl().
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
Bool_t RemoveUrlAt(Int_t i)
Remove URL at given position. Returns kTRUE on success, kFALSE on error.
Bool_t AddMetaData(TObject *meta)
Add's a meta data object to the file info object.
Bool_t RemoveUrl(const char *url)
Remove an URL. Returns kTRUE if successful, kFALSE otherwise.
Int_t fIndex
Definition TFileInfo.h:50
static TClass * Class()
TUrl * GetFirstUrl() const
Definition TFileInfo.h:72
TFileInfoMeta * GetMetaData(const char *meta=nullptr) const
Get meta data object with specified name.
Long64_t GetSize() const
Definition TFileInfo.h:80
TUUID * GetUUID() const
Definition TFileInfo.h:81
Bool_t RemoveMetaData(const char *meta=nullptr)
Remove the metadata object.
Long64_t fSize
Definition TFileInfo.h:45
Int_t Compare(const TObject *obj) const override
Compare TFileInfo object by their first urls.
TMD5 * GetMD5() const
Definition TFileInfo.h:82
Bool_t SetCurrentUrl(const char *url)
Set 'url' as current URL, if in the list Return kFALSE if not in the list.
TUrl * FindByUrl(const char *url, Bool_t withDeflt=kFALSE)
Find an element from a URL. Returns 0 if not found.
void ResetUrl()
Definition TFileInfo.h:69
TUrl * GetCurrentUrl() const
Return the current url.
void SetUUID(const char *uuid)
Set the UUID to the value associated to the string 'uuid'.
TList * fMetaDataList
Definition TFileInfo.h:48
TFileInfo(const char *url=nullptr, Long64_t size=-1, const char *uuid=nullptr, const char *md5=nullptr, TObject *meta=nullptr)
Constructor.
Definition TFileInfo.cxx:30
TMD5 * fMD5
Definition TFileInfo.h:47
void ParseInput(const char *in)
Parse the input line to extract init information from 'in'; the input string is tokenized on ' '; the...
void Print(Option_t *options="") const override
Print information about this object.
A doubly linked list.
Definition TList.h:38
TObject * After(const TObject *obj) const override
Returns the object after object obj.
Definition TList.cxx:327
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
Definition TList.cxx:575
void Add(TObject *obj) override
Definition TList.h:81
TObject * Remove(TObject *obj) override
Remove object from the list.
Definition TList.cxx:819
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Definition TList.cxx:656
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Definition TList.cxx:354
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
Definition TList.cxx:97
This code implements the MD5 message-digest algorithm.
Definition TMD5.h:44
const char * AsString() const
Return message digest as string.
Definition TMD5.cxx:219
void Final()
MD5 finalization, ends an MD5 message-digest operation, writing the the message digest and zeroizing ...
Definition TMD5.cxx:166
Int_t SetDigest(const char *md5ascii)
Set the digest from the ASCII representation 'md5ascii'.
Definition TMD5.cxx:394
TClass * IsA() const override
Definition TMarker.h:69
void Print(Option_t *option="") const override
Dump this marker with its attributes.
Definition TMarker.cxx:338
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
TString fTitle
Definition TNamed.h:33
TString fName
Definition TNamed.h:32
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:202
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:864
virtual TClass * IsA() const
Definition TObject.h:246
void ResetBit(UInt_t f)
Definition TObject.h:201
Regular expression class.
Definition TRegexp.h:31
Basic string class.
Definition TString.h:138
Ssiz_t Length() const
Definition TString.h:425
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Definition TString.h:702
const char * Data() const
Definition TString.h:384
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
Definition TString.cxx:1836
@ kIgnoreCase
Definition TString.h:285
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2270
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Definition TString.h:631
Bool_t IsNull() const
Definition TString.h:422
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2384
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:640
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition TString.h:659
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
Definition TSystem.cxx:1016
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition TSystem.cxx:944
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
Definition TUUID.h:42
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
Definition TUUID.cxx:570
This class represents a WWW compatible URL.
Definition TUrl.h:33
Int_t Compare(const TObject *obj) const override
Compare two urls as strings.
Definition TUrl.cxx:552
TF1 * f1
Definition legend1.C:11
TMarker m
Definition textangle.C:8