25# define strcasecmp(arg1,arg2) stricmp(arg1,arg2)
93 for (
Int_t i = level;i>=0;i--) {
152 Error(
"Add",
"TDataSetIter.has been corrupted ;-!");
178 if (!dataset)
return 0;
180 if (path && strlen(path)) set =
Find(path);
181 return Add(dataset,set);
202 if (strcmp(dirname,
".."))
231 while ( (nextSet = next()) )
246 if (dirname) set =
Find(dirname);
261 if (nextset->
IsFolder()) std::cout << std::endl;
263 std::cout << std::setw(2) << next.
GetDepth() <<
". ";
266 std::cout << std::setw(10) <<
type;
267 std::cout <<
" : " << std::setw(10) << nextset->
GetTitle();
268 std::cout << std::endl;
307 if (strchr(
name,
'/')) {
308 Error(
"FindDataSet",
"The name of the object <%s> can not contain any \"/\"",
name);
316 if (path && strlen(path)) startset =
Find(path);
318 if (!startset)
return 0;
325 while ((set = next()))
347 if (path) startset =
Find(path);
349 if (!startset)
return 0;
353 while ( (nextSet = next()) )
354 if (set == nextSet)
break;
390 if (path && path[0]) startset =
Find(path);
392 if (!startset)
return 0;
396 while ( (nextSet = next()) )
397 if (set == nextSet)
break;
408 if (set) set->
SetBit(flag,reset);
416 if (dataset) dataset->
SetBit(flag,reset);
434 if (!set && dirname==0) set=
Cwd();
435 if (set) set->
ls(opt);
457 if (set) set->
ls(depth);
538 if (list && list->
GetSize() ) {
542 ,
" too many (%d) nested levels of your TDataSet has been detected",
fDepth);
595 return Find(path,rootset,mkdir);
622 TDataSet *dataset=0,*dsnext=0,*ds=0;
628 if (!
name)
return rootset;
636 if (!strncmp(
name,
".*/",3)) {anywhere=1998;
name +=3;}
638 len = strcspn(
name,
" /");
639 if (!len)
return dataset;
641 if (!dataset)
goto NOTFOUND;
647 nextlen = strlen(nextname);
648 if (nextlen==len && !strncmp(
name,nextname,len))
649 return Find(
name+len,dataset,mkdirflag,titleFlag);
657 nextname = titleFlag ? dataset->
GetTitle() : dsnext->GetName();
658 if (!nextname)
continue;
661 nextlen = strlen(nextname);
662 yes = (len == nextlen);
664 yes = !strncmp(
name,nextname,len);
672 ds =
Find(
name+len,dsnext,mkdirflag,titleFlag);
678 if (!anywhere)
continue;
679 ds =
Find(
name,dsnext,mkdirflag,titleFlag);
686 if (mkdirflag && !titleFlag)
690 char buf[512];buf[0]=0; strncat(buf,
name,len);
707 return Find(
name,dataset,mkdirflag);
726 for (
int i = level;i>=0;i--) {
784 Error(
"Shunt",
"TDataSetIter.has been corrupted ;-!");
811 if (!dataset)
return 0;
813 if (path && strlen(path)) set =
Find(path);
814 return Shunt(dataset,set);
833 if (dataSet && dataSet->
HasData())
return dataSet;
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual ~TDataSetIter()
to be documented
virtual TDataSet * Dir(Char_t *dirname)
Print the names of the TDataSet objects for the datatset named with "dirname" apart of TDataSet::Ls()...
virtual TDataSet * FindByName(const Char_t *name, const Char_t *path="", Option_t *opt="")
to be documented
virtual TDataSet * FindByPointer(TDataSet *set, const Char_t *path=0, Option_t *opt="")
Check whether the object does belong the TDataSet defined with "path" opt = "-l" - check the "referen...
TDataSet * fWorkingDataSet
virtual TDataSet * Rmdir(TDataSet *dataset, Option_t *option="")
Remove the TDataSet *dataset from the current dataset If the current dataset is the deleted dataset t...
virtual Int_t Du() const
summarize dataset usage by Herb Ward proposal
virtual TDataSet * Add(TDataSet *set)
virtual TDataSet * Next(TDataSet::EDataSetPass mode=TDataSet::kContinue)
returns the pointer the "next" TDataSet object = 0 if all objects have been returned.
virtual TDataSet * Ls(const Char_t *dirname="", Option_t *opt="") const
Ls(const Char_t *dirname,Option_t)
virtual TDataSet * FindByPath(const Char_t *path, TDataSet *rootset=0, Bool_t mkdir=kFALSE)
to be documented
virtual TDataSet * operator[](const Char_t *path)
operator [] returns the pointer to the TDataSet if it does contain any data (TTable for example)
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual void Reset(TDataSet *l=0, Int_t depth=0)
TDataSet *l != 0 means the new start pointer depth != 0 means the new value for the depth otherwise t...
TDataSet * NextDataSet(TIter &next)
to be documented
TDataSetIter(const TDataSetIter &)
virtual TDataSet * FindByTitle(const Char_t *title, const Char_t *path="", Option_t *opt="")
to be documented
static TDataSet * fgNullDataSet
virtual Int_t GetDepth() const
TDataSet * GetNullSet()
return a fake pointer == -1 casted to (TDataSet *)
virtual TDataSet * FindDataSet(const Char_t *name, const Char_t *path="", Option_t *opt="")
FindDataSet looks for the object with the name supplied across dataset.
virtual TObject * FindObject(const Char_t *name) const
This method is not recommended.
virtual TDataSet * Cd(const Char_t *dirname)
virtual TDataSet * Mkdir(const Char_t *dirname)
to be documented
virtual TDataSet * operator*() const
operator *
virtual TDataSet * Shunt(TDataSet *set)
virtual TDataSet * Find(const Char_t *path, TDataSet *rootset=0, Bool_t mkdir=kFALSE, Bool_t titleFlag=kFALSE)
virtual Int_t Flag(UInt_t flag=TDataSet::kMark, TDataSet::EBitOpt reset=TDataSet::kSet)
virtual TDataSet * Cwd() const
virtual void ls(Option_t *option="") const
virtual TSeqCollection * GetCollection() const
virtual TDataSet * Instance() const
apply the class default ctor to instantiate a new object of the same kind.
virtual TString Path() const
return the full path of this data set
virtual Long_t HasData() const
virtual TDataSet * GetParent() const
virtual void Add(TDataSet *dataset)
virtual TDataSet * Find(const char *path) const
Full description see: TDataSetIter::Find.
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Sequenceable collection abstract base class.
const char * Data() const
static constexpr double s
Short_t Max(Short_t a, Short_t b)