31 : fCurrentUrl(0), fUrlList(0), fSize(-1), fUUID(0), fMD5(0),
32 fMetaDataList(0), fIndex(-1)
40 if (size > -1) fSize = size;
44 fUUID =
new TUUID(uuid);
56 RemoveMetaData(meta->GetName());
62 SetTitle(
"TFileInfo");
72 fCurrentUrl(0), fUrlList(0),
73 fSize(fi.fSize), fUUID(0), fMD5(0),
74 fMetaDataList(0), fIndex(fi.fIndex)
81 while ((u = (
TUrl *)nxu())) {
157 if (!in || strlen(in) <= 0)
return;
161 while (
sin.Tokenize(t, f1,
" ")) {
182 Long64_t ent = -1, fst= -1, lst = -1;
205 if (cl.
IsNull()) cl =
"TObject";
280 while ((urlelement = (
TUrl*) nextUrl())) {
402 if (!meta || strlen(meta) <= 0) {
426 if (!meta || strlen(meta) <= 0)
449 if (fIndex < fi->
fIndex) {
451 }
else if (fIndex > fi->
fIndex) {
481 Printf(
"UUID: %s\nMD5: %s\nSize: %lld\nIndex: %d",
494 while ((m = (
TObject*) nextm())) {
495 Printf(
" === Meta Data Object ===");
499 TString out(
"current-url-undef -|-|- md5-undef");
522 :
TNamed(objPath, objClass), fEntries(entries),
fFirst(first),
523 fLast(last), fTotBytes(totbytes), fZipBytes(zipbytes)
540 const char *objClass,
Long64_t entries,
543 :
TNamed(objPath, objClass), fEntries(entries),
fFirst(first),
544 fLast(last), fTotBytes(totbytes), fZipBytes(zipbytes)
563 :
TNamed(m.GetName(), m.GetTitle())
597 Printf(
" Name: %s\n Class: %s\n Entries: %lld\n"
598 " First: %lld\n Last: %lld",
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetTitle() const
Returns title of object.
virtual ~TFileInfo()
Destructor.
void SetUUID(const char *uuid)
Set the UUID to the value associated to the string 'uuid'.
void Print(Option_t *options="") const
Print information about this object.
void Final()
MD5 finalization, ends an MD5 message-digest operation, writing the the message digest and zeroizing ...
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t RemoveUrl(const char *url)
Remove an URL. Returns kTRUE if successful, kFALSE otherwise.
TFileInfo(const char *url=0, Long64_t size=-1, const char *uuid=0, const char *md5=0, TObject *meta=0)
virtual void SetName(const char *name)
Change (i.e.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
TUrl * NextUrl()
Iterator function, start iteration by calling ResetUrl().
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
Regular expression class.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
TString & Prepend(const char *cs)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TUrl * GetFirstUrl() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
const char * Data() const
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Bool_t AddMetaData(TObject *meta)
Add's a meta data object to the file info object.
This code implements the MD5 message-digest algorithm.
The TNamed class is the base class for all named ROOT classes.
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.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Int_t Compare(const TObject *obj) const
Compare TFileInfo object by their first urls.
TList * fUrlList
current URL to access the file, points to URL
void ParseInput(const char *in)
Parse the input line to extract init information from 'in'; the input string is tokenized on ' '; the...
Bool_t RemoveUrlAt(Int_t i)
Remove URL at given position. Returns kTRUE on success, kFALSE on error.
TFileInfoMeta * GetMetaData(const char *meta=0) const
Get meta data object with specified name.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
R__EXTERN TSystem * gSystem
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Bool_t TestBit(UInt_t f) const
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
RooCmdArg Index(RooCategory &icat)
virtual Int_t GetSize() const
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.
Mother of all ROOT objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
Int_t SetDigest(const char *md5ascii)
Set the digest from the ASCII representation 'md5ascii'.
TUrl * GetCurrentUrl() const
Return the current url.
Bool_t RemoveMetaData(const char *meta=0)
Remove the metadata object.
virtual void Add(TObject *obj)
ClassImp(TFileInfo) ClassImp(TFileInfoMeta) TFileInfo
Constructor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Class describing a generic file including meta information.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Int_t Compare(const TObject *obj) const
Compare two urls as strings.