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