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)
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;
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) {
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);
const Bool_t kIterForward
R__EXTERN TSystem * gSystem
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Describe directory structure in memory.
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
virtual Bool_t IsWritable() const
virtual TList * GetListOfKeys() const
virtual Int_t Write(const char *=0, Int_t=0, Int_t=0)
Write this object to the current directory.
virtual const char * GetName() const
virtual UInt_t EventNumber() const
virtual TString GetKey() const
to be documented
virtual void SetKey(const char *key)
to be documented
virtual UInt_t RunNumber() const
virtual void SetName(const char *name)
The TEnv class reads config files, by default named .rootrc.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Bool_t Defined(const char *name) const
static void PurgeKeys(TList *listOfKeys)
Remove the TKey duplication, leave the keys with highest cycle number only Sort if first.
virtual TObject * GetObject() const
read the object from TFile defined by the current TKey
TFileIter * fNestedIterator
void SetCursorPosition(Int_t cursorPosition)
virtual ~TFileIter()
TFileIter dtor.
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" .
static const char * GetResourceName()
virtual Bool_t IsOpen() const
Check whether the associated ROOT TFile was open and TFile object is healthy.
TKey * GetCurrentKey() const
return the pointer to the current TKey
virtual Int_t TotalKeys() const
The total number of the TKey keys in the current TDirectory only Usually this means the total number ...
static const char * GetLocalFileNameKey()
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.
static const char * GetForeignFileSystemKey()
const char * GetKeyName() const
return the name of the current TKey
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...
void Initialize()
to be documented
virtual void Reset()
Reset the status of the iterator.
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.
static TString MapName(const char *name, const char *localSystemKey=0, const char *mountedFileSystemKey=0)
virtual Int_t GetDepth() const
return the current number of the nested subdirectroies; = 0 - means there is no subdirectories
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.
virtual TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
Int_t GetObjlen() const
Returns the uncompressed length of the current object.
static const char * GetDefaultMapFileName()
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Int_t GetCompressionSettings() const
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Short_t GetCycle() const
Return cycle number associated to this key.
void Reset()
Reset list iterator.
virtual TObjLink * LastLink() const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObjLink * FirstLink() const
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
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 * GetName() const
Returns name of object.
virtual Option_t * GetOption() const
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual Bool_t IsSorted() const
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.