StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TDataSetIter Class Reference
Inheritance diagram for TDataSetIter:
TVolumeViewIter

Public Member Functions

 TDataSetIter (TDataSet *l=0, Int_t depth=1, Bool_t dir=kIterForward)
 to be documented
 
 TDataSetIter (TDataSet *l, Bool_t dir)
 to be documented
 
virtual ~TDataSetIter ()
 to be documented
 
virtual TDataSetAdd (TDataSet *set)
 
virtual TDataSetAdd (TDataSet *set, const Char_t *path)
 
virtual TDataSetAdd (TDataSet *set, TDataSet *dataset)
 
virtual TDataSetCd (const Char_t *dirname)
 
virtual TDataSetCd (TDataSet *ds)
 
virtual TDataSetoperator() (TDataSet::EDataSetPass mode=TDataSet::kContinue)
 
virtual TDataSetoperator() (const Char_t *path)
 
virtual TDataSetoperator[] (const Char_t *path)
 
virtual Int_t GetDepth () const
 
virtual TDataSetCwd () const
 
virtual TDataSetDir (Char_t *dirname)
 
virtual Int_t Du () const
 summarize dataset usage by Herb Ward proposal
 
virtual Int_t Df () const
 
virtual TDataSetFind (const Char_t *path, TDataSet *rootset=0, Bool_t mkdir=kFALSE, Bool_t titleFlag=kFALSE)
 
virtual TDataSetFindByPath (const Char_t *path, TDataSet *rootset=0, Bool_t mkdir=kFALSE)
 to be documented
 
virtual TDataSetFindDataSet (const Char_t *name, const Char_t *path="", Option_t *opt="")
 
virtual TDataSetFindByName (const Char_t *name, const Char_t *path="", Option_t *opt="")
 to be documented
 
virtual TDataSetFindByTitle (const Char_t *title, const Char_t *path="", Option_t *opt="")
 to be documented
 
virtual TDataSetFindDataSet (TDataSet *set, const Char_t *path, Option_t *opt="")
 
virtual TDataSetFindByPointer (TDataSet *set, const Char_t *path=0, Option_t *opt="")
 
virtual TObject * FindObject (const Char_t *name) const
 
virtual TObject * FindObject (const TObject *obj) const
 
virtual Int_t Flag (UInt_t flag=TDataSet::kMark, TDataSet::EBitOpt reset=TDataSet::kSet)
 
virtual Int_t Flag (const Char_t *path, UInt_t flag=TDataSet::kMark, TDataSet::EBitOpt reset=TDataSet::kSet)
 to be documented
 
virtual Int_t Flag (TDataSet *dataset, UInt_t flag=TDataSet::kMark, TDataSet::EBitOpt reset=TDataSet::kSet)
 to be documented
 
virtual TDataSetLs (const Char_t *dirname="", Option_t *opt="") const
 
virtual TDataSetLs (const Char_t *dirname, Int_t depth) const
 
virtual void ls (Option_t *dirname="") const
 
virtual TDataSetls (TString dirname, Option_t *opt="") const
 
virtual TDataSetls (const Char_t *dirname, Int_t depth) const
 
virtual TDataSetMkdir (const Char_t *dirname)
 to be documented
 
virtual TDataSetMd (const Char_t *dirname)
 
virtual TString Path (const Char_t *path)
 
virtual TString Path ()
 
virtual TDataSetPwd (Option_t *opt="") const
 
virtual TDataSetRmdir (TDataSet *dataset, Option_t *option="")
 
virtual TDataSetRmdir (const Char_t *dirname, Option_t *option="")
 
virtual TDataSetRd (const Char_t *dirname, Option_t *option="")
 
virtual TDataSetShunt (TDataSet *set)
 
virtual TDataSetShunt (TDataSet *set, const Char_t *path)
 
virtual TDataSetShunt (TDataSet *set, TDataSet *dataset)
 
virtual TDataSetNext (TDataSet::EDataSetPass mode=TDataSet::kContinue)
 
virtual TDataSetNext (const Char_t *path, TDataSet *rootset=0, Bool_t mkdir=kFALSE)
 
virtual Bool_t Notify ()
 
virtual void Notify (TDataSet *dataset)
 
const Option_t * GetOption () const
 
virtual void Reset (TDataSet *l=0, Int_t depth=0)
 
virtual TDataSetoperator* () const
 operator *
 

Protected Member Functions

TDataSetNextDataSet (TIter &next)
 to be documented
 
TDataSetNextDataSet (Int_t nDataSet)
 Pick the next object of the level provided.
 
TDataSetGetNullSet ()
 return a fake pointer == -1 casted to (TDataSet *)
 

Protected Attributes

TIter * fNext
 
TIter * fNextSet [100]
 
Int_t fDepth
 
Int_t fMaxDepth
 
TDataSetfDataSet
 
TDataSetfRootDataSet
 
TDataSetfWorkingDataSet
 

Static Protected Attributes

static TDataSetfgNullDataSet = (TDataSet *)(-1)
 

Detailed Description

Definition at line 35 of file TDataSetIter.h.

Member Function Documentation

TDataSet * TDataSetIter::Add ( TDataSet dataset,
const Char_t *  path 
)
virtual
                                                                      //

Add // // Char_t path != 0 - Add a TDataSet dataset to the TDataSet dataset // defined with "path" // = 0 - (by default) to the current TDataSet defined // with fWorkingDataSet data member // // returns the dataset is success or ZERO pointer // ======= // //

Definition at line 176 of file TDataSetIter.cxx.

References Find().

TDataSet * TDataSetIter::Add ( TDataSet set,
TDataSet dataset 
)
virtual
                                                                      //

Add - adds the set to the dataset defined with the second parameters // // TDataSet dataset != 0 - Add the set to the TDataSet *dataset // // = 0 - (by default) to the current TDataSet defined // with fWorkingDataSet data member // // returns the pointer to set is success or ZERO poiner // ======= // // Note: If this TDataSetIter is empty (i.e. Cwd() returns 0), the "set" // becomes the "root" dataset of this iterator // //

Definition at line 137 of file TDataSetIter.cxx.

TDataSet * TDataSetIter::Cd ( const Char_t *  dirname)
virtual
                                                            //

TDataSet *TDataSetIter::Cd(const Char_t *dirname) // // Change the current working directory to dirname // // Returns the pointer to the new "working" TDataSet // ======= 0, if the new directory doesn't exist. // // Remark: The name = ".." has a special meaning. // ---— TDataSetIter::Cd("..") returns the parent set // But one still can not use ".." as a legal part // of the full path //

Definition at line 200 of file TDataSetIter.cxx.

References Find().

Referenced by StFtpcSlowSimMaker::Make().

TDataSet * TDataSetIter::Cd ( TDataSet ds)
virtual
                                                            //

TDataSet *TDataSetIter::Cd(const TDataSet *ds) // // Make: Cwd() = ds; // Look for the first occurence of the "ds" pointer for the current// TDataSet in respect of the Cwd() if any // // Change the current working directory to ds if present // // Returns the pointer to the new "working" TDataSet (i.e. ds) // ======= 0, if the new directory doesn't exist. // //

Definition at line 226 of file TDataSetIter.cxx.

TDataSet * TDataSetIter::Dir ( Char_t *  dirname)
virtual

Print the names of the TDataSet objects for the datatset named with "dirname" apart of TDataSet::Ls() this method prints one level only

Definition at line 243 of file TDataSetIter.cxx.

References Find(), and TDataSet::ls().

TDataSet * TDataSetIter::Find ( const Char_t *  path,
TDataSet rootset = 0,
Bool_t  mkdirflag = kFALSE,
Bool_t  titleFlag = kFALSE 
)
virtual
                                                                       //
titleFlag = kFALSE; use object name as key (by default)                //
            kTRUE;  use object title as key  and ignore mkdirFlag      //
                                                                       //
      "path" ::= <relative path> | <absolute path> | <empty>           //
                                                                       //

"relative path" ::= <dataset name>=""> | <dataset name>="">/<dataset name>=""> // // "absolute path" ::= /<relative path>=""> // "empty" ::= zero pointer | pointer to zero length string // // "relative path": the search is done against of fWorkingDataSet data mem // "absolute path": the search is done against of fRootDataSet data mem // "empty path" : no search is done just next TDataSet is returned if any // // Remark: This version can not treat any "special name" like "..", ".", etc // ---— //

Definition at line 619 of file TDataSetIter.cxx.

References TDataSet::Instance(), and NextDataSet().

Referenced by Add(), Cd(), Dir(), TDataSet::Find(), FindByPath(), FindByPointer(), FindDataSet(), Flag(), St_sls_Maker::Make(), StFtpcClusterMaker::Make(), Mkdir(), operator[](), and Shunt().

TDataSet * TDataSetIter::FindByPointer ( TDataSet set,
const Char_t *  path = 0,
Option_t *  opt = "" 
)
virtual

Check whether the object does belong the TDataSet defined with "path" opt = "-l" - check the "reference" links only "-s" - check the "structural" links only = "by default" - checks all links

Definition at line 385 of file TDataSetIter.cxx.

References Find().

TDataSet * TDataSetIter::FindDataSet ( const Char_t *  name,
const Char_t *  path = "",
Option_t *  opt = "" 
)
virtual

FindDataSet looks for the object with the name supplied across dataset.

name - the "base" name title (with no path) of the TDataSet (see: opt = -t) path - path to start the search from (the current dataset "by default") opt = "-i" - case insensitive search "-t" - first <name> parameter defines the object "title" rather the object "name"

Note: If the name provided is not unique the first found is returned.

Definition at line 304 of file TDataSetIter.cxx.

References Find().

Referenced by FindByName(), and FindByTitle().

TDataSet * TDataSetIter::FindDataSet ( TDataSet set,
const Char_t *  path,
Option_t *  opt = "" 
)
virtual

Check whether the object does belong the TDataSet defined with "path" opt = "-l" - check the "reference" links only "-s" - check the "structural" links only = "by default" - checks all links

Definition at line 341 of file TDataSetIter.cxx.

References Find().

TObject * TDataSetIter::FindObject ( const Char_t *  name) const
virtual

This method is not recommended. It is done to back TObject::FindObject method only. One is recommnened to use FindByName method instead.

Definition at line 363 of file TDataSetIter.cxx.

TObject * TDataSetIter::FindObject ( const TObject *  dataset) const
virtual

This method is not recommended. It is done to back TObject::FindObject method only. One is recommended to use FindByName method instead.

Definition at line 373 of file TDataSetIter.cxx.

TDataSet * TDataSetIter::Ls ( const Char_t *  dirname = "",
Option_t *  opt = "" 
) const
virtual

Ls(const Char_t *dirname,Option_t)

Prints the list of the TDataSet defined with dirname

dirname = 0 - prints the current dataset dirname[0] = '/' - print TDataSet defined with dirname dirname[0] != '/' - prints DataSet with respect of the current class

Definition at line 431 of file TDataSetIter.cxx.

References TDataSet::Find(), and TDataSet::ls().

TDataSet * TDataSetIter::Ls ( const Char_t *  dirname,
Int_t  depth 
) const
virtual

Ls(const Char_t *dirname,Int_t depth)

Prints the list of the TDataSet defined with dirname Returns the dataset defined by "path" or Cwd();

dirname = 0 - prints the current dataset dirname[0] = '/' - print TDataSet defined with dirname dirname[0] != '/' - prints DataSet with respect of the current class

depth = 0 - print all level of the TDataSet defined with dirname > 0 - print depth levels at most of the dirname TDataSet

Definition at line 454 of file TDataSetIter.cxx.

References TDataSet::Find(), and TDataSet::ls().

TDataSet * TDataSetIter::Next ( TDataSet::EDataSetPass  mode = TDataSet::kContinue)
virtual

returns the pointer the "next" TDataSet object = 0 if all objects have been returned.

mode = kContinue - default normal mode kPrune - stop passing of the current branch but continue with the next one if any kUp - break passing, return to the previous level, then continue all other - are treated as "kContinue"

Definition at line 526 of file TDataSetIter.cxx.

References NextDataSet().

void TDataSetIter::Notify ( TDataSet dataset)
virtual

Notify(TDataSet *dataset)

This dummy method is called when TDataSetIter::Find dives in "dataset" to look for thew next level of the dataset's printf("void TDataSetIter::Notify(TDataSet *) level: %d %s\n",fDepth,ds->GetName());

Reimplemented in TVolumeViewIter.

Definition at line 484 of file TDataSetIter.cxx.

TDataSet * TDataSetIter::operator[] ( const Char_t *  path)
virtual

operator [] returns the pointer to the TDataSet if it does contain any data (TTable for example)

Input: path = The path to the dataset to find

Output: pointer to the dataset if it found and its TDataSet::HasData() method returns non-zero (see for example TTable::HasData() )

Reimplemented in TVolumeViewIter.

Definition at line 830 of file TDataSetIter.cxx.

References Find().

Referenced by TVolumeViewIter::operator[]().

void TDataSetIter::Reset ( TDataSet l = 0,
Int_t  depth = 0 
)
virtual

TDataSet *l != 0 means the new start pointer depth != 0 means the new value for the depth otherwise the privious one is used;

Reimplemented in TVolumeViewIter.

Definition at line 719 of file TDataSetIter.cxx.

Referenced by Mkdir(), and TVolumeViewIter::Reset().

TDataSet * TDataSetIter::Rmdir ( TDataSet dataset,
Option_t *  option = "" 
)
virtual

Remove the TDataSet *dataset from the current dataset If the current dataset is the deleted dataset the its parent becomes the "current dataset" or 0 if this dataset has no parent.

returns: the "current dataset" pointer

Definition at line 498 of file TDataSetIter.cxx.

TDataSet * TDataSetIter::Shunt ( TDataSet dataset,
const Char_t *  path 
)
virtual
                                                                      //

Shunt // // Char_t path != 0 - Move a TDataSet dataset from its parent to // the TDataSet dataset // defined with "path" // = 0 - (by default) to the current TDataSet defined // with fWorkingDataSet data member // // returns the dataset is success or ZERO pointer // ======= // //

Definition at line 809 of file TDataSetIter.cxx.

References Find().

TDataSet * TDataSetIter::Shunt ( TDataSet set,
TDataSet dataset 
)
virtual
                                                                      //

Shunt - moves the set to the dataset defined with the second parameters // // TDataSet dataset != 0 - Add the set to the TDataSet *dataset // // = 0 - (by default) to the current TDataSet defined // with fWorkingDataSet data member // // returns the pointer to set if successful or ZERO pointer // ======= // // Note: If this TDataSetIter is empty (i.e. Cwd() returns 0), the "set" // becomes the "root" dataset of this iterator // //

Definition at line 769 of file TDataSetIter.cxx.

References TDataSet::Shunt().


The documentation for this class was generated from the following files: