129 , fEventName(
"event"), fRunNumber(
UInt_t(-1)),fEventNumber(
UInt_t(-1))
130 , fCursorPosition(-1), fOwnTFile(
kFALSE)
155 if (name && name[0]) {
242 return ((
TFileIter*)
this)->SkipObjects(0);
258 const char *
name = 0;
260 if (key) name = key->
GetName();
284 if (key) lenObj = ((
TKey *)key)->GetObjlen();
324 const char *keyName = key->
GetName();
332 && !strcmp(nextkey->
GetName(), keyName)
338 assert(cycle != nextCycle);
340 if (cycle > nextCycle ) {
341 delete listOfKeys->
Remove(lnk);
343 delete listOfKeys->
Remove(lnkThis);
387 while( (*
this != keyNameToFind) &&
SkipObjects() ) {;}
410 Int_t collectionSize = 0;
414 if (0 <= newPos && newPos < collectionSize) {
459 if ( name && name[0] !=
'*') {
465 if (runNumber !=
UInt_t(-1)) {
467 if (thisRunNumber < runNumber)
continue;
468 if (thisRunNumber < runNumber) { key = 0;
break; }
471 if (eventNumber !=
UInt_t(-1)) {
473 if (thisEventNumber < eventNumber)
continue;
474 if (thisEventNumber > eventNumber) {key = 0;
break; }
500 obj = ((
TKey *)key)->ReadObj();
520 TDsKey thisKey(runNumber,eventNum);
561 const char *localName = 0;
562 const char *foreignName = 0;
564 TEnv myMapResource(fileMap);
565 localName = myMapResource.
Defined(localSystemKey) ?
566 myMapResource.
GetValue(localSystemKey,
"") : 0;
567 foreignName = myMapResource.
Defined(mountedFileSystemKey) ?
568 myMapResource.
GetValue(mountedFileSystemKey,
""):0;
570 localName =
"/castor";
571 foreignName =
"rfio:/castor";
573 if (localName && localName[0]
577 newName.
Replace(0,strlen(localName),foreignName);
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
TFileIter * fNestedIterator
virtual ~TFileIter()
TFileIter dtor.
virtual Bool_t IsOpen() const
Check whether the associated ROOT TFile was open and TFile object is healthy.
virtual TList * GetListOfKeys() const
static const char * GetDefaultMapFileName()
TObject * ReadObj(const TKey *key) const
Read the next TObject from for the TDirectory by TKey provided.
virtual TObject * GetObject() const
read the object from TFile defined by the current TKey
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual const char * GetName() const
void SetCursorPosition(Int_t cursorPosition)
The TEnv class reads config files, by default named .rootrc.
static const char * GetLocalFileNameKey()
static const char * GetResourceName()
virtual Bool_t IsSorted() const
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
const char * GetKeyName() const
return the name of the current TKey
virtual Bool_t IsWritable() const
virtual Int_t Write(const char *=0, Int_t=0, Int_t=0)
Write this object to the current directory.
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" .
virtual Int_t TotalKeys() const
The total number of the TKey keys in the current TDirectory only Usually this means the total number ...
TKey * GetCurrentKey() const
return the pointer to the current TKey
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
Int_t GetObjlen() const
Returns the uncompressed length of the current object.
const Bool_t kIterForward
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 th...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
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.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual void SetName(const char *name)
virtual TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
R__EXTERN TSystem * gSystem
Bool_t Defined(const char *name) const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual UInt_t EventNumber() const
void Initialize()
to be documented
virtual void Reset()
Reset the status of the iterator.
virtual TObjLink * FirstLink() const
static const char * GetForeignFileSystemKey()
Describe directory structure in memory.
Wrapper around a TObject so it can be stored in a TList.
virtual Option_t * GetOption() const
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 it...
virtual TString GetKey() const
to be documented
Mother of all ROOT objects.
TObject * GetObject() const
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...
void Reset()
Reset list iterator.
virtual TObjLink * LastLink() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
virtual Int_t GetDepth() const
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories ...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
static void PurgeKeys(TList *listOfKeys)
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first...
virtual void SetKey(const char *key)
to be documented
TKey * NextEventKey(UInt_t eventNumber=UInt_t(-1), UInt_t runNumber=UInt_t(-1), const char *name="*")
Int_t GetCompressionSettings() const
virtual const char * GetTitle() const
Returns title of object.
virtual UInt_t RunNumber() const