I/O
- Add support for the Chirp filesystem. To configure and build, chirp 3.2.2 must be installed.
- When a TFile object is deleted, make sure that CINT also 'removes' any global variables that might point to it.
- Fix support for the automatic addition to the current directory (for TTree and TH1 for example) in TKey::Read(TObject*).
- In TKey, properly handle error in the I/O routines.
- Explicitly check the validity of the zipped buffer before calling R__unzip, this allow for better error recovery.
- When double checking whether a checksum difference is sustantial, ignore the std namespace. Use CompareContent also in the case of where
the class is versioned but the 'current' streamerInfo has not yet been built.
- Prevent the I/O engine from mistakenly applying schema evolution to the TObject::fBits.
- Make sure that when a streamer info of a base class is used to stream memberwise that is always not-optimized. If the StreamerInfo on file
has the same version as the StreamerInfo in memory but the one on file need to be 'not optimized' while the one in memory is not yet built, make
sure it will not be optimized.
- Fix the reading of empty collection of object when reading without the library.
- If the sequence of actions for streaming member-wise is not created correctly (i.e. where fReadMemberWise was null previously),
we now explicitly issue a Fatal error:
Fatal in <ReadSequence>: The sequence of actions to read AliESDVertex:7 member-wise was not initialized.
aborting
- Add new optional parameter maxbuf to TXMLEngine::ParseFile() allowing the specification of the XML file size to be parsed. This fixes issue #78864.
- Add function TBuffer::AutoExpand to centralize the automatic buffer extension policy. This enable the ability to tweak it later (for example instead of always doubling the size, increasing by only at most 2Mb or take hints from the number of entries already
in a TBasket).
- Migrate the class TFileMerger from the proofplayer library to ROOT I/O library and update hadd to rely on
TFileMerger for everything but the command line argument parsing.
- Fix support for schema evolution from:
TParameter<Int_t>* MyInt; //-> version 1
to
TParameter<Int_t> MyInt; // version 2
- The TZIPFile compressed archive reader now supports the Zip64 format for
archives and file members greater than 2 and 4 GB, respectively.
MakeProject
- Add support for the case when the requested project/files in path that in not under the current directory
- Generate the code/dictonary only for pair type that do not already have a dictionary
Object Merging
We introduced a new explicit interface for providing merging
capability. If a class has a method with the name and
signature:
Long64_t Merge(TCollection *input, TFileMergeInfo*);
it will be used by a TFileMerger (and thus by PROOF) to merge one or more
other objects into the current object. Merge should
return a negative value if the merging failed.
If this method does not exist, the TFileMerger will use
a method with the name and signature:
Long64_t Merge(TCollection *input);
TClass now provides a quick access to these merging
function via TClass::GetMerge. The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetMerge. The wrapper function should have
the signature/type ROOT::MergeFunc_t:
Long64_t (*)(void *thisobj, TCollection *input, TFileMergeInfo*);
We added the new Merge function to TTree and THStack.
We also added the new Merge function to TQCommand as the
existing TQCommand::Merge does not have the right
semantic (in part because TQCommand is a collection).
In TFileMerger, we added a PrintLevel to allow hadd to request
more output than regular TFileMerger.
We removed all hard dependencies of TFileMerger on TH1 and TTree.
(Soft dependencies still exist to be able to disable the
merging of TTrees and to be able to disable the AutoAdd
behavior of TH1).
The object TFileMergeInfo can be used inside the Merge
function to pass information between runs of the Merge
(see below). In particular it contains:
TDirectory *fOutputDirectory; // Target directory where the merged object will be written.
Bool_t fIsFirst; // True if this is the first call to Merge for this series of object.
TString fOptions; // Additional text based option being passed down to customize the merge.
TObject *fUserData; // Place holder to pass extra information. This object will be deleted at the end of each series of objects.
The default in TFileMerger is to call Merge for every object
in the series (i.e the collection has exactly one element) in
order to save memory (by not having all the object in memory
at the same time).
However for histograms, the default is to first load all the
objects and then merge them in one go ; this is customizable
when creating the TFileMerger object.
Asynchronous Prefetching
The prefetching mechanism uses two new classes (TFilePrefetch
and TFPBlock) to prefetch in advance a block of tree entries. There
is a thread which takes care of actually transferring the blocks and
making them available to the main requesting thread. Therefore, the time
spent by the main thread waiting for the data before processing considerably
decreases. Besides the prefetching mechanisms there is also a local
caching option which can be enabled by the user. Both capabilities are
disabled by default and must be explicitly enabled by the user.
In order to enable the prefetching the user must set the rootrc environment
variable TFile.AsyncPrefetching as follows:
gEnv->SetValue("TFile.AsyncPrefetching", 1). Only when the
prefetching is enabled can the user set the local cache directory in
which the file transferred will be saved. For subsequent reads of the
same file the system will use the local copy of the file from cache.
To set up a local cache directory, the client can use the following commands:
TString cachedir="file:/tmp/xcache/";
// or using xrootd on port 2000
// TString cachedir="root://localhost:2000//tmp/xrdcache1/";
gEnv->SetValue("Cache.Directory", cachedir.Data());
The TFilePrefetch class is responsible for actually reading
and storing the requests received from the main thread. It also creates
the working thread which will transfer all the information. Apart from
managing the block requests, it also deals with caching the blocks on
the local machine and retrieving them when necessary.
The TFPBlock class represents the encapsulation of a block
request. It contains the chunks to be prefetched and also serves as a
container for the information read.