StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
TDataSet Class Reference
Inheritance diagram for TDataSet:
electronicsDataSet geometryDataSet slowcontrolDataSet StBranch StEEmcDb StEmcHitCollection StEvtHddr StFcsDb StFcsDbPulse StFttDb StiAux StMaker StMcEmcHitCollection StMcEmcModuleHitCollection StMcEvent StPmdCollection StPointCollection StValiSet StXRef TChair TFileSet TObjectSet TTable

Public Types

enum  EDataSetPass {
  kContinue, kPrune, kStop, kUp,
  kStruct, kAll, kRefs, kMarked
}
 
enum  ESetBits { kMark = BIT(22), kArray = BIT(20) }
 
enum  EBitOpt { kSet = kTRUE, kReset = kFALSE }
 

Public Member Functions

 TDataSet (const char *name="", TDataSet *parent=0, Bool_t arrayFlag=kFALSE)
 
 TDataSet (const TDataSet &src, EDataSetPass iopt=kAll)
 
 TDataSet (TNode &src)
 This copy ctor has been depricated (left for thwe sake of the backweard compatibility)
 
virtual ~TDataSet ()
 std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl;
 
virtual void Add (TDataSet *dataset)
 
virtual void AddAt (TDataSet *dataset, Int_t idx=0)
 
virtual void AddAtAndExpand (TDataSet *dataset, Int_t idx=0)
 
virtual void AddFirst (TDataSet *dataset)
 Add TDataSet object at the beginning of the dataset list of this dataset.
 
virtual void AddLast (TDataSet *dataset)
 Add TDataSet object at the end of the dataset list of this dataset.
 
TDataSetAt (Int_t idx) const
 
virtual void Browse (TBrowser *b)
 Browse this dataset (called by TBrowser).
 
virtual TObject * Clone (const char *newname="") const
 the custom implementation fo the TObject::Clone
 
virtual void Delete (Option_t *opt="")
 
virtual TDataSetFind (const char *path) const
 
virtual TDataSetFindByName (const char *name, const char *path="", Option_t *opt="") const
 
virtual TDataSetFindByPath (const char *path) const
 Aliase for TDataSet::Find(const Char_t *path) method.
 
virtual TDataSetFindByTitle (const char *title, const char *path="", Option_t *opt="") const
 
TObject * FindObject (const char *name) const
 
TObject * FindObject (const TObject *o) const
 
virtual TDataSetFirst () const
 Return the first object in the list. Returns 0 when list is empty.
 
TObjArray * GetObjArray () const
 
virtual TSeqCollection * GetCollection () const
 
TList * GetList () const
 
virtual Int_t GetListSize () const
 
TObject * GetMother () const
 
virtual TObject * GetObject () const
 The depricated method (left here for the sake of the backward compatibility)
 
virtual TDataSetGetParent () const
 
virtual Long_t HasData () const
 
virtual TDataSetInstance () const
 
virtual TString Path () const
 return the full path of this data set
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *, void *), void *user, Int_t depth=0)
 
virtual void PrintContents (Option_t *opt="") const
 
virtual Int_t Purge (Option_t *opt="")
 
virtual void Remove (TDataSet *set)
 Remiove the "set" from this TDataSet.
 
virtual TDataSetRemoveAt (Int_t idx)
 
virtual void SetMother (TDataSet *parent=0)
 
virtual void SetObject (TObject *obj)
 The depricated method (left here for the sake of the backward compatibility)
 
virtual void SetParent (TDataSet *parent=0)
 
virtual void SetWrite ()
 
virtual void Shunt (TDataSet *newParent=0)
 
virtual void Sort ()
 Sort recursively all members of the TDataSet with TList::Sort method.
 
virtual Bool_t IsEmpty () const
 return kTRUE if the "internal" collection has no member
 
virtual Bool_t IsFolder () const
 
virtual Bool_t IsMarked () const
 
virtual Bool_t IsThisDir (const char *dirname, int len=-1, int ignorecase=0) const
 
virtual TDataSetLast () const
 Return the last object in the list. Returns 0 when list is empty.
 
virtual void ls (Option_t *option="") const
 
virtual void ls (Int_t depth) const
 
void Mark ()
 
void UnMark ()
 
void MarkAll ()
 Mark all members of this dataset.
 
void UnMarkAll ()
 UnMark all members of this dataset.
 
void InvertAllMarks ()
 Invert mark bit for all members of this dataset.
 
void Mark (UInt_t flag, EBitOpt reset=kSet)
 
virtual TDataSetNext () const
 
virtual TDataSetPrev () const
 
virtual void Update ()
 
virtual void Update (TDataSet *set, UInt_t opt=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static TDataSetGetMainSet ()
 return pointer to the main dataset
 
static TDataSetinstance ()
 

Protected Member Functions

virtual void SetMother (TObject *mother)
 
 TDataSet (const char *name, const char *title)
 
void AddMain (TDataSet *set)
 add data set to main data set
 
TDataSetGetRealParent ()
 return real parent
 
void MakeCollection ()
 Create the internal container at once if any.
 

Static Protected Member Functions

static EDataSetPass SortIt (TDataSet *ds)
 
static EDataSetPass SortIt (TDataSet *ds, void *user)
 

Protected Attributes

TDataSetfParent
 
TSeqCollection * fList
 

Static Protected Attributes

static TDataSetfgMainSet = &mainSet
 

Friends

class TDataSetIter
 

Detailed Description

Definition at line 34 of file TDataSet.h.

Constructor & Destructor Documentation

TDataSet::TDataSet ( const TDataSet pattern,
EDataSetPass  iopt = kAll 
)

Creates TDataSet (clone) with a topology similar with TDataSet *pattern

Parameters:

pattern - the pattern dataset iopt = kStruct - clone only my structural links kAll - clone all links kRefs - clone only refs kMarked - clone marked (not implemented yet) only

All new-created sets become the structural ones anyway.

std::cout << "ctor for " << GetName() << " - " << GetTitle() << std::endl;

Definition at line 188 of file TDataSet.cxx.

References Clone().

Member Function Documentation

void TDataSet::AddAt ( TDataSet dataset,
Int_t  idx = 0 
)
virtual

Add TDataSet object at the "idx" position in ds or at the end of the dataset The final result is defined by either TList::AddAt or TObjArray::AddAt methods

Reimplemented in TTable, TChair, and TTableDescriptor.

Definition at line 235 of file TDataSet.cxx.

References GetRealParent(), MakeCollection(), and SetParent().

Referenced by TChair::AddAt(), and TTable::AddAt().

void TDataSet::AddAtAndExpand ( TDataSet dataset,
Int_t  idx = 0 
)
virtual

!!!! Under construction !!!!! Add TDataSet object at the "idx" position in ds or at the end of the dataset The final result is defined by either TList::AddAt or TObjArray::AddAt methods

Definition at line 254 of file TDataSet.cxx.

References GetRealParent(), MakeCollection(), and SetParent().

Referenced by TTableDescriptor::AddAt().

void TDataSet::Delete ( Option_t *  opt = "")
virtual

Delete - deletes the list of the TDataSet objects and all "Structural Members" as well This method doesn't affect the "Associated Members"

Reimplemented in TTable, and TObjectSet.

Definition at line 320 of file TDataSet.cxx.

Referenced by StTreeMaker::Clear(), StMaker::Clear(), TObjectSet::Delete(), TTable::Delete(), St_pythia_Maker::Make(), and ~TDataSet().

TDataSet * TDataSet::Find ( const char *  path) const
virtual
TDataSet * TDataSet::FindByName ( const char *  name,
const char *  path = "",
Option_t *  opt = "" 
) const
virtual

Full description see: TDataSetIter::Find

Note. This is method is quite expansive. --— It is done to simplify the user's code when one wants to find ONLY object. If you need to find more then 1 object in this dataset, regard using TDataSetIter class yourself.

Definition at line 378 of file TDataSet.cxx.

References TDataSetIter::FindByName().

Referenced by St_geant_Maker::AddHits(), and TTableDescriptor::MakeCommentField().

TDataSet * TDataSet::FindByTitle ( const char *  title,
const char *  path = "",
Option_t *  opt = "" 
) const
virtual

Full description see: TDataSetIter::Find

Note. This method is quite expansive. --— It is done to simplify the user's code when one wants to find ONLY object. If you need to find more then 1 object in this dataset, regard using TDataSetIter class yourself.

Definition at line 394 of file TDataSet.cxx.

References TDataSetIter::FindByTitle().

TDataSet * TDataSet::Instance ( ) const
virtual

apply the class default ctor to instantiate a new object of the same kind. This is a base method to be overriden by the classes derived from TDataSet (to support TDataSetIter::Mkdir for example)

Reimplemented in TObjectSet, and StTrackChair.

Definition at line 546 of file TDataSet.cxx.

Referenced by TDataSetIter::Find(), and StTrackChair::Instance().

Bool_t TDataSet::IsThisDir ( const char *  dirname,
int  len = -1,
int  ignorecase = 0 
) const
virtual

Compare the name of the TDataSet with "dirname" ignorercase flags indicates whether the comparision is case sensitive

Definition at line 555 of file TDataSet.cxx.

Referenced by Update().

void TDataSet::ls ( Option_t *  option = "") const
virtual
                                                           //

ls(Option_t <em>option) // // option - defines the path to be listed // = "</em>" - means print all levels // //

Reimplemented in TChair.

Definition at line 495 of file TDataSet.cxx.

References ls().

Referenced by TDataSetIter::Dir(), StValiSet::ls(), TChair::ls(), TDataSetIter::Ls(), ls(), StFmsOfflineQaMaker::Make(), and StEEmcRawMapMaker::Make().

void TDataSet::ls ( Int_t  depth) const
virtual
                                                           //

ls(Int_t depth) // // Prints the list of the this TDataSet. // // Parameter: // ========= // Int_t depth >0 the number of levels to be printed // =0 all levels will be printed // No par - ls() prints only level out // //

Reimplemented in TChair, and StValiSet.

Definition at line 526 of file TDataSet.cxx.

References ls(), and PrintContents().

TDataSet * TDataSet::Next ( ) const
virtual

Return the object next to this one in the parent structure This convinient but time-consuming. Don't use it in the inner loops

Definition at line 447 of file TDataSet.cxx.

Referenced by StarPrimaryMaker::Finish().

TDataSet::EDataSetPass TDataSet::Pass ( EDataSetPass(*)(TDataSet *)  callback,
Int_t  depth = 0 
)
virtual
                                                            //

Pass (callback,depth) // // Calls callback(this) for all datasets those recursively // // Parameter: // ========= // Int_t depth >0 the number of levels to be passed // =0 all levels will be passed // // Return (this value mast be returned by the user's callback): // ====== // kContinue - continue passing // kPrune - stop passing the current branch, go to the next one// kUp - stop passing, leave the current branch, // return to previous level and continue // kStop - stop passing, leave all braches // //

Definition at line 689 of file TDataSet.cxx.

References Pass().

Referenced by Pass().

TDataSet::EDataSetPass TDataSet::Pass ( EDataSetPass(*)(TDataSet *, void *)  callback,
void *  user,
Int_t  depth = 0 
)
virtual
                                                            //

Pass (callback,user,depth) // // Calls callback(this,user) for all datasets those recursively // // Parameter: // ========= // Int_t depth >0 the number of levels to be passed // =0 all levels will be passed // // Return (this value mast be returned by the user's callback): // ====== // kContinue - continue passing // kPrune - stop passing the current branch, go to the next one// kUp - stop passing, leave the current branch, // return to previous level and continue // kStop - stop passing, leave all braches // //

Definition at line 730 of file TDataSet.cxx.

References Pass().

TDataSet * TDataSet::Prev ( ) const
virtual

Return the object that is previous to this one in the parent structure This convinient but time-consuming. Don't use it in the inner loops

Definition at line 464 of file TDataSet.cxx.

void TDataSet::PrintContents ( Option_t *  opt = "") const
virtual

Callback method to complete ls() method recursive loop This is to allow to sepoarate navigation and the custom invormation in the derived classes (see; TTable::PrintContents for example

Reimplemented in TTable.

Definition at line 618 of file TDataSet.cxx.

References Path().

Referenced by ls(), and TTable::PrintContents().

Int_t TDataSet::Purge ( Option_t *  opt = "")
virtual

Purge - deletes all "dummy" "Structural Members" those are not ended up with some dataset with data inside (those return HasData() = 0)

Purge does affect only the "Structural Members" and doesn't "Associated" ones

Reimplemented in TTable, and TChair.

Definition at line 758 of file TDataSet.cxx.

References Purge().

Referenced by Purge(), and TTable::Purge().

TDataSet * TDataSet::RemoveAt ( Int_t  idx)
virtual

Remove object from the "idx" cell of this set and return the pointer to the removed object if any

Definition at line 656 of file TDataSet.cxx.

References SetParent().

void TDataSet::SetParent ( TDataSet parent = 0)
virtual

Break the "parent" relationship with the current object parent if present parent != 0 Makes this object the "Structural Member" of the "parent" dataset = 0 Makes this object the "pure Associator", i.e it makes this object the "Structural Member" of NO other TDataSet

Definition at line 784 of file TDataSet.cxx.

Referenced by AddAt(), AddAtAndExpand(), AddFirst(), AddLast(), Remove(), and RemoveAt().

void TDataSet::SetWrite ( )
virtual

One should not use this method but TDataSet::Write instead This method os left here for the sake of the backward compatibility To Write object first we should temporary break the the backward fParent pointer (otherwise ROOT follows this links and will pull fParent out too.

Reimplemented in StStrangeMuDstMaker.

Definition at line 797 of file TDataSet.cxx.

References Write().

void TDataSet::Shunt ( TDataSet newParent = 0)
virtual

Remove the object from the original and add it to dataset TDataSet dataset != 0 - Make this object the "Structural Member" of "dataset" = 0 - Make this object "Orphan"

Definition at line 810 of file TDataSet.cxx.

References Remove().

Referenced by StarPrimaryMaker::AddFilter(), StHistCollectorMaker::Make(), TDataSetIter::Shunt(), Update(), and ~TDataSet().

void TDataSet::Update ( )
virtual

Update()

Recursively updates all tables for all nested datasets in inverse order

Reimplemented in TTable, and TChair.

Definition at line 864 of file TDataSet.cxx.

References Update().

Referenced by Update(), and TTable::Update().

void TDataSet::Update ( TDataSet set,
UInt_t  opt = 0 
)
virtual

Update this TDataSet with "set"

ATTENTION !!!

This method changes the parent relationships of the input "set"

Reimplemented in TTable, and TChair.

Definition at line 825 of file TDataSet.cxx.

References IsThisDir(), Shunt(), and Update().

Int_t TDataSet::Write ( const char *  name = 0,
Int_t  option = 0,
Int_t  bufsize = 0 
)
virtual

To Write object first we should temporary break the the backward fParent pointer (otherwise ROOT follows this links and will pull fParent out too.

Definition at line 893 of file TDataSet.cxx.

Referenced by StFgtGenAVEMaker::Finish(), StarPrimaryMaker::Finish(), StiDetectorVolume::SaveGeometry(), and SetWrite().

Int_t TDataSet::Write ( const char *  name = 0,
Int_t  option = 0,
Int_t  bufsize = 0 
) const
virtual

To Write object first we should temporary break the the backward fParent pointer (otherwise ROOT follows this links and will pull fParent out too.

Definition at line 909 of file TDataSet.cxx.


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