ROOT version 4.00/08 Release Notes

The ROOT Team is pleased to announce the release of ROOT version 4.00/08.

This new, backward compatible, version has major enhancements described below.

Binaries for all supported platforms are available at:

      http://root.cern.ch/root/Version400.html
Versions for AFS have also been updated. See the list of supported platforms:
      http://root.cern.ch/root/AFS.html
Both links are reachable via the download page. Note that with this release, we are supporting binaries for more platforms/compilers.

A new version of the USERS GUIDE is available at:

      http://root.cern.ch/root/doc/RootDoc.html
Individual pdf files corresponding to each chapter can be downloaded separately.

For more information, see:

      http://root.cern.ch
Ilka Antcheva,
Maarten Ballintijn,
Bertrand Bellenot,
Rene Brun,
Philippe Canal,
Olivier Couet,
Valeri Fine,
Gerri Ganis,
Andrei Gheata,
Masaharu Goto,
Eddy Offermann,
Valeriy Onuchin,
Fons Rademakers

New Features in the Input/Output System

Support for large files above 2 GBytes.

The implementation of this new feature has required changes in many places. The files produced by this new version can still be read by old ROOT versions if their size if smaller than 2 GBytes. And obviously, the new version can digest old ROOT files. Note that when creating a Tree, the default maximum size for a Tree is set to 1.9 GBytes. You can change this default value by calling:
        TTree::SetMaxTreeSize(Long64_t maxsize)

Automatic schema evolution for foreign classes.

Classes non deriving from TObject and not instrumented with a ClassDef statement benefit from the Automatic Schema Evolution system. Because the class version number is missing, the class checksum is used to recognize changes in the class schema.

New data type Double32_t (double in memory, 32 bits in file).

In memory a Double32_t is like a Double_t (8 bytes). When written to a file, the type is converted to a Float_t 4 bytes. The newdata type is accepted as a simple variable, as a fixed length array or a variable length array, like:
      Double32_t  fPt:
      Double32_t  fVertex[3];
      Int_t       fNtracks;
      Double32_t *fPx;  //[fNtracks]
The new data type is supported in all I/O modes (TKey or TTree).

The automatic schema evolution algorithm accepts this new type. For example a class in a file containing a Double_t data member can be read by a new class where the member is now of type Double32_t and vice-versa.

TDirectory/TFile

New interface in TDirectory/TFile to write/read objects non-deriving from TObject:
   template <class T>  void GetObject(const char* namecycle, T*& ptr) // See TDirectory::Get for information
   virtual Int_t       Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0);
   virtual Int_t       WriteTObject(const TObject *obj, const char *name=0, Option_t *option="");
   template <class T>  Int_t WriteObject(const T* obj, const char* name, Option_t *option="") // see TDirectory::WriteObject or TDirectoryWriteObjectAny for explanation
   virtual Int_t       WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="");
   virtual Int_t       WriteObjectAny(const void *obj, const TClass *cl, const char *name, Option_t *option="");
In particular to save any object (including TObject*) in both compiled code and interpreted code, just do:
       ptrclass *ptr;
       directory->WriteObject(ptr,"name");
To read back an object, the prefered interface for both compiled code and interpreted code for non TObject* is (It also works with TObject*).
       ptrclass *ptr = 0;
       directory->GetObject("name",ptr);

TBuffer

Several member functions are now virtual. Derivation from TBuffer is used by the new class TXMLBuffer (see below). TBuffer now manages a stack of TStreamerInfo filled by IncrementLevel() and DecrementLevel(). TBuffer::GetInfo() now always returns the current TStreamerInfo.

STL

The version number associated with the TClass of an STL container is now always the class version of the class TStreamerInfo. Fixed a backward compatibility problem with STL containers of pointer to a class not inheriting from TObject but with a ClassDef.

TNetFile

Add capability to read directory structures via rootd. This works via the TNetSystem helper class (which derives from TSystem) that is loaded by the plugin manager whenever one tries to access an rfio directory or file. This helper class is used in the actual system class (TUnixSystem, TWinNTSystem).

TArchiveFile and TZIPFile

TArchiveFile is an abstract class that describes an archive file containing multiple sub-files, like a ZIP or TAR archive.

The TZIPFile class describes a ZIP archive file containing multiple sub-files. Typically the sub-files are ROOT files. Notice that the ROOT files should not be compressed when being added to the ZIP file, since ROOT files are normally already compressed. Such a ZIP file should be created like:

       zip -n root multi file1.root file2.root
which creates a ZIP file multi.zip.

A ZIP archive consists of files compressed with the popular ZLIB compression algorithm. The archive format is used among others by PKZip and Info-ZIP. The compression algorithm is also used by GZIP and the PNG graphics standard. The format of the archives is explained briefly below. This class provides an interface to read such archives.

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 and TChain interface will follow shortly.

Auto Loading of Shared Libraries

Support for autoloading libraries when an unknown class is being referenced. The autoloading mechanism reads the files $ROOTSYS/etc/system.rootmap, ~/.rootmap and ./.rootmap (via TEnv) to try to map the unknown class to a library. If the library is found it is loaded and CINT will create the class object. The rootmap files are created with the rlibmap tool when executing "make map". Example: In an interactive session, one can do directly
	TLorentzVector v;
without executing gSystem->Load("libPhysics").

The new method TClass::GetSharedLibs() returns the library containing the code of the class and the libraries it depends on. This information is obtained from TCint and cached in TClass.

XML Driver

New module xml from Sergey Linev (GSI). It is an optional package that can be used to write file.xml instead of file.root. XML files do not have any advantages compared to the normal ROOT files, except that the information in these files can be edited via a normal editor. The main motivation for this new format is to facilitate the communication with other non ROOT applications. Currently writing and reading XML files is limited to ROOT applications. It is our intention to develop a simple reader independent of the ROOT libraries that could be used as an example for real applications.

The XML format should be used only for small data volumes, typically histogram files, pictures, geometries, calibrations. The XML file is built in memory before being dumped to disk.

Like for normal ROOT files, XML files use the same I/O mechanism exploiting the ROOT/CINT dictionary. Any class having a dictionary can be saved in XML format.

This first implementation does not support subdirectories or Trees.

The shared library libRXML.so may be loaded dynamically via gSystem->Load("libRXML"). This library is automatically loaded by the plugin manager as soon as a XML file is created via, e.g.:

       TFile::Open("file.xml","recreate");
TFile::Open() returns a TXMLFile object. When a XML file is open in write mode, one can use the normal TObject::Write() to write an object in the file. An example of a session saving a histogram to a XML file:
       TFile *f = TFile::Open("Example.xml","recreate");
       TH1F *h = new TH1F("h","test",1000,-2,2);
       h->FillRandom("gaus");
       h->Write();
       delete f;
An example of a session reading the histogram from the file:
       TFile *f = TFile::Open("Example.xml");
       TH1F *h = (TH1F*)f->Get("h");
       h->Draw();
A new option in the canvas "File" menu is available to save a TCanvas as a XML file. One can also do
       canvas->Print("Example.xml");

GUI

Many new developments:

Graphic Back-ends

The following main improvements in the low level graphics drivers have been made:

Major Extensions to the Linear Algebra Classes

The matrix/vector class has been re-engineered and the result is a very competitive package both in speed and functionality compared to other widely-used ones like GSL and CLHEP. For instance, matrix inversion has been improved by at least a factor of 3. Nearly full backward compatibility has been achieved, the mayor exception being the internal storage of the matrix, which was column-wise and is now (the more usual in C/C++) row-wise. As a consequence, users who manipulated directly the data-pointer of a non-symmetric matrix (accessed through the now defunct GetElements()), should carefully analyze their code. Linear algebra calculations like equation solving and eigen-value decompositions can now be performed with speed and the accuracy can be monitored.

The test directory contains an extensive stress code of the package, stressLinear.cxx, which is also a good source for code examples. In addition, the tutorial directory contains examples for the many ways to invert a matrix (invertMatrix.C) and solve a linear least-squares problem with the matrix package (solveLinear.C).

A compile option is available (-DCBLAS) which forces the usage of hardware-optimized CBLAS routines at critical positions. For instance on the PowerPC platform, these routines use the AltiVec processor. Speed improvements have been observed for matrices (40x40).

Summary of the main new features:

New Quadratic Programming Package

The linear algebra package is extensively used in a new ROOT package, called Quadp. Quadp can solve the following minimization problem with respect to x:
  minimize    c^T x + ( 1/2 ) x^T * Q x
  subject to                      A x  = b
                          clo <=  C x <= cup
                          xlo <=    x <= xup
where Q, A and C are matrices and the other are vectors. The only requirements on these elements is that Q is positive semidefinite and at least one x-component is bound on at least one side. A detailed description of this subject can be found in the on-line book by Robert vanderBei at http://www.princeton.edu/~rvdb/LPbook

The implementation is mostly based on the package OOQP by Mike Gertz and Steve Right, http://www.cs.wisc.edu/~swright/ooqp. Here extensive documentation about the implementation details can be found.

A very simple application would be to find a point in a space, bound by many surfaces, which has the shortest distance to a some point outside this bound region. However, the package has been setup the handle much larger problems with up to hundreds of variables. Depending on the structure of the problem, two different formulations can be used: TQpProbDens, for dense matrices and TQpProbSparse, for sparse ones. Furthermore, the user can then choose between two solving algorithms: TMehrotraSolver or TGondzioSolver.

In the tutorial directory the usage of Quadp is shown in great detail for a financial application: optimization of a stock portfolio. In addition, the test directory contains a stress test, QpRandomDriver.cxx. Here, the user can specify the number of free variables, equality and inequality constrains and after randomly generating a solution vector, the other elements of problem are made. Quadp's solution is then compared with the original solution vector.

New Functions in TMath

Mean, Geometric Mean, Median, RMS

   static Double_t  Mean(Int_t n, const Short_t *a,const Double_t *w=0);
   static Double_t  Mean(Int_t n, const Int_t *a,const Double_t *w=0);
   static Double_t  Mean(Int_t n, const Float_t *a,const Double_t *w=0);
   static Double_t  Mean(Int_t n, const Double_t *a,const Double_t *w=0);
   static Double_t  Mean(Int_t n, const Long_t *a,const Double_t *w=0);
   static Double_t  Mean(Int_t n, const Long64_t *a,const Double_t *w=0);
   static Double_t  GeomMean(Int_t n, const Short_t *a);
   static Double_t  GeomMean(Int_t n, const Int_t *a);
   static Double_t  GeomMean(Int_t n, const Float_t *a);
   static Double_t  GeomMean(Int_t n, const Double_t *a);
   static Double_t  GeomMean(Int_t n, const Long_t *a);
   static Double_t  GeomMean(Int_t n, const Long64_t *a);
   static Short_t   Median(Int_t n, const Short_t *a, const Double_t *w=0, Int_t *work=0);
   static Int_t     Median(Int_t n, const Int_t *a, const Double_t *w=0, Int_t *work=0);
   static Float_t   Median(Int_t n, const Float_t *a, const Double_t *w=0, Int_t *work=0);
   static Double_t  Median(Int_t n, const Double_t *a, const Double_t *w=0, Int_t *work=0);
   static Long_t    Median(Int_t n, const Long_t *a, const Double_t *w=0, Int_t *work=0);
   static Long64_t  Median(Int_t n, const Long64_t *a, const Double_t *w=0, Int_t *work=0);
   static Double_t  MedianSorted(Int_t n, Double_t *a);
   static Double_t  RMS(Int_t n, const Short_t *a);
   static Double_t  RMS(Int_t n, const Int_t *a);
   static Double_t  RMS(Int_t n, const Float_t *a);
   static Double_t  RMS(Int_t n, const Double_t *a);
   static Double_t  RMS(Int_t n, const Long_t *a);
   static Double_t  RMS(Int_t n, const Long64_t *a);

Sorting

   static void Sort(Int_t n, const Long64_t *a, Int_t *index, Bool_t down=kTRUE);
   static void Sort(Long64_t n, const Long64_t *a, Long64_t *index, Bool_t down=kTRUE);

Advanced

   static Double_t  Erfc(Double_t x);
   static Double_t  ErfInverse(Double_t x);
   static Double_t  ErfcInverse(Double_t x) {return TMath::ErfInverse(1-x);}

Statistics

   static Double_t Beta(Double_t p, Double_t q);
   static Double_t BetaCf(Double_t x, Double_t a, Double_t b);
   static Double_t BetaIncomplete(Double_t x, Double_t a, Double_t b);
   static Double_t Binomial(Int_t n,Int_t k);  // Calculate the binomial coefficient n over k
   static Double_t BinomialI(Double_t p, Int_t n, Int_t k);
   static Double_t FDist(Double_t F, Double_t N, Double_t M);
   static Double_t FDistI(Double_t F, Double_t N, Double_t M);
   static Bool_t   Permute(Int_t n, Int_t *a); // Find permutations
   static Double_t Student(Double_t T, Double_t ndf);
   static Double_t StudentI(Double_t T, Double_t ndf);

Miscellaneous

New functions:
   Binomial()
   Permute()
by F. Carminati. See also the corresponding tutorials binomial.C and permute.C.

New Class TComplex

The TComplex class supports all the arithmetic operators and mathematical functions. See also the new test program ctorture.cxx. By F. Carminati.

New Class TRolke

This class computes confidence intervals for the rate of a Poisson in the presence of background and efficiency with a fully frequentist treatment of the uncertainties in the efficiency and background estimate using the profile likelihood method. By Jan Conrad.

New TTree Features

Add a new data member
       TList *fUserInfo;
and the corresponding getter function
       TList *TTree::GetUserInfo();
With this addition, it is possible to add any user defined object to the Tree that is not depending on the entry number. Without this facility, users were forced to derive from TTree to add their own attributes or objects. By default, the list is not created. The list is created at the first call to GetUserInfo().

Implemented splitting of TClonesArray and vectors which are embedded (as opposed to pointed to) in a base class.

Add a new static function:

       TTree *TTree::MergeTrees(TList *list)
static function merging the Trees in the TList into a new Tree. Trees in the list can be memory or disk-resident trees The new tree is created in the current directory (memory if gROOT). See also new function TTree::Merge().

Proxy Based Selector

This release introduces the implementation of TTree::MakeProxy and of TTree::Draw of a C++ function which is run in a context where the name of the branches can be used as a C++ variable.

In TTree, we added a method MakeProxy and modified the behavior of TTree::Draw. In TTreePlayer we added TTreePlayer::MakeProxy and TTreePlayer::DrawScript.

TTreeProxyGenerator is a new class implementing the generation of the skeleton.

TBranchProxy is the base class of a new hierarchy of classes implementing the indirect access to the branch of a TTree. The main features are:

For example with Event.root:
        Double_t somepx = fTracks.fPx[2];
somepx is updated with the current fPx of the 3rd track.

TTree::Draw() has been updated so that upon seeing:

        tree->Draw("h1analysis.C+","")
        tree->Draw("h1analysis.C+","h1analysisCut.C")
If h1analysis.C (and h1analysisCut.C in the 2nd case) are readable files, the new MakeProxy will be used instead of TTreeFormula. Currently TTreeFormula and 'TBranchProxy' can not be used together.

Both files are expected to be source files which contain at least a free standing function with the signature:

        x_t filename();
and
        y_t cutfilename();
x_t and y_t needs to be type that can convert respectively to a double and a bool (because the code does; if (cutfilename()) htemp->Fill(filename());

The 2 free standing functions are run in a context such that the branch names are available as local variables of the correct (read-only) type.

Note that if you use the same 'variable' twice, it is more efficient to 'cache' the value. For example

        Int_t n = fEventNumber; // Read fEventNumber
        if (n<10 || n>10) { ... }
is more efficient than
        if (fEventNumber<10 || fEventNumber>10)
Also, optionally, the generated selector will also call methods named scriptname_methodname in each of 6 main selector methods if the method scriptname_methodname exist.

Concretely, with the script named h1analysisProxy.C,

  The method         calls the method (if it exist)
  Begin           -> h1analysisProxy_Begin
  SlaveBegin      -> h1analysisProxy_SlaveBegin
  Notify          -> h1analysisProxy_Notify
  Process         -> h1analysisProxy_Proces
  SlaveTerminate  -> h1analysisProxy_SlaveTerminate
  Terminate       -> h1analysisProxy_Terminate
If 'filename' is suffixed with an ACLiC mode, the ACLiC mode is enforced Note that at this time, interpreted mode is not supported and if no ACLiC mode is specified, a '+' is used by default.

The generated script file (currently generatedSel.h but subject to change in a future release) is intentionally not deleted at the end of the processing. Also if the file already exist, it is updated if and only if the new version is different. In particular this means issuing twice in a row:

        tree->Draw("Script.C+");
does not result in a second (useless) compilation.

For example to draw px using the file hsimple.root (generated by the hsimple.C tutorial) just have a hsimple.cxx file:

        double hsimple() {
           return px;
        }
and do:
        new TFile("hsimple.root")
        tree = ntuple
        draw(tree,"hsimple.cxx");
or
        draw(tree,"hsimple.cxx+");
A more complete example has been added to the tutorials directory: h1analysisProxy.cxx , h1analysProxy.h and h1analysisProxyCut.C, which reimplement the selector found in h1analysis.C

Tree Friend Indices

The new class TTreeIndex replaces the previous TTree index code.

The class derives from the abstract interface TVirtualIndex. It provides the same functionality as the previous code, but in addition, it supports more complex cases.

When a Tree friend has a TTreeIndex (created as before via TTree::BuildIndex), the friend tree and the parent Tree do not need to have the same serial numbers. The friend tree may have less or more events.

When getting an entry in the parent tree, the corresponding entry in the friend will be computed via the index. Note that to support this new feature, the parent Tree does not need an index. Only the friend Tree must have an index. See comments in the TTreeIndex constructor.

TTree::BuildIndex() may be used with a major-name only.

Improvements in the TGeo Classes

The following main improvements in the TGeo classes have been made:

New Python and Ruby Language Bindings

PyROOT (an interface between Python and ROOT)

A new package PyRoot by Pere Mato & Wim Lawrijsen (LCG project) is introduced. PyRoot is a Python interface to any class having a CINT dictionary. The installation is currently certified only on Linux with gcc3.2, icc and Windows with VC++ (6 and 7). Python/ROOT tutorials are available in $ROOTSYS/tutorials/*.py. For more information on PyRoot see the HOWTO page.

Ruby (an interface between Ruby and ROOT)

A new package ruby by Elias Athanasopoulos. In a similar way as PyRoot, it is an interface between ROOT and the Ruby interpreter. For more details see: the HowtoRuby page. See also Elias' web site.

Improvements in Existing High Level Classes

Classes TH1, TH2

New method:
       Double_t TH1::Chi2Test(TH1 *h, Option_t *option, Int_t constraint)

Add an optional argument to TH1::GetMinimum and TH1::GetMaximum

       Double_t TH1::GetMinimum(Double_t minval=-FLT_MAX)
The function returns the minimum value of the histograms for bins with a content greater than minval. For example, h->GetMinimum(0) returns the minimum of all bins with non zero contents. Symmetric behaviour for TH1::GetMaximum().

Several improvements in the histogram painter:

Class TH3

Statistics (for mean, rms, etc) are now computed at filling time.

Class TRandom

Add new random generator function:
      void TRandom::Sphere(Double_t &x, Double_t &y, Double_t &z, Double_t xlong)
which generates random vectors, uniformly distributed over the surface of a sphere of given radius.

Classes TGraph, TGraphErrors, TGraph2D and TGraph2DErrors

Changes in TF1

Modify the original algorithm in TF1::Moment and TF1::CentralMoment to use the new C functions TF1_ExpValHelperx and TF1_ExpValHelper instead of the interpreted functions. This removes several limitations. Also initialize the parameters for the helper functions.

Improvements in TAxis/TGaxis

New method:
       virtual void   SetDecimals(Bool_t dot=kTRUE);  // *TOGGLE*
sets the Decimals flag. By default, blank characters are stripped, and then the label is correctly aligned. The dot, if last character of the string, is also stripped, unless this option is specified. One can disable the option by calling axis.SetDecimals(kTRUE).

Improvements in THStack

When a THStack is drawn as a lego plot (option LEGO1), the top of each bin is now drawn with the color of the highest non empty stack element (for that particular bin). If all the stack elements are empty for a given bin, the color of the lowest stack element is used. Previously the top of the bin was always drawn with the color of the highest stack element.

New function in TCutG

New method:
       Double_t TCutG::Integral(TH2 *h, Option_t *option) const
computes the integral of 2-d histogram h for all bins inside the cut. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x and in y.

Class TSpline

New method:
       TSpline::SaveAs()
to generate C++ code for the spline. This code can be used in a non ROOT application.

New PDF Driver via Class TPDF

Generation of pdf files in addition to ps, eps, gif, etc. Option can be selected from the TCanvas "File/Save" menu.

New in PROOF

Support 1d histogramming using TDSet::Draw(), multi dimensional browsing will come in the next release.

Support feedback histograms, i.e. histograms that are periodically fed back to the client to follow the progress of the query.

New performance monitoring framework.

Optimizations in the packetizer code.

New proof.conf keyword "master" and "worker" in place of "node" and "slave" keywords (the old ones remain valid for backward compatibility).

Set shell variable PROOF_SANDBOX to the session directory (i.e. sandbox)), this env var can be used in the package setup scripts.

New the in Authentication Code

Added support for Blowfish encryption for passwords and tokens based on OpenSSL, in addition to the existing RSA encoding. The type of key with highest priority is defined via the "RSA.KeyType" variable in .rootrc (default is Blowfish). The server side decides what to use according to its own availability and the client request."

Support for UsrPwd authentication via /etc/hosts.equiv and/or $HOME/.rhosts.

Make code more robust by using snprintf() (or std::string's) to avoid boundary violations.

Fix problem with Krb5 credential exporting for daemons with superuser privileges; complete cleanup of allocated memory on server side; improved support for non-default principals.

Fix problem with AFS authentication in case shadow passwords are inaccessible to the process.

Support for 'authenticated' sockets: authentication is delegated to TSocket by calling a static method

    CreateAuthSocket()
returning a TSocket*. TSocket is now the only class calling TAuthenticate.

Improvements in Program hadd

hadd is now able to merge files containing histograms and Trees.

New Splash Screen

New splash screen showing an up to date list of authors and contributors. Pop it up via the "About ROOT..." menu item in the Help menu of the canvas or browser and watch the names of the authors scroll by.

New tutorials

New test programs



ROOT page - Class index - Top of the page