-
- Downloads
two new classes to read archive files. TArchiveFile is an abstract class
which uses the plugin manager to load a concrete archive reader. Currently the TZIPFile class provides a ZIP archive reader. One can also imagine a TTARFile to read tar files. We advice however to use ZIP archives since they allow direct access to all its members via a directory structure which is part of the file. The archive file access has been integrated into TFile which also functions as byte reader to access the archive. This has the enormous benefit that archives can be accessed using all the existing remote file access classes, like TNetFile, TRFIOFile, TCastorFile, etc. When creating ZIP files containing ROOT files make sure that the ROOT files are not compressed since normally they are already ZIP compressed. on Linux one can create a ZIP archive doing: zip -n root multi file1.root file2.root file3.root ... which creates the archive multi.zip, with all files ending with .root not compressed. The ROOT files in an archive can be simply accessed like this: TFile *f = TFile::Open("multi.zip#file2.root") or TFile *f = TFile::Open("root://pcsalo/multi.zip#2") where the second form opens the 3rd ROOT file in the archive via rootd. A TFile can also be used to just browse an archive file, like: TFile *f = TFile::Open("multi.zip") f->GetArchive->Print() A TBrowser interface will follow shortly. The core ZIP reading code has been kindly provided by Lassi Tuura. git-svn-id: http://root.cern.ch/svn/root/trunk@9420 27541ba8-7e3a-0410-8455-c3a389f83636
Showing
- base/Module.mk 2 additions, 1 deletionbase/Module.mk
- base/inc/LinkDef3.h 5 additions, 1 deletionbase/inc/LinkDef3.h
- base/inc/TArchiveFile.h 110 additions, 0 deletionsbase/inc/TArchiveFile.h
- base/inc/TFile.h 32 additions, 26 deletionsbase/inc/TFile.h
- base/inc/TZIPFile.h 177 additions, 0 deletionsbase/inc/TZIPFile.h
- base/src/TArchiveFile.cxx 225 additions, 0 deletionsbase/src/TArchiveFile.cxx
- base/src/TFile.cxx 85 additions, 38 deletionsbase/src/TFile.cxx
- base/src/TZIPFile.cxx 513 additions, 0 deletionsbase/src/TZIPFile.cxx
- config/rootrc.in 2 additions, 1 deletionconfig/rootrc.in
- io/inc/TArchiveFile.h 110 additions, 0 deletionsio/inc/TArchiveFile.h
- io/inc/TFile.h 32 additions, 26 deletionsio/inc/TFile.h
- io/inc/TZIPFile.h 177 additions, 0 deletionsio/inc/TZIPFile.h
- io/src/TArchiveFile.cxx 225 additions, 0 deletionsio/src/TArchiveFile.cxx
- io/src/TFile.cxx 85 additions, 38 deletionsio/src/TFile.cxx
- io/src/TZIPFile.cxx 513 additions, 0 deletionsio/src/TZIPFile.cxx
- net/src/TNetFile.cxx 12 additions, 9 deletionsnet/src/TNetFile.cxx
Loading
Please register or sign in to comment