ROOT
6.06/09
Reference Guide
|
Definition at line 61 of file TFileIter.h.
Public Member Functions | |
TFileIter (const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0) | |
Open ROOT TFile by the name provided; This TFile is to be deleted by the TFileIter alone. More... | |
TFileIter (TFile *file=0) | |
TFileIter (TDirectory *directory) | |
Create iterator over all objects from the TDirectory provided. More... | |
TFileIter (const TFileIter &) | |
Copy ctor can be used with the "read only" files only. More... | |
virtual | ~TFileIter () |
TFileIter dtor. More... | |
Int_t | CurrentCursorPosition () const |
virtual const TFile * | GetTFile () const |
virtual const TDirectory * | GetTDirectory () const |
virtual Bool_t | IsOpen () const |
Check whether the associated ROOT TFile was open and TFile object is healthy. More... | |
virtual TObject * | NextEventGet (UInt_t eventNumber=UInt_t(-1), UInt_t runNumber=UInt_t(-1), const char *name="*") |
reads, creates and returns the object by TKey name that matches the "name" . More... | |
virtual Int_t | NextEventPut (TObject *obj, UInt_t eventNum, UInt_t runNumber, const char *name=0) |
Create a special TKey name with obj provided and write it out. More... | |
void | SetCursorPosition (Int_t cursorPosition) |
void | SetCursorPosition (const char *keyNameToFind) |
Find the key by the name provided. More... | |
Int_t | GetObjlen () const |
Returns the uncompressed length of the current object. More... | |
virtual Int_t | TotalKeys () const |
The total number of the TKey keys in the current TDirectory only Usually this means the total number of different objects those can be read one by one. More... | |
virtual TKey * | SkipObjects (Int_t nSkip=1) |
Returns the TKey pointer to the nSkip TKey object from the current one nSkip = 0; the state of the iterator is not changed. More... | |
virtual TObject * | GetObject () const |
read the object from TFile defined by the current TKey More... | |
virtual Int_t | GetDepth () const |
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories More... | |
TKey * | GetCurrentKey () const |
return the pointer to the current TKey More... | |
const char * | GetKeyName () const |
return the name of the current TKey More... | |
TFileIter & | operator= (Int_t cursorPosition) |
TFileIter & | operator= (const char *keyNameToFind) |
TFileIter & | operator+= (Int_t shift) |
TFileIter & | operator-= (Int_t shift) |
TFileIter & | operator++ () |
TFileIter & | operator-- () |
TObject * | operator* () const |
Return current object or nullptr. More... | |
operator const char * () const | |
operator const TFile * () const | |
operator const TDirectory * () const | |
operator int () const | |
int | operator== (const char *name) const |
int | operator!= (const char *name) const |
virtual TObject * | Next () |
Return next object in the list. Returns 0 when no more objects in list. More... | |
virtual TObject * | Next (Int_t nSkip) |
return the pointer to the object defined by next TKey This method is not recommended. More... | |
virtual void | Reset () |
Reset the status of the iterator. More... | |
virtual void | Rewind () |
TObject * | operator() (Int_t nSkip) |
TObject * | operator() () |
Public Member Functions inherited from TListIter | |
TListIter (const TList *l, Bool_t dir=kIterForward) | |
TListIter (const TListIter &iter) | |
Copy ctor. More... | |
~TListIter () | |
TListIter & | operator= (const TListIter &rhs) |
Overloaded assignment operator. More... | |
const TCollection * | GetCollection () const |
Option_t * | GetOption () const |
Returns the object option stored in the list. More... | |
void | SetOption (Option_t *option) |
Sets the object option stored in the list. More... | |
Bool_t | operator!= (const TListIter &aIter) const |
This operator compares two TListIter objects. More... | |
Public Member Functions inherited from TIterator | |
virtual | ~TIterator () |
TObject * | operator() () |
Bool_t | operator== (const TIterator &other) const |
Static Public Member Functions | |
static TString | MapName (const char *name, const char *localSystemKey=0, const char *mountedFileSystemKey=0) |
MapName(const char *name, const char *localSystemKey,const char *mountedFileSystemKey)Substitute the logical name with the real one if any More... | |
static const char * | GetResourceName () |
static const char * | GetDefaultMapFileName () |
static const char * | GetLocalFileNameKey () |
static const char * | GetForeignFileSystemKey () |
static void | PurgeKeys (TList *listOfKeys) |
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first. More... | |
Protected Member Functions | |
void | Initialize () |
to be documented More... | |
TObject * | ReadObj (const TKey *key) const |
Read the next TObject from for the TDirectory by TKey provided. More... | |
TKey * | NextEventKey (UInt_t eventNumber=UInt_t(-1), UInt_t runNumber=UInt_t(-1), const char *name="*") |
Protected Member Functions inherited from TListIter | |
TListIter () | |
Protected Member Functions inherited from TIterator | |
TIterator () | |
TIterator (const TIterator &) | |
Protected Attributes | |
TDirectory * | fRootFile |
TString | fEventName |
UInt_t | fRunNumber |
UInt_t | fEventNumber |
Int_t | fCursorPosition |
Bool_t | fOwnTFile |
Protected Attributes inherited from TListIter | |
const TList * | fList |
TObjLink * | fCurCursor |
TObjLink * | fCursor |
Bool_t | fDirection |
Bool_t | fStarted |
Private Member Functions | |
virtual TIterator & | operator= (const TIterator &) |
The inner TFidrectory interator;. More... | |
virtual Bool_t | operator!= (const TIterator &it) const |
This operator compares two TIterator objects. More... | |
Private Attributes | |
TFileIter * | fNestedIterator |
#include <TFileIter.h>
TFileIter::TFileIter | ( | TFile * | file = 0 | ) |
TFileIter::TFileIter | ( | TDirectory * | directory | ) |
Create iterator over all objects from the TDirectory provided.
Definition at line 138 of file TFileIter.cxx.
TFileIter::TFileIter | ( | const TFileIter & | dst | ) |
Copy ctor can be used with the "read only" files only.
the next statement is illegal, spotted by coverity "Dereferencing pointer "this->fRootFile". (Deref happens because this is a virtual function call.) assert(!fRootFile->IsWritable());
Definition at line 171 of file TFileIter.cxx.
|
virtual |
TFileIter dtor.
Definition at line 196 of file TFileIter.cxx.
|
inline |
Definition at line 153 of file TFileIter.h.
Referenced by CurrentCursorPosition().
TKey * TFileIter::GetCurrentKey | ( | ) | const |
return the pointer to the current TKey
Definition at line 240 of file TFileIter.cxx.
Referenced by GetKeyName(), GetObject(), and GetObjlen().
|
inlinestatic |
Definition at line 146 of file TFileIter.h.
Referenced by MapName().
|
virtual |
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories
Definition at line 248 of file TFileIter.cxx.
Referenced by GetDepth().
|
inlinestatic |
Definition at line 150 of file TFileIter.h.
Referenced by MapName().
const char * TFileIter::GetKeyName | ( | ) | const |
return the name of the current TKey
Definition at line 256 of file TFileIter.cxx.
Referenced by operator==().
|
inlinestatic |
Definition at line 148 of file TFileIter.h.
Referenced by MapName().
|
virtual |
read the object from TFile defined by the current TKey
This method does create a new object and it is the end-user code responsibility to take care about this object to avoid memory leak.
Definition at line 273 of file TFileIter.cxx.
Referenced by Next(), and operator*().
Int_t TFileIter::GetObjlen | ( | ) | const |
Returns the uncompressed length of the current object.
Definition at line 280 of file TFileIter.cxx.
|
inlinestatic |
Definition at line 144 of file TFileIter.h.
Referenced by MapName().
|
inlinevirtual |
Definition at line 162 of file TFileIter.h.
Referenced by GetTDirectory(), and GetTFile().
|
inlinevirtual |
Definition at line 160 of file TFileIter.h.
|
protected |
|
virtual |
Check whether the associated ROOT TFile was open and TFile object is healthy.
Definition at line 226 of file TFileIter.cxx.
Referenced by Initialize(), and NextEventPut().
|
static |
add a line into system.rootrc or ~/.rootrc or ./.rootrc
TFileIter.ForeignFileMap mapFile // the name of the file to map the local name to the global file service
If this line is omitted then TFileIter class seeks for the default mapping file in the current directory "io.config"
Definition at line 547 of file TFileIter.cxx.
Referenced by TFileIter().
|
inlinevirtual |
Return next object in the list. Returns 0 when no more objects in list.
Reimplemented from TListIter.
Definition at line 166 of file TFileIter.h.
Referenced by operator()().
return the pointer to the object defined by next TKey This method is not recommended.
It was done for the sake of the compatibility with TListIter
Definition at line 305 of file TFileIter.cxx.
|
virtual |
reads, creates and returns the object by TKey name that matches the "name" .
"runNumber" ." eventNumber" schema Attention: This method does create a new TObject and it is the user code responsibility to take care (delete) this object to avoid memory leak.
Definition at line 487 of file TFileIter.cxx.
|
protected |
Definition at line 443 of file TFileIter.cxx.
Referenced by NextEventGet().
|
virtual |
Create a special TKey name with obj provided and write it out.
Definition at line 515 of file TFileIter.cxx.
|
inline |
Definition at line 229 of file TFileIter.h.
|
inline |
Definition at line 204 of file TFileIter.h.
|
inline |
Definition at line 208 of file TFileIter.h.
|
inline |
Definition at line 226 of file TFileIter.h.
|
inlineprivatevirtual |
This operator compares two TIterator objects.
Reimplemented from TListIter.
Definition at line 68 of file TFileIter.h.
|
inline |
Definition at line 239 of file TFileIter.h.
Definition at line 245 of file TFileIter.h.
|
inline |
Definition at line 243 of file TFileIter.h.
|
inlinevirtual |
Return current object or nullptr.
For backward compatibility reasons we have to provide this default implementation.
Reimplemented from TListIter.
Definition at line 223 of file TFileIter.h.
|
inline |
Definition at line 217 of file TFileIter.h.
Definition at line 211 of file TFileIter.h.
Referenced by operator-=().
|
inline |
Definition at line 220 of file TFileIter.h.
Definition at line 214 of file TFileIter.h.
The inner TFidrectory interator;.
Reimplemented from TListIter.
Definition at line 67 of file TFileIter.h.
Definition at line 197 of file TFileIter.h.
|
inline |
Definition at line 191 of file TFileIter.h.
|
inline |
Definition at line 235 of file TFileIter.h.
Referenced by operator!=().
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first.
Definition at line 316 of file TFileIter.cxx.
Referenced by Reset().
Read the next TObject from for the TDirectory by TKey provided.
Definition at line 495 of file TFileIter.cxx.
Referenced by GetObject(), NextEventGet(), and ReadObj().
Reset the status of the iterator.
Reimplemented from TListIter.
Definition at line 356 of file TFileIter.cxx.
Referenced by Initialize(), NextEventKey(), Rewind(), and SetCursorPosition().
|
inlinevirtual |
Definition at line 174 of file TFileIter.h.
Definition at line 180 of file TFileIter.h.
Referenced by operator=(), and SetCursorPosition().
void TFileIter::SetCursorPosition | ( | const char * | keyNameToFind | ) |
Find the key by the name provided.
Definition at line 384 of file TFileIter.cxx.
Returns the TKey pointer to the nSkip TKey object from the current one nSkip = 0; the state of the iterator is not changed.
nSkip > 0; iterator skips nSkip objects in the container. the direction of the iteration is sign(nSkip)*kIterForward
Returns: TKey that can be used to fetch the object from the TDirectory
Definition at line 401 of file TFileIter.cxx.
Referenced by Next(), NextEventKey(), operator++(), operator+=(), operator--(), SetCursorPosition(), SkipObjects(), and TFileIter().
|
virtual |
The total number of the TKey keys in the current TDirectory only Usually this means the total number of different objects those can be read one by one.
It does NOT count the nested sub-TDirectory. It is too costly and it can be abused.
Definition at line 294 of file TFileIter.cxx.
|
protected |
Definition at line 75 of file TFileIter.h.
Referenced by CurrentCursorPosition(), NextEventKey(), Reset(), SkipObjects(), and TFileIter().
|
protected |
Definition at line 72 of file TFileIter.h.
Referenced by NextEventKey().
|
protected |
Definition at line 74 of file TFileIter.h.
Referenced by NextEventKey().
|
private |
Definition at line 65 of file TFileIter.h.
Referenced by GetDepth(), ReadObj(), Reset(), SkipObjects(), and ~TFileIter().
|
protected |
Definition at line 76 of file TFileIter.h.
Referenced by Initialize(), TFileIter(), and ~TFileIter().
|
protected |
Definition at line 71 of file TFileIter.h.
Referenced by GetTDirectory(), Initialize(), IsOpen(), NextEventPut(), Reset(), TFileIter(), and ~TFileIter().
|
protected |
Definition at line 73 of file TFileIter.h.
Referenced by NextEventKey().