Automatic support for multiple TTreeCache per TFile.
Multiple TTreeCache per TFile for reading are supported by using the existing TTree::SetCacheSize(Long64_t) interface.
In addition, a TTreeCache for a TTree can be added using TFile::SetCacheRead(TFileCacheRead*, TObject*), where the second (optional) argument is a pointer to the TTree. The cache can be removed by setting the pointer to 0. In that case the user will have to take ownership for the cache.
Similarily, a pointer to the TTreeCache for a TTree can be obtained using TFile::GetCacheRead(TObject*).
In TBuffer::Expand, when shrinking the buffer do not shrink below the size of the
data already accumulated in the buffer (i. no less than the value of TBuffer::Length).
In TBranch::SetBasketSize, instead of using the hard minimum of 100, use
100 + the length of the branch name (as 100 is too small to hold the
basket's key information for any branch name larger than 30 characters).
Reading form text file
Reworked TTree::ReadStream and TTree::ReadFile mainly to fix delimited reading of string columns:
TLeaf::ReadValue now takes an optional delimiter argument that is ignored for all but TLeafC. Here, input stops when reading this character, instead of at the first whitespace.
Use that in TTree::ReadStream() to delimit reading of TLeafC.
TTree::ReadStream now tokenizes the row itself, and passes a stringstream containing nothing but the current column to TLeaf::ReadValue.
Separate concepts of number of input line (for communication with user) and number of good lines (as returned).
Fix windows files leaving '\n' in branch names when reading them from the file.
Add error message for TLeaf::ReadValue(), i.e. if ReadValue() is called on a derived class that doesn't implement it.
Updated and clarified the documentation
TEntryList
Add new methods to find the base location of files and to modify it.
This allows to relocate the entry-lists to be able to use them of a
system where the files have a different absolute path.
The most relevant new methods are:
TEntryList::Scan(const char *fn)
Shows the root common paths for the files of the TEntryLists in 'fn'
Relocates all paths starting with 'oldroot' to 'newroot' for the
entry-list 'enlnm' in file 'fn'.
Remove 'protocol+server' from file tagging and matching, i.e. use
only filepath+anchor; in this way a list is valid even after re-staging
of the dataset files, which typically changes the end-point data servers.
Entry-lists created with the full path should still be matched correctly.
Miscellaneous
Repaired the behavior of TTreeCache when the TTree has a dramatic dynamic range with a lots of very small entriesat the beginning and very large entries at the end, the size in bytes of the cluster for the later entries will be very large (because of the cluster size in entries is large!). TTreeCache::FillBuffer was always attempting to load complete clusters not matter the
size (even with the size was larger than 2GB!).
This patch resolves the issue by limiting the amount of memory used to:
The requested size if more than one cluster fits in the cache.
Twice the requested size if at least one basket per branch fits in the cache.
Four time the requested size in the case where the cache can not even hold one basket per branch.
The filling will restart at the next cluster boundary in the case a) and will
restart at the maximum of entry number read in the cache in the case b) and c).
Baskets that are below this boundary and did not fit in the cache will be read
individually.
Repaired the basket flushing frequency when the TTree has already more than one cluster size.
Repaired binning of string histogram generated by TTree::Draw.
Many bug fixes and fix for issues discovery by Coverity, see change log for more details.
In TTree::MakeProxy add proper support for top level stl collection of objects and for stl collection of objects that are 'empty' in the file (and thus we know nothing about its content).
Avoid deficiency in hadd when the resulting TTree is longer than the AutoSave length *and* the TFileMerger needs to handle the input files in more than one pass for example when there is more than 1000 input files or the -n option is passed to hadd.
Fix support for emulated class that derived from an abstract class.
This can happen when reading a file containing an ancient
class layout where the derived class is no longer provided in the
compiled code but the abstract base class is still provided.
It also happens when using schema evolution rules on a class derived
from an abstract base class (in which case the system introduce
implicitly an emulated class deriving from the same base classes
as the evolved from class). To fix the issue, we introduce the TClass::GetStreamerInfoAbstractEmulated
which will return a StreamerInfo representing an emulated version of the
class even if it is loaded.