129 , fEventName("event"), fRunNumber(
UInt_t(-1)),fEventNumber(UInt_t(-1))
130 , fCursorPosition(-1), fOwnTFile(
kFALSE)
139 , fRootFile(directory)
140 , fEventName(
"event"), fRunNumber(
UInt_t(-1)),fEventNumber(
UInt_t(-1))
141 , fCursorPosition(-1), fOwnTFile(
kFALSE)
150 ,
Int_t compress,
Int_t ) : fNestedIterator(0)
152 ,fEventName(
"event"), fRunNumber(
UInt_t(-1)) ,fEventNumber(
UInt_t(-1))
153 ,fCursorPosition(-1), fOwnTFile(
kFALSE)
155 if (name && name[0]) {
173 ,fRootFile(dst.fRootFile),fEventName(dst.fEventName), fRunNumber(dst.fRunNumber)
174 ,fEventNumber(dst.fRunNumber),
175 fCursorPosition(-1), fOwnTFile(dst.fOwnTFile)
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 Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual const char * GetTitle() const
Returns title of object.
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 IsSorted() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TList * GetListOfKeys() const
static const char * GetDefaultMapFileName()
virtual Int_t GetDepth() const
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories ...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Short_t GetCycle() const
Return cycle number associated to this key.
void SetCursorPosition(Int_t cursorPosition)
const char * GetKeyName() const
return the name of the current TKey
The TEnv class reads config files, by default named .rootrc.
static const char * GetLocalFileNameKey()
static const char * GetResourceName()
virtual const char * GetName() const
TKey * GetCurrentKey() const
return the pointer to the current TKey
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TObject * ReadObj(const TKey *key) const
Read the next TObject from for the TDirectory by TKey provided.
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.
virtual Int_t Write(const char *=0, Int_t=0, Int_t=0)
Write this object to the current directory.
virtual UInt_t EventNumber() const
virtual TObjLink * LastLink() const
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 void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
virtual Option_t * GetOption() const
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.
ClassImp(TFileIter) TFileIter
Create iterator over all objects from the TFile provided.
virtual void SetName(const char *name)
virtual TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
void Initialize(Bool_t useTMVAStyle=kTRUE)
R__EXTERN TSystem * gSystem
virtual TObject * GetObject() const
read the object from TFile defined by the current TKey
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
TObject * GetObject() const
virtual TString GetKey() const
to be documented
void Initialize()
to be documented
virtual const char * GetName() const
Returns name of object.
virtual Bool_t IsOpen() const
Check whether the associated ROOT TFile was open and TFile object is healthy.
virtual TObjLink * FirstLink() const
virtual Int_t TotalKeys() const
The total number of the TKey keys in the current TDirectory only Usually this means the total number ...
virtual void Reset()
Reset the status of the iterator.
Int_t GetCompressionSettings() const
static const char * GetForeignFileSystemKey()
virtual Int_t GetSize() const
virtual const char * GetName() const
Returns name of object.
Describe directory structure in memory.
Wrapper around a TObject so it can be stored in a TList.
virtual UInt_t RunNumber() 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...
Mother of all ROOT objects.
Bool_t Defined(const char *name)
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...
virtual Bool_t IsWritable() const
void Reset()
Reset list iterator.
static void PurgeKeys(TList *listOfKeys)
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first...
Int_t GetObjlen() const
Returns the uncompressed length of the current object.
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="*")