ROOT 6.10/09 Reference Guide |
Definition at line 53 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) | |
Create iterator over all objects from the TFile provided. More... | |
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 |
TKey * | GetCurrentKey () const |
return the pointer to the current TKey More... | |
virtual Int_t | GetDepth () const |
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories More... | |
const char * | GetKeyName () const |
return the name of the current TKey More... | |
virtual TObject * | GetObject () const |
read the object from TFile defined by the current TKey More... | |
Int_t | GetObjlen () const |
Returns the uncompressed length of the current object. More... | |
virtual const TDirectory * | GetTDirectory () const |
virtual const TFile * | GetTFile () const |
virtual Bool_t | IsOpen () const |
Check whether the associated ROOT TFile was open and TFile object is healthy. More... | |
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 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... | |
operator const char * () const | |
operator const TDirectory * () const | |
operator const TFile * () const | |
operator int () const | |
int | operator!= (const char *name) const |
TObject * | operator() (Int_t nSkip) |
TObject * | operator() () |
TObject * | operator* () const |
Return current object or nullptr. More... | |
TFileIter & | operator++ () |
TFileIter & | operator+= (Int_t shift) |
TFileIter & | operator-- () |
TFileIter & | operator-= (Int_t shift) |
TFileIter & | operator= (Int_t cursorPosition) |
TFileIter & | operator= (const char *keyNameToFind) |
int | operator== (const char *name) const |
virtual void | Reset () |
Reset the status of the iterator. More... | |
virtual void | Rewind () |
void | SetCursorPosition (Int_t cursorPosition) |
void | SetCursorPosition (const char *keyNameToFind) |
Find the key by the name provided. 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 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... | |
Public Member Functions inherited from TListIter | |
TListIter (const TList *l, Bool_t dir=kIterForward) | |
Create a new list iterator. More... | |
TListIter (const TListIter &iter) | |
Copy ctor. More... | |
~TListIter () | |
const TCollection * | GetCollection () const |
Option_t * | GetOption () const |
Returns the object option stored in the list. More... | |
Bool_t | operator!= (const TListIter &aIter) const |
This operator compares two TListIter objects. More... | |
TListIter & | operator= (const TListIter &rhs) |
Overloaded assignment operator. More... | |
void | SetOption (Option_t *option) |
Sets the object option stored in the list. More... | |
Public Member Functions inherited from TIterator | |
virtual | ~TIterator () |
TObject * | operator() () |
Bool_t | operator== (const TIterator &other) const |
Static Public Member Functions | |
static const char * | GetDefaultMapFileName () |
static const char * | GetForeignFileSystemKey () |
static const char * | GetLocalFileNameKey () |
static const char * | GetResourceName () |
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 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... | |
TKey * | NextEventKey (UInt_t eventNumber=UInt_t(-1), UInt_t runNumber=UInt_t(-1), const char *name="*") |
TObject * | ReadObj (const TKey *key) const |
Read the next TObject from for the TDirectory by TKey provided. More... | |
Protected Member Functions inherited from TListIter | |
TListIter () | |
Protected Member Functions inherited from TIterator | |
TIterator () | |
TIterator (const TIterator &) | |
Protected Attributes | |
Int_t | fCursorPosition |
TString | fEventName |
UInt_t | fEventNumber |
Bool_t | fOwnTFile |
TDirectory * | fRootFile |
UInt_t | fRunNumber |
Protected Attributes inherited from TListIter | |
TObjLink * | fCurCursor |
TObjLink * | fCursor |
Bool_t | fDirection |
const TList * | fList |
Bool_t | fStarted |
Private Member Functions | |
virtual Bool_t | operator!= (const TIterator &it) const |
This operator compares two TIterator objects. More... | |
virtual TIterator & | operator= (const TIterator &) |
The inner TFidrectory interator;. More... | |
Private Attributes | |
TFileIter * | fNestedIterator |
#include <TFileIter.h>
TFileIter::TFileIter | ( | TFile * | file = 0 | ) |
Create iterator over all objects from the TFile provided.
Definition at line 127 of file TFileIter.cxx.
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 145 of file TFileIter.h.
TKey * TFileIter::GetCurrentKey | ( | ) | const |
return the pointer to the current TKey
Definition at line 240 of file TFileIter.cxx.
|
inlinestatic |
Definition at line 138 of file TFileIter.h.
|
virtual |
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories
Definition at line 248 of file TFileIter.cxx.
|
inlinestatic |
Definition at line 142 of file TFileIter.h.
const char * TFileIter::GetKeyName | ( | ) | const |
return the name of the current TKey
Definition at line 256 of file TFileIter.cxx.
|
inlinestatic |
Definition at line 140 of file TFileIter.h.
|
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.
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 136 of file TFileIter.h.
|
inlinevirtual |
Definition at line 154 of file TFileIter.h.
|
inlinevirtual |
Definition at line 152 of file TFileIter.h.
|
protected |
to be documented
Definition at line 211 of file TFileIter.cxx.
|
virtual |
Check whether the associated ROOT TFile was open and TFile object is healthy.
Definition at line 226 of file TFileIter.cxx.
|
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.
|
inlinevirtual |
Return next object in the list. Returns 0 when no more objects in list.
Reimplemented from TListIter.
Definition at line 158 of file TFileIter.h.
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.
|
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 221 of file TFileIter.h.
|
inline |
Definition at line 196 of file TFileIter.h.
|
inline |
Definition at line 200 of file TFileIter.h.
|
inline |
Definition at line 218 of file TFileIter.h.
|
inlineprivatevirtual |
This operator compares two TIterator objects.
Reimplemented from TListIter.
Definition at line 60 of file TFileIter.h.
|
inline |
Definition at line 231 of file TFileIter.h.
Definition at line 237 of file TFileIter.h.
|
inline |
Definition at line 235 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 215 of file TFileIter.h.
|
inline |
Definition at line 209 of file TFileIter.h.
Definition at line 203 of file TFileIter.h.
|
inline |
Definition at line 212 of file TFileIter.h.
Definition at line 206 of file TFileIter.h.
The inner TFidrectory interator;.
Reimplemented from TListIter.
Definition at line 59 of file TFileIter.h.
Definition at line 189 of file TFileIter.h.
|
inline |
Definition at line 183 of file TFileIter.h.
|
inline |
Definition at line 227 of file TFileIter.h.
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first.
Definition at line 316 of file TFileIter.cxx.
Read the next TObject from for the TDirectory by TKey provided.
Definition at line 495 of file TFileIter.cxx.
Reset the status of the iterator.
Reimplemented from TListIter.
Definition at line 356 of file TFileIter.cxx.
|
inlinevirtual |
Definition at line 166 of file TFileIter.h.
Definition at line 172 of file TFileIter.h.
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.
|
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 67 of file TFileIter.h.
|
protected |
Definition at line 64 of file TFileIter.h.
|
protected |
Definition at line 66 of file TFileIter.h.
|
private |
Definition at line 57 of file TFileIter.h.
|
protected |
Definition at line 68 of file TFileIter.h.
|
protected |
Definition at line 63 of file TFileIter.h.
|
protected |
Definition at line 65 of file TFileIter.h.