I/O Libraries
TFileCacheRead
- Support for multiple TFileCacheRead per TFile.
Multiple TFileCacheRead per TFile are supported by augmenting the existing TFile::SetCacheRead() function with an optional TObject* argument specifying the owner (i.e. tree) of the cache. This function will assign a TFileCacheRead to a TFile for the given TTree. A cache can be removed by setting the pointer TFileCacheRead to 0.
Similarly, in TFile::GetCacheRead() an optional TObject* argument was added to obtain the TFileCacheRead from a TFile.
In addition to the unassigned TFileCacheRead pointer, TFile will maintain a map of tree specific cache pointers.
Backward compatibility in both functions is handled by making the TObject* argument optional. If it is not specified in the TFile::SetCacheRead() call, only the unassigned TFileCacheRead pointer is updated, otherwise the map and the unassigned cache are updated. In TFile::GetCacheRead(), if an owner is not specified or doesn't exist in the file's cache map, the unassigned cache is returned, unless it is 0 and there is exactly one entry in the cache map.
Distinguish counter for bytes read and read calls for learning phase.
TFileMerger
- Improve efficiency of TFileMerger when merging a single file by doing a TFile::Cp rather than a load/write of the objects.
- In TFileMerger and hadd when objects can not be merged do not overwrite the last object in the set with the first!
- Renable warning about not being able to merge objects in TFileMerger and hadd.
- Fix hadd problem where the incremental merging fails if the TTree are stored in sub-directories.
- Improve the code used for forward compatibility (record the type as TDirectory even-though the class is now TDirectoryFile) by delaying the switching of the class name until it is written (to the buffer). This avoids problem where a TKey is created (by TFile::mkdir) and then immediately used for reading (this happens in the incremental file merger).