TDataSetIter


class description - source file - inheritance tree

class TDataSetIter : public TObject


    protected:
TDataSet* GetNullSet() TDataSet* NextDataSet(TIter& next) TDataSet* NextDataSet(Int_t nDataSet) public:
TDataSetIter TDataSetIter(TDataSet* l = 0, Int_t depth = 1, Bool_t dir = kIterForward) TDataSetIter TDataSetIter(TDataSet* l, Bool_t dir) TDataSetIter TDataSetIter(TDataSetIter&) virtual void ~TDataSetIter() virtual TDataSet* Add(TDataSet* set) virtual TDataSet* Add(TDataSet* set, const Char_t* path) virtual TDataSet* Add(TDataSet* set, TDataSet* dataset) virtual TDataSet* Cd(const Char_t* dirname) virtual TDataSet* Cd(TDataSet* ds) static TClass* Class() virtual TDataSet* Cwd() const virtual Int_t Df() const virtual TDataSet* Dir(Char_t* dirname) virtual Int_t Du() const virtual TDataSet* Find(const Char_t* path, TDataSet* rootset = 0, Bool_t mkdir = kFALSE) virtual TDataSet* FindByName(const Char_t* name, const Char_t* path, Option_t* opt) virtual TDataSet* FindByPath(const Char_t* path, TDataSet* rootset = 0, Bool_t mkdir = kFALSE) virtual TDataSet* FindDataSet(const Char_t* name, const Char_t* path, Option_t* opt) virtual TDataSet* FindDataSet(TDataSet* set, const Char_t* path, Option_t* opt) virtual Int_t Flag(UInt_t flag = kMark, EBitOpt reset = kSet) virtual Int_t Flag(const Char_t* path, UInt_t flag = kMark, EBitOpt reset = kSet) virtual Int_t Flag(TDataSet* dataset, UInt_t flag = kMark, EBitOpt reset = kSet) virtual Int_t GetDepth() const const Option_t* GetOption() const virtual TClass* IsA() const virtual TDataSet* Ls(const Char_t* dirname, Option_t* opt) const virtual TDataSet* Ls(const Char_t* dirname, Int_t depth) const virtual TDataSet* ls(const Char_t* dirname, Option_t* opt) const virtual TDataSet* ls(const Char_t* dirname, Int_t depth) const virtual TDataSet* Md(const Char_t* dirname) virtual TDataSet* Mkdir(const Char_t* dirname) virtual TDataSet* Next(EDataSetPass mode = kContinue) virtual TDataSet* Next(const Char_t* path, TDataSet* rootset = 0, Bool_t mkdir = kFALSE) virtual void Notify(TDataSet* dataset) virtual TDataSet* operator()(EDataSetPass mode = kContinue) virtual TDataSet* operator()(const Char_t* path) virtual TDataSet* operator*() const virtual TDataSet* operator[](const Char_t* path) virtual TString Path(const Char_t* path) virtual TString Path() virtual TDataSet* Pwd(Option_t* opt) const virtual Int_t Rd(const Char_t* dirname, Option_t* option) virtual void Reset(TDataSet* l = 0, Int_t depth = 0) virtual Int_t Rmdir(TDataSet* dataset, Option_t* option) virtual Int_t Rmdir(const Char_t* dirname, Option_t* option) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual TDataSet* Shunt(TDataSet* set) virtual TDataSet* Shunt(TDataSet* set, const Char_t* path) virtual TDataSet* Shunt(TDataSet* set, TDataSet* dataset) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

protected:
TIter* fNext "standard" ROOT iterator for containers TIter* fNextSet[100] the list of the TList iterators to bypass the whole dataset Int_t fDepth the current depth of the passing Int_t fMaxDepth the max depth of the passing (=1 by default) TDataSet* fDataSet Pointer to the last selected TDataSet TDataSet* fRootDataSet Pointer to the root TDataSet TDataSet* fWorkingDataSet Pointer to the working TDataSet static TDataSet* fNullDataSet


See also

TVolumeViewIter

Class Description

                                                                      
 TDataSetIter                                                         
                                                                      
 TDataSetIter is a class iterator to navigate TDataSet objects        
 via 4 internal pointers :                                            
                                                                      
  1. fRootDataSet    - "root" dataset                                 
  2. fWorkingDataSet - Working dataset                                
  3. fDataSet        - the last selected TDataSet                     
  4. fNext           - TIter for the the list of the "root" dataset   
                                                                      


TDataSetIter(TDataSet *link, Bool_t dir)

TDataSetIter(TDataSet *link, Int_t depth, Bool_t dir)

~TDataSetIter()

TDataSet* Add(TDataSet *set, TDataSet *dataset)
                                                                           
 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                        //                                                                         


TDataSet* Add(TDataSet *dataset, const Char_t *path)
                                                                           
 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                           
  =======                                                                  
                                                                           


TDataSet* Cd(const Char_t *dirname)
                                                                 
 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                                       


TDataSet* Cd(TDataSet *ds)
                                                                 
 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.               
                                                                 


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


Int_t Du() const
 summarize dataset usage by Herb Ward proposal

TDataSet* FindByName(const Char_t *name,const Char_t *path,Option_t *opt)

TDataSet* FindDataSet(const Char_t *name,const Char_t *path,Option_t *opt)
 FindDataSet looks for the object with the name supplied across dataset.

 name        - the "base" name (with no path) of the TDataSet
 path        - path to start the search from (the current dataset "by default")
 opt = "-i"  - case insensitive search

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


TDataSet* FindDataSet(TDataSet *set,const Char_t *path,Option_t *opt)
 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


Int_t Flag(const Char_t *path,UInt_t flag,EBitOpt reset)

Int_t Flag(TDataSet *dataset,UInt_t flag,EBitOpt reset)

TDataSet* Ls(const Char_t *dirname,Option_t *opt) const
   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


TDataSet* Ls(const Char_t *dirname,Int_t depth) const
   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


TDataSet* Mkdir(const Char_t *dirname)

void Notify(TDataSet *)
  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 %sn",fDepth,ds->GetName());


Int_t Rmdir(TDataSet *dataset,Option_t *)
  Remove the TDataSet *dataset from the current dataset


TDataSet* Next( EDataSetPass mode)

 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"



TDataSet* NextDataSet(TIter &next)

TDataSet* NextDataSet(Int_t nDataSet)
 Pick the next object of the  level provided

TDataSet* FindByPath(const Char_t *path, TDataSet *rootset,Bool_t mkdir)

TDataSet* Find(const Char_t *path, TDataSet *rootset, Bool_t 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 
  ------                                                                    


void Reset(TDataSet *l, int depth)
 TDataSet *l != 0 means the new start pointer
    depth      != 0 means the new value for the depth
                    otherwise the privious one is used;


TDataSet* Shunt(TDataSet *set, TDataSet *dataset)
                                                                           
 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                        //                                                                         


TDataSet* Shunt(TDataSet *dataset, const Char_t *path)
                                                                           
 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                           
  =======                                                                  
                                                                           




Inline Functions


              TDataSet* GetNullSet()
              TDataSet* Add(TDataSet* set, TDataSet* dataset)
              TDataSet* operator()(EDataSetPass mode = kContinue)
              TDataSet* operator()(const Char_t* path)
              TDataSet* operator[](const Char_t* path)
                  Int_t GetDepth() const
              TDataSet* Cwd() const
                  Int_t Df() const
                  Int_t Flag(TDataSet* dataset, UInt_t flag = kMark, EBitOpt reset = kSet)
              TDataSet* ls(const Char_t* dirname, Option_t* opt) const
              TDataSet* ls(const Char_t* dirname, Int_t depth) const
              TDataSet* Md(const Char_t* dirname)
                TString Path(const Char_t* path)
                TString Path()
              TDataSet* Pwd(Option_t* opt) const
                  Int_t Rmdir(const Char_t* dirname, Option_t* option)
                  Int_t Rd(const Char_t* dirname, Option_t* option)
              TDataSet* Shunt(TDataSet* set, TDataSet* dataset)
              TDataSet* Next(const Char_t* path, TDataSet* rootset = 0, Bool_t mkdir = kFALSE)
        const Option_t* GetOption() const
              TDataSet* operator*() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
           TDataSetIter TDataSetIter(TDataSetIter&)


Author: Valery Fine(fine@mail.cern.ch) 03/07/98
Last update: root/star:$Name: $:$Id: TDataSetIter.cxx,v 1.3 2000/12/13 15:13:54 brun Exp $


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.