26 #include "TObjArray.h"
59 TSeqCollection *fList;
62 TDataSet(
const char *name,
const char *title):
63 TNamed(name,title),fParent(0),fList(0){}
65 static EDataSetPass SortIt(
TDataSet *ds);
66 static EDataSetPass SortIt(
TDataSet *ds,
void *user);
84 TDataSet(
const char *name=
"",
TDataSet *parent=0, Bool_t arrayFlag = kFALSE);
94 virtual void Browse(TBrowser *b);
95 virtual TObject *
Clone(
const char *newname=
"")
const;
96 virtual void Delete(Option_t *opt=
"");
98 virtual TDataSet *
FindByName(
const char *name,
const char *path=
"",Option_t *opt=
"")
const;
100 virtual TDataSet *
FindByTitle(
const char *title,
const char *path=
"",Option_t *opt=
"")
const;
102 TObject *
FindObject(
const TObject *o)
const {
return TObject::FindObject(o);}
104 TObjArray *GetObjArray()
const {
return (TObjArray *)fList; }
105 virtual TSeqCollection *GetCollection()
const {
return (TSeqCollection *)fList; }
106 TList *GetList()
const {
return (TList *)fList; }
107 virtual Int_t GetListSize()
const;
109 TObject *GetMother()
const {
return (TObject*)GetParent();}
111 virtual TDataSet *GetParent()
const {
return fParent;}
112 virtual Long_t HasData()
const {
return 0;}
115 virtual TString
Path()
const;
116 virtual EDataSetPass
Pass(EDataSetPass ( *callback)(
TDataSet *),Int_t depth=0);
117 virtual EDataSetPass
Pass(EDataSetPass ( *callback)(
TDataSet *,
void*),
void *user,Int_t depth=0);
119 virtual Int_t
Purge(Option_t *opt=
"");
128 virtual Bool_t
IsEmpty()
const;
129 virtual Bool_t IsFolder()
const {
return kTRUE;}
130 virtual Bool_t IsMarked()
const ;
131 virtual Bool_t
IsThisDir(
const char *dirname,
int len=-1,
int ignorecase=0)
const ;
133 virtual void ls(Option_t *option=
"")
const;
134 virtual void ls(Int_t depth)
const;
140 void Mark(UInt_t flag,EBitOpt reset=kSet);
145 virtual Int_t
Write(
const char *name=0, Int_t option=0, Int_t bufsize=0);
146 virtual Int_t
Write(
const char *name=0, Int_t option=0, Int_t bufsize=0)
const;
151 inline TDataSet *TDataSet::At(Int_t idx)
const {
return fList ? (
TDataSet *)fList->At(idx) : 0; }
152 inline Int_t TDataSet::GetListSize()
const {
return (fList) ? fList->GetSize():0;}
154 inline Bool_t TDataSet::IsMarked()
const {
return TestBit(kMark); }
155 inline void TDataSet::Mark(UInt_t flag,EBitOpt reset){ SetBit(flag,reset); }
156 inline void TDataSet::Mark() { Mark(kMark,kSet); }
157 inline void TDataSet::UnMark() { Mark(kMark,kReset); }
virtual Bool_t IsThisDir(const char *dirname, int len=-1, int ignorecase=0) const
virtual TDataSet * First() const
Return the first object in the list. Returns 0 when list is empty.
void MarkAll()
Mark all members of this dataset.
static TDataSet * GetMainSet()
return pointer to the main dataset
virtual TDataSet * Instance() const
virtual TDataSet * FindByTitle(const char *title, const char *path="", Option_t *opt="") const
virtual TDataSet * FindByPath(const char *path) const
Aliase for TDataSet::Find(const Char_t *path) method.
virtual EDataSetPass Pass(EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
virtual void PrintContents(Option_t *opt="") const
virtual void AddAtAndExpand(TDataSet *dataset, Int_t idx=0)
virtual void Delete(Option_t *opt="")
virtual void Remove(TDataSet *set)
Remiove the "set" from this TDataSet.
virtual TDataSet * Last() const
Return the last object in the list. Returns 0 when list is empty.
TDataSet * GetRealParent()
return real parent
virtual void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).
virtual void SetObject(TObject *obj)
The depricated method (left here for the sake of the backward compatibility)
virtual TObject * Clone(const char *newname="") const
the custom implementation fo the TObject::Clone
void InvertAllMarks()
Invert mark bit for all members of this dataset.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
virtual TDataSet * Prev() const
virtual TObject * FindObject(const Char_t *name) const
virtual void ls(Option_t *option="") const
virtual void AddLast(TDataSet *dataset)
Add TDataSet object at the end of the dataset list of this dataset.
virtual Bool_t IsEmpty() const
return kTRUE if the "internal" collection has no member
virtual TDataSet * Next() const
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
virtual ~TDataSet()
std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl; ...
virtual void AddFirst(TDataSet *dataset)
Add TDataSet object at the beginning of the dataset list of this dataset.
virtual void AddAt(TDataSet *dataset, Int_t idx=0)
virtual Int_t Purge(Option_t *opt="")
virtual void Shunt(TDataSet *newParent=0)
virtual void Sort()
Sort recursively all members of the TDataSet with TList::Sort method.
virtual TDataSet * FindByName(const char *name, const char *path="", Option_t *opt="") const
virtual void SetParent(TDataSet *parent=0)
virtual TString Path() const
return the full path of this data set
void UnMarkAll()
UnMark all members of this dataset.
void AddMain(TDataSet *set)
add data set to main data set
void MakeCollection()
Create the internal container at once if any.
virtual TDataSet * Find(const char *path) const
virtual TDataSet * RemoveAt(Int_t idx)