## Introduction

ROOT version 6.00/00 has been released on May 30, 2014. It introduces the new Cling C++11 interpreter, replacing CINT that has served ROOT well for many years.

http://root.cern.ch

The following people have contributed to this new version:

Bertrand Bellenot, CERN/SFT,
Dario Berzano, CERN/SFT,
Rene Brun, CERN/SFT,
Ioan Gabriel Bucur, CERN/SFT
Philippe Canal, FNAL,
Cristina Cristescu, CERN/SFT,
Olivier Couet, CERN/SFT,
Kyle Cranmer, NYU, RooStats,
Anders Eie, NTNU,
Gerri Ganis, CERN/SFT,
Andrei Gheata, CERN/Alice,
Wim Lavrijsen, LBNL, PyRoot,
Sergey Linev, GSI, http,
Anna-Pia Lohfink,
Pere Mato, CERN/SFT,
Lorenzo Moneta, CERN/SFT,
Axel Naumann, CERN/SFT,
Danilo Piparo, CERN/SFT,
Timur Pocheptsov, CERN/SFT,
Paul Russo, FNAL,
Joerg Stelzer, DESY/Atlas, TMVA,
Eckhard von Toerne, University Bonn, ATLAS, TMVA,
Vassil Vassilev, CERN/SFT
Wouter Verkerke, NIKHEF/Atlas, RooFit,
Yue Shi Lai, MIT

## Platform Support

Temporarily for version 6.00/00, ROOT has a reduced set of supported platforms. Most notably Windows is not supported until at least 6.02. 6.00/00 supports only

• Linux 32 bit and 64 bit, i32 and x86-64 and x32 (see below).
• OSX 64 bit on x86-64.

More platforms are expected to be available later; the lack of support stems from Cling and Clang/LLVM not being ported to these platforms yet.

To aleviate the pain for Windows users who want to try ROOT 6 we provide a recipe on how to run ROOT 6 in a VM on Windows.

Building ROOT also requires a C++11 compatible compiler, so one needs to either have installed gcc >= 4.8 or Clang >= 3.4. On most lecagy platforms these newer compilers are available via a special install. See the build prerequisites page.

Despite that, an additional platform as been added: the x32 psAPI, called linuxx32gcc. It is a regular x86-64 ABI but with shorter pointers (4 bytes instead of 8). This reduces the addressable memory per process to 4GB - but that is usally sufficient. The advantages are reduced memory consumption (due to the smaller pointers) and increased performance compared to 32 bit applications due to the availability of the 64 bit instructions. The Clang developers mailing list archive contains a good comparison.

To build and run binaries compiled in x32, toolchain support is needed. That is available in the in binutils (2.22), GCC (4.8), glibc (2.16), Linux kernel (3.4) and even GDB (7.5). These versions are not available in regular distributions yet (except for this beta Gentoo distro built in x32); once they are, building and running x86-64 and x32 side-by-side will be possible.

## Build System

ROOT 6.00/00 can be built either using the classic “./configure;make” method or using CMake. The CMake system has been completed for this version and should be functionally equivalent to the classic one. The detailed instructions are available. In upcoming releases the classic method will slowly be deprecated in favor of the CMake one.

## Core Libraries

### Cling vs CINT

Cling follows the C++ standard much more strictly than CINT. In particular some code that used to run with CINT will either issue new warnings or new compilation errors. For example when CINT was parsing Namespace::Symbol it would not only apply the C++ search rules but also search in the outer scopes and for this example could actually return ::Symbol instead of (as Cling now does) issuing a compilation error.

#### Template class names

Cling no longer supports refering to a class template instantiation of a class template that has all default template parameter without the <>. With:

   template <typename T = int> class templt {};

With Cling (and any standard compliant compiler), using *templt<>* is allowed (but *templt* is not).

#### Namespace prefix of template parameters

Given namespace N { class A; template <typename T> class B;}, the name N::B<N::A> is no longer “shortened” to N::B<A>. This affects the forward and backward compatibility of files.

#### Implicit dynamic up-casts

CINT would perform automatic upcasts to derived classes under certain contexts:

   TH1* h1 = hpx
TH1F* h1f = h1;

Cling does not allow this anymore. We might add this feature later if demand exists (ROOT-4802).

#### Using symbols that are only available at runtime: load libFoo; foo()

CINT was processing macros line by line; Cling compiles code. When calling a function (or in general using a symbol) that is provided by a library loaded at runtime, Cling will in some cases report an unresolved symbol:

   #include "Event.h"
new Event();
}

You will currently have to provide a rootmap file for libEvent (which also requires include guards for Event.h). This might get fixed in a later version (ROOT-4691).

#### Using identifiers that are only available at runtime: gROOT->LoadMacro(“foo.h”); foo()

CINT was processing macros line by line; Cling compiles code. During this compilation, Cling will not see identifiers provided by gROOT->LoadMacro(). While this will covered by dynamic scopes, they are currently too limited to handle this. Please #include the header instead.

### TInterpreter

TInterpreter::GetCurrentMacroName() has a slightly different behavior in ROOT 6 than in ROOT 5. In ROOT 5 it was a synonym for __FILE__ (so please use __FILE__ to get the old value); in ROOT 6 it returns the currently executing (.x) source file. For nested execution it returns the innermost one.

The following are no longer supported and are now only issuing error messages:

• Getgvp
• Setgvp
• SetRTLD_NOW
• SetRTLD_LAZY

Use of Setgvp and Getgvp should be looked at carefully as they were use to control the behavior of the multiplexing CINT wrappers that were both wrapper the calls to operator new with and without placement and the constructor (and similarly for operator delete and the destructor). Cling does not support such a multiplexing wrapper and alternatively interface must be used (See TClass::New and TClass::Destructor for example).

The following interfaces are not yet available:

• DeleteVariable

They might be re-implemented in a later version.

### rootcling, rootcint and genreflex

rootcling is the successor to rootcint and it preserves its old commandline arguments and provides more (see help). The executable rootcint still exists but it is just a redirection to rootcling. The following backward incompatibilities are present between rootcint in version 5 and rootcling in version 6:

• rootcling does not support multiline #pragma without a line continuation as rootcint did (rootcint support #pragma link with a line continutation only in ROOT v5.34/02 and above).
• rootcling no longer re-#defines the private and protected keywords to public. In particular this means that code compiled as part of the dictionary no longer has access to protected and private members of a class (except where allowed by the C++ standard).
• rootcling no longer considers a friend declaration to be a declaration for the friended function. In particular this means that rootcling may now issue:
       Error: in this version of ROOT, the option '!' used in a linkdef file
implies the actual existence of customized operators.
The following declaration is now required:
TBuffer &operator<<(TBuffer &,const THit *);

if the operator << declaration is missing.

To steer the parsing done during the execution of rootcling, a new macro: __ROOTCLING__ is now defined during the parsing. The macros __CINT__ and __MAKECINT__ are defined only when looking for #pragma statement.

The genreflex executable is still available, it preserves the same command line options as in version 5 and provides new ones. Old selection XML files are transparently usable by the new implementation. On the other hand some of the new functionalities can be hardly backported to version 5. See genreflex help for all the details about commandline switches and selection files. It is important to note that it is not anymore a python script interfaced to GCCXML but rather a wrapper around rootcling.

In order to specify the classes selection, three methods are available:

1. Selection XML file. This file can be read by both genreflex and rootcling.
3. Selection namespace (also called dictselection). Available both for rootcling and genreflex. See the documentation of the ROOT::Meta::Selection namespace for all the details.

Warning

It is important to note that during the parsing of the header files, rootcint no longer defines __CINT__ and genreflex no longer defines __GCCXML__. This means in particular that data members that were made transient by hiding them from rootcint or genreflex now must be explicitly marked as transient. For rootcint or rootcling use:

   sometype datamember; //! The exclamation mark signals the transientness

and for genreflex

   <class name="edm::Particle" >
<field name="m_calculated" transient="true" />
</class>

or

   <class name="edm::Particle" >
<field name="m_calculated" persistent="false" />
</class>

This new set of executables are responsible also for the generation of pcm files. These are crucial for the functioning of ROOT and must reside in the same directory of the libraries which contain the compiled dictionaries.

### rlibmap

The tools used to generate rootmap files are rootcling and genreflex. The rlibmap tool is not present any more in ROOT starting from release 6.00.00.

### Rootmap files

To enhance the set of functionalities offered by ROOT and its new interpreter, the format of the rootmaps evolved. Rootmap in the old format cannot be produced anymore but only read. The new rootmaps can be still be concatenated. A rootmap file now contains:

• One (or more) section for forward declarations. These are real C++ forward declarations of templates and namespaces. This is needed for Cling to be able to parse templates’ instantiations and for some autoloading functionalities.
• One (or more) libraries sections. These sections describe the ensamble of the autoload keys related to one or more shared libraries. An autoload key can be a class name, a namespace name, a typedef or alias or a header file name.

At ROOT startup, a check is performed on autoload keys. If the same key (which is not a template instantiation) refers to two different libraries (or sets of libraries) a warning is issued. A typical Rootmap file look like:

{ decls }
fwd declaration 1;
fwd declaration 2;
[...]
fwd declaration N;

[ libraryName1 libraryName2 ... ]
class className1
class className2
...
typedef typedefName1
typedef typedefName2
...
...

### TROOT

The list returned by GetListOfTypes is no longer filled when the dictionary are loaded but instead are filled on demand, when the user explicitly (directly or indirectly) request each typedef. In particular this means that

   gROOT->GetListOfTypes()->ls(); // or Print()

no longer prints the list of all available typedef but instead list only the typedefs that have been previously accessed throught the list (plus the builtins types).

### ACliC

ACLiC has the following backward incompatibilities:

• Since rootcling no longer re-#defines the private and protected keyword to public, the code compiled by ACLIC no longer has access to protected and private members of a class (except where allowed by the C++ standard).

### Collection

New collection TListOfTypes that implements on demand creation of the TDataType describing a typedef.

### TUnixSystem

• Simplify Setenv coding.
• Implement Unsetenv using the system function unsetenv.

### TMacOSXSystem

• The file descriptors’ management improved/fixed.

### TColor

• 5 new predefined palettes with 255 colors are available vis gStyle->SetPalette(n):

• n = 51 a Deep Sea palette is used.
• n = 52 a Grey Scale palette is used.
• n = 53 a Dark Body Radiator palette is used.
• n = 54 a two-color hue palette palette is used.(dark blue through neutral gray to bright yellow)
• n = 55 a Rain Bow palette is used.
• Add the optional parameter “alpha” to TColor::SetPalette and TStyle::SetPalette. The default value is 1. (opaque palette). Any value between 0. and 1 define the level of transparency. 0. being fully transparent and 1. fully opaque.

• In SaveAS implement the possibility to save an object as C code independant from ROOT. It is enough to save the object in a file with the extension “.cc”. The code as to save each objet should be implement in each SavePrimitive function like in TF1.

• In SetPalette predefined palettes were redefined even if it was not necessary.

### TAttText

• Mnemonic constants are available:

kHAlignLeft   = 10, kHAlignCenter = 20, kHAlignRight = 30,
kVAlignBottom = 1,  kVAlignCenter = 2,  kVAlignTop   = 3

They allow to write:

object->SetTextAlign(kHAlignLeft+kVAlignTop);
• New method SetTextColorAlpha(ci, alpha) to set the color index ci with a transparency percentage.

### TAttFill

• Provide symbolic values for different styles.
• New method SetFillColorAlpha(ci, alpha) to set the color index ci with a transparency percentage.

### TAttMarker

• New method SetMarkerColorAlpha(ci, alpha) to set the color index ci with a transparency percentage.

### TAttLine

• New method SetLineColorAlpha(ci, alpha) to set the color index ci with a transparency percentage.

### TAttAxis

• SetLabelColor and SetLabelColor have an optional parameter alpha allowing to change the transparency of the axis labels and axis body.

## I/O Libraries

### I/O Behavior change.

#### Classes with custom streamer

Classes for which a Streamer function was externally provided are no longer split; they were split in v5 if the dictionary was generated via rootcint but were not split if the dictionary was generated via genreflex.

Classes with a custom Streamer function and classes with an older, non StreamerInfo based automatic streamer are also no longer split.

To force the splitting of those classes, thus by-passing the custom Streamer, when storing the object in a TTree and in a collection object, use:

       TClass::GetClass(classname)->SetCanSplit(true);

### I/O Schema Checksum

The algorithm used to calculate a single number giving an indication on whether the schema layout has changed (i.e. if two StreamerInfo are equivalent) have been update to

• Use the normalized name for the types (i.e. two different spelling of the same name will lead to the same checksum)
• Take into account the base classes’ checksum in the derived class checksum; this is necessary to properly support base classes during memberwise streaming.

The algorithm that checks whether two StreamerInfo are equal even-though their checksum is different has been significantly enhanced in particular to also check the base classes.

### TFileMerger

• Added possibility to merge only a list of objects/folders from the input files, specified by name,
or to skip them from merging. This is fully integrated with the new PartialMerge(flags) schema.
Usage:
The names of the objects to be merged or skipped have to be specified using the interface:
       TFileMerger::AddObjectNames(const char *names)

This method can be called several times to add object names. Several names can be added with one call separated by single blancs (no blanc at the end). Directory names are accepted, applying the merging selection to all content. Two new options are being supported for partial merging:

       TFileMerger::PartialMerge(flags | kOnlyListed)

This will merge only the objects in the files having the names in the specified list. If a folder is specified, it whole content will be merged

        TFileMerger::PartialMerge(flags | kSkipListed)  

This will skip merging for the specified objects. If a folder is specified, its whole content will be skipped

Important note: The kOnlyListed and kSkipListed flags have to be bitwise OR-ed on top of the merging defaults: kAll | kIncremental (as in the example $ROOTSYS/tutorials/io/mergeSelective.C) ## Networking Libraries A new class TS3WebFile has been introduced. The new class TS3WebFile is an extension of TWebFile and belongs to the net module. The name TS3WebFile reflects better the fact that this solution is intended to be generic to several S3 servers and not limited to Amazon’s, in addition to the fact that it actually extends the capabilities of TWebFile. Compared to the current support of S3 in ROOT (basically the class TAS3File), the modifications include the improvements below: • add support for using HTTPS : you can use different schemas for specifying the underlying transport protocol to use “s3:”, “s3http:”, “s3https:” [“s3” uses HTTPS]. The current schema, namely “as3:”, is supported for backwards compatibility. • extend support for other S3 service providers that do not offer the virtual hosting functionality (currently only Amazon offers this). • support the possibility of specifying user credentials on a per-file basis or for all S3 files via environment variables. • honor the “NOPROXY” option when specified in the constructor. • exploit the capability of the S3 file server to provide partial content responses to multi-range HTTP requests. Here are some examples of usages from the end user perspective:  TFile* f = TFile::Open("s3://s3.amazonaws.com/mybucket/path/to/my/file", "AUTH=<accessKey>:<secretKey> NOPROXY") TFile* f = TFile::Open("s3://s3.amazonaws.com/mybucket/path/to/my/file") // Uses environmental variables for retrieving credentials Limitations: • we cannot efficiently detect that a S3 server is able to respond to multi-range HTTP GET requests. Some servers, such as Amazon’s, respond to such kind of requests with the whole file contents. Other servers, such as Huawei’s, respond with the exact partial content requested. Therefore, I added the possibility of configuring the behavior via the ROOT configuration file: the identity of the servers known to correctly support multi-range requests is configurable. If the server is known to support this feature, ROOT will send multi-range requests, otherwise it will issue multiple single-range GET requests, which is also the default behavior. • currently the virtual host syntax: “s3://mybucket.s3.amazonaws.com/path/to/my/file” is not supported but can be added if this is considered useful. The TAS3File class will be removed and should not have been used directly by users anyway as it was only accessed via the plugin manager in TFile::Open(). ### New HTTP Server package A new HTTP Server package has been introduced. The idea behind such server is to provide direct access to the data from a running ROOT application. Any object can be streamed when requested and delivered to the browser. ##### Starting HTTP server To start http server, at any time create instance of the THttpServer class like: serv = new THttpServer("http:8080"); This will start civetweb-based http server on port 8080. Then, one should be able to open address “http://localhost:8080” in any modern browser and browse objects created in application. By default, the server can access files, canvases and histograms via gROOT. All such objects can be displayed with JSRootIO graphics. At any time one could register other objects with the command:  TGraph* gr = new TGraph(10); gr->SetName("gr1"); serv->Register("graphs/subfolder", gr); If the object content is changing in the application, like for example histograms being continuously filled, one could enable the monitoring flag in the browser, then the object view will be regularly updated. ## SQL Libraries ## Tree Libraries ### TTreeReader ROOT offers a new class TTreeReader that gives simple, safe and fast access to the content of a TTree. Using it is trivial: #include "TFile.h" #include "TH1F.h" #include "TTreeReader.h" #include "TTreeReaderValue.h" void hsimpleReader() { TH1F *myHist = new TH1F("h1","ntuple",100,-4,4); TFile *myFile = TFile::Open("hsimple.root"); // Create a TTreeReader for the tree, for instance by passing the // TTree's name and the TDirectory / TFile it is in. TTreeReader myReader("ntuple", myFile); // The branch "px" contains floats; access them as myPx. TTreeReaderValue<Float_t> myPx(myReader, "px"); // The branch "py" contains floats, too; access those as myPy. TTreeReaderValue<Float_t> myPy(myReader, "py"); // Loop over all entries of the TTree or TChain. while (myReader.Next()) { // Just access the data as if myPx and myPy were iterators (note the '*' // in front of them): myHist->Fill(*myPx + *myPy); } myHist->Draw(); } TTreeReader checks whether the type that you expect can be extracted from the tree’s branch and will clearly complain if not. It reads on demand: only data that are actually needed are read, there is no need for SetBranchStatus(), SetBranchAddress(), LoadTree() or anything alike. It uses the memory management of TTree, removing possible double deletions or memory leaks and relieveing you from the need to manage the memory yourself. It turns on the tree cache, accelerating the reading of data. It has been extensively tested on all known types of TTree branches and is thus a generic, fits-all access method for data stored in TTrees. ### TTreePlayer • The TEntryList for ||-Coord plot was not defined correctly. ## PROOF System All the fixes and improvements in the PROOF system occured since the release of 5.34/00 are available both in the latest 5.34 tags and in 6.00/00. The following is a summary of the major modifications since 5.34 . ### New developments/functionality • Several improvements in the merging phase; in particular: • Modification of output sending protocol to control memory usage, significantly reducing the memory footprint on the master, in particular when merging large numbers of histograms. • Use an hash table for the output list to significantly speed up names lookups during merging. • Add support for dynamic addition of workers to a currently running process (currently supported by the unit packetizer). • Automatization of the usage of file-based technology to handle outputs (see Handling Outputs). • Improved dataset management model where the PROOF (ROOT) dataset manager is a light frontend to the experiment file catalogs; TDataSetManagerFile is still used as local cache of the experiment information or to store the work-in-progress status of the dataset manager daemon. This model addresses the scalability issues observed at ALICE AFs. • Improvements in TProofBench: • Recording and display of the maximum rate during query, CPU efficiency calculation for PROOF-Lite runs, better measurement of wall time. • Support for dynamic startup mode • Test program xpdtest to test the status of xproofd (see also man page under$ROOTSYS/man/man1):
    \$ xpdtest [options]
--help, -h
Gives a short list of options avaliable, and exit
-t <test>
type of test to be run:
0       ping the daemon (includes process existence check if pid specified; see below)
1       ping the daemon and check connection for default user
2       ping the daemon and check connection for the default user and all recent users
...
• Interface with igprof for fast statistic profiling. Like valgrind, it can be specified as option to TProof::Open and the output is available via the log viewer technology:
    root[] p = TProof::Open("master", "igprof-pp")
• Miscellanea:
• Added functions Getenv and GetRC in TProof to retrieve environment information from the nodes, typically from the master.
• Add support unix secondary groups in group access control. This allows more flexibility in, for example, assigning group-shared credential files to the daemon.
• Several new tests and options in the test program stressProof.

### Bug fixes

Several consolidation fixes in several parts of the system (see the 5.34 patch release notes for details). In particular, those for ‘xproofd’ were provided by B. Butler and M. Swiatlowski and greatly contributed to consolidate the daemon.

## Histogram Libraries

### THistPainter

• With option COL TProfile2D histograms are handled differently because, for this type of 2D histograms, it is possible to know if an empty bin has been filled or not. So even if all the bins’ contents are positive some empty bins might be painted. And vice versa, if some bins have a negative content some empty bins might be not painted.
• With option COLZ the axis attributes were not imported correctly on the palette axis.
• Make sure the 2D drawing options COL, ARR, CONT and BOX are ignored when used to plot a 1D histogram. 1D histograms plotted with one of these options is now drawn with the default 1D plotting option. This is useful when the default option in the TBrowser is, for instance, COL. Before this change the 1D histogram appeared as blank.
• New plotting option "LEGO3". Like the option "LEGO1", the option "LEGO3" draws a lego plot using the hidden surface removal technique but doesn’t draw the border lines of each individual lego-bar. This is very useful for histograms having many bins. With such histograms the option "LEGO1" gives a black image because of the border lines. This option also works with stacked legos.
• New plotting option "LEGO4". Draw a lego plot with hidden surface removal, like LEGO1, but without the shadow effect on each lego-bar.
• Line attributes can be used in lego plots to change the edges’ style. It works when drawing a TH2 in LEGO or SURF mode whatever the coordinate system used (car, pol, cyl, sph, and psr). It also handles THStack (lego only).
• Implement in THistPainter::GetObjectInfo the case of TProfile and TProfile2D to print the tooltip information on each bin. Disable the printing of the bin information for TH3, since it is not currently possible to retrieve the 3d bin number from the pixel coordinate.
• Fit parameters with very long name destroyed the stats display. This is now fixed.
Example:

{
gStyle->SetOptFit(111);
TH1F *hist = new TH1F("hist","hist",100,-5,5);
TF1 *fit = new TF1("fit","gaus",-5,5);
fit->SetParName(2,"Parameter with very very very very long name");
hist->FillRandom("gaus",5000);
hist->Draw();
hist->Fit(fit);
}
• The statistics display has a new option: “I”=2 (the default one remains “i”=1). The value displayed for integral is TH1::Integral("width") instead of TH1::Integral(). Example:

{
TH1D * histo1D = new TH1D ("histo1D","",2,0.,4.) ;
histo1D->SetBinContent( 1,1.) ;
histo1D->SetBinContent( 2,2.) ;
TCanvas * canvas = new TCanvas () ;
canvas->Divide(2,1) ;
canvas->cd(1) ; gStyle->SetOptStat("nemruoi") ; histo1D->DrawClone() ;
canvas->cd(2) ; gStyle->SetOptStat("nemruoI") ; histo1D->DrawClone() ;
}
• TH1 was drawn improperly in “Logx” mode if “X” axis starts at negative values. The following macro illustrades this problem.

{
TCanvas *c1 = new TCanvas("c1", "c1",0,0,1200,700);
int n = 100;
Float_t d = 0.5;
TH1F *h1 = new TH1F("h1", "x_min = - d", n, -d, 100-d);
h1->Fill(1, 1); h1->Fill(3, 3); h1->Fill(5, 5); h1->Fill(7, 7);

TH1F *h2 = new TH1F("h2", "x_min = +d", n, d, 100+d);
h2->Fill(1, 1); h2->Fill(3, 3); h2->Fill(5, 5); h2->Fill(7, 7);

c1->Divide(1, 2);
c1->cd(1); gPad->SetLogx(); h1->Draw(); // upper picture
c1->cd(2); gPad->SetLogx(); h2->Draw(); // lower picture
h1->GetXaxis()->SetMoreLogLabels();
h2->GetXaxis()->SetMoreLogLabels();
c1_1->SetGridx();
c1_2->SetGridx();
}
• In PaintStat2 the temporary string used to paint the fit parameters was too small and in some cases the errors where truncated. The size of the string is now the same as in PaintStat.
• Display the bin error for 2D histograms in the status bar.
• New option CANDLE to draw 2D histograms as Candle-PLot (Box-PLot). A Candle plot (also known as a “box-and whisker plot” or simply “box plot”) is a convenient way to describe graphically a data distribution (D) with only the five numbers. It was invented in 1977 by John Tukey.

With the option CANDLEX five numbers are:

1. The minimum value of the distribution D (bottom dashed line).
2. The lower quartile (Q1): 25% of the data points in D are less than Q1 (bottom of the box).
3. The median (M): 50% of the data points in D are less than M (thick line segment inside the box).
4. The upper quartile (Q3): 75% of the data points in D are less than Q3 (top of the box).
5. The maximum value of the distribution D (top dashed line).

The mean value of the distribution D is also represented as a circle.

In this implementation a TH2 is considered as a collection of TH1 along X (option CANDLE or CANDLEX) or Y (option CANDLEY). Each TH1 is represented as a candle plot.

Example:

{
TH2F *hcandle = new TH2F("hcandle","Option CANDLE example ",40,-4,4,40,-20,20);
Float_t px, py;
for (Int_t i = 0; i < 25000; i++) {
gRandom->Rannor(px,py);
hcandle->Fill(px,5*py);
}
hcandle->SetMarkerSize(0.5);
hcandle->Draw("CANDLE");
}
• The option “9” as been removed. It is not needed anymore since the line compression has been implemented in TPadPainter.
• The BOX option was handling TH2::SetMinimum() differently from the other drawing options. As reported here.

### TGraphPainter

• Fix the problem described here. When drawn with option SAME the histogram 1st and last bins might be wrong. The following macro shows the problem:

{
TCanvas *c = new TCanvas("c","c",900,900);
c->Divide (1,2);

TH1D * histo1 = new TH1D ("histo1","histo1",100,0.,100.) ;
histo1->SetBinContent(51,80.) ;

TH1D * histo2 = new TH1D ("histo2","histo2",100,49.9,51.1) ;  /// not ok
histo2->SetMinimum(0.) ; histo2->SetMaximum(100.) ;

histo1->Draw("same");

Double_t xAxis[4] = {3., 5., 7., 9.};
TH1D *histo2 = new TH1D("histo","",3, xAxis);
histo2->SetBinContent(1,2.);
histo2->SetBinContent(2,4.);
histo2->SetBinContent(3,3.);

histo2->Draw("same");
}
• In TGraph2DPainter::PaintLevels the colour levels used to paint the triangles did not match the minimum and maximum set by the user on the TGraph2D. This problem was reported here

### TPaletteAxis

• The histogram Z axis title is now painted along the palette axis.

### TAxis

• The Axis has a new public bit TAxis::kCanExtend, which control the axis extensions (for example in case of time axis) and used to replace the old bit TH1::kCanRebin (see below). Note that this bit is automatically set when the axis has labels associated to each bin. In this case the axis becomes alphanumeric and there is no more relation to the observed quantities. Note that when an axis is alphanumeric the mean and the rms of the histograms are not anymore coputed and they are set to zero.

### TH1

• The bit TH1::kCanRebin used to extend the histogram axes is now deprecated. The bit exists still in ROOT 6.0 but it has no effect. One should use now the new function TH1::SetCanExtend(..) passing the axis (using the appropriate enumeration), which needs to be extended. In addition to extend each axis individually, the function can be used also to enable/disable extension for all axes. For example TH1::SetCanExtend(TH1::kXaxis) will make extendable only the X axis; TH1::SetCanExtend(TH1::kAllAxes) will make extendable all the axes (this is the same functionality of the previous function SetBit(TH1::kCanRebin) and TH1::SetCanExtend(TH1::kNoAxis) will remove the extendable functionality to all the axes (equivalent to the old ResetBit(TH1::kCanRebin)). The functionality of TestBit(TH1::kCanRebin) is now replaced by TH1::CanExtendAllAxis().

• An histogram filled with weights different than one has now automatically the sum of the weight squared stored inside, without the need to call anymore TH1::Sumw2(). As a consequences an histogram filled with weights will always draw the errors by default. If one desire to continue having the histogram drawn without the errors, one should use the hist option: h.Draw("hist"). If, for memory reason, one does not want to remove the internal array storing the bin errors (the bin sum of weight square), one can use the function TH1::Sumw2(false).

• The copy constructor is not anymore public for TH1. Before (in 5.34) this code was allowed by the compiler, although giving undefined behavior: now not anymore:

   TH1D h1;
TH1 h2(h1); 

Now this code is not allowed anymore. It will give a compilation error. The copy constructor of the derived classes (TH1D in this example) should instead be used. This applies also for TH2 and TH3. In case you want to copy histograms using the TH1 interface, you can use either TObject::Clone, which uses the I/O system and can be unconvenient in some cases (e.g. in a multi-threaded environment) or TH1::Copy which is public since some of the latest 5.34 revisions together with TClass::New as following:

   TH1 * h2 = (TH1*) h1->IsA()->New();
h1->Copy(*h2);

Note that TH1::Copy does not copy the attached list of functions, while TH1::Clone() does a deep copy also of the contained functions.

• Add new method TH1::GetNCells to retrieve the total number of bins of an histogram including underflow and overflows. This is the product of all the bins in each dimension.

• The methods GetCellContent, GetCellError and SetCellContent and SetCellError have been deprecated. Get/SetBinContent and Get/SetBinError should be instead used and they have exactly the same functionality.

• The following code should produce a plot. It did not.

   TH1F* h=new TH1F("hist", "histogram", 10, 0, 3);
h->FillRandom("gaus");
h->Draw("same"); 
• Make sure histograms having quotes in title are properly saved in .C files.

### TH2, TH3

• Add new functions TH2::QuantilesX and TH2::QuantilesY to return in a 1D histogram the projected quantiles distribution along the other Y or X axis. The return histogram will have as bin error an approximate error on the quantile assuming a normal distribution of the bin contents in the other axis.

• Update Projection methods of both TH2 and TH3 to not return a null pointer when an histogram with the same name already existed and it was not compatible. Now just set the new correct binning on the previously existing histogram.

### TGraph

• TGraph::Draw() needed at least the option AL to draw the graph axis even when there was no active canvas or when the active canvas did not have any axis defined. This was counter-intuitive. Now if TGraph::Draw() is invoked without parameter and if there is no axis defined in the current canvas, the option ALP is automatically set.
• Change SavePrimtive() to improve speed compilation on generated macros.

### TGraph2D

• When GetX(YZ)axis were called on a TGraph2D, the frame limit and plotting options were changed.
• Modify the Clear function in order to be able to reuse a TGraph2D after a Clear is performed.
• In GetHistogram() the lower and higher axis limits are always different.
• Protection added to avoid a Seg Fault on .q when SetHistogram() is called on a TGraph2D.

### TMultiGraph

• In TMultiGraph::Add(TMultiGraph *multigraph, Option_t *chopt) If chopt is defined all the graphs in multigraph will be added with the chopt option. If chopt is undefined each graph will be added with the option it had in multigraph.
• The option “A” in the Draw() was not cleaning properly the current pad.
• Implement this option pads. This option is equivalent to the one in THStack. It allows to draw all the TGraphs in separated pads.

### THStack

• By default the background of the histograms is erased before drawing the histograms. The new option noclear avoid this behaviour. This is useful when drawing a THStack on top of an other plot. If the patterns used to draw the histograms in the stack are transparents, then the plot behind will be visible.

### TH2Poly

• Implement a simple version of “Scale”.

### TF1

• Change TF1::Integral(double a, double b, double * params = 0, double eps = 1.E-12) to TF1::Integral(doubnle a, double b, double epsrel=1.E-12). One should use TF1::SetParameters to set the function parameters before computing the integral.

• Add a new function TF1::IntegralOneDim(Double_t a, Double_t b, Double_t epsrel, Double_t epsabs, Double_t &err) that returns as last argument the error in the integration. TF1::Integral is implemented using Tf1::IntegralOneDim.

• The one-dim and multi-dim integral functions are now implemented using the ROOT::Math::IntegratorOneDim and ROOT::Math::IntegratorMultiDim classes. This allows to change the integration algorithm used in TF1 using the static methods of the classes ROOT::Math::IntegratorOneDimOptions and ROOT::Math::IntegratorMultiDimOptions. The default algorithm used are ROOT::Math::IntegratorOneDimOptions::DefaultIntegratorType() and ROOT::Math::IntegratorMultiDimOptions::DefaultIntegratorType(). For example, if ROOT has been built with mathmore the default one-dim integration type is the GSL AdaptiveSingular integration algorithm.

• Implement the possibility to save a TF1 as C code indenpant from ROOT. It is enough to save the function as a “.cc” file.
Example:

   root [0] TF1 *f1 = new TF1("f1","x*x",-10,10)
root [1] f1->SaveAs("f1.cc");
Info in <TF1::SaveAs>: cc file: f1.cc has been generated
root [2] .x f1.cc(9.)
(double)8.10019368181367980e+01

### TF2, TF3

• Implement TF2::GetMinimumXY and TF3::GetMinimumXYZ using the ROOT::Math::Minimizer class instead of TFitter. The methods return now the function value at the minimum.

• Implement also a TF2::GetMaximumXY and TF3::GetMaximumXYZ.

• Remove some ambigous Integral functions

### TFractionFitter, TBinomialFitter

• Change to use the ROOT::Math::Fitter instead of the TFitter class.

## Python Bindings

The Python bindings are fully supported in ROOT 6.

## Ruby Bindings

The Ruby bindings have not been ported yet to the new interpreter interface in ROOT 6. We hope to have this fixed in a future release.

## Math Libraries

### Minuit2

• Remove the TFitterMinuit class and the similar ones used to implement the TVirtualFitter interface using Minuit2. users should switch to use the ROOT::Math::Minimizer interface

All other changes in the Math packages have been applied also in the 5.34 patched versions of ROOT. See their release notes for the detailed list of applied improvements.

## GUI Libraries

### Attributes editors

• The transparency sliders change the transparency only for the currently edited object.

### Object editing on canvas

• The “move opaque” way to edit object on canvas, has been extended to all kind of objects.
• When in move opaque mode, a canvas can show guide lines to place object relatively to each other. A new resource in etc/system.rootrc allows to turn the feature on or off: Canvas.ShowGuideLines.
• For a fine adjustment at the pixel level, the arrow keys can be used to move object on pad.
• The zoom on axis and on 2D histogram has be improved. A shaded area is shown instead on simple lines. Also it is possible to zoom a 2D histogram with a shaded rectangle.

### Saving Files

• When saving files from a canvas, the default file type is now .pdf instead of .ps, since pdf is probably becoming more popular than ps.
• In the “File Save Dialog”, there is now a default file name and its extension (if a specific one is selected), and the name is highlighted, so when the user types something, only the file name is changed.
• The default file type can be changed with a new Canvas.SaveAsDefaultType option in etc/system.rootrc (default being pdf).

### ROOT browser and pad editor

• The Pad Editor is now embedded in the left tab of the browser instead of inside the canvas itself, so the layout of the canvas remains untouched when opening the editor.

## 2D Graphics Libraries

### TASImage

• In some cases dashed lines with a line width greater than “1” were not drawn.
• The TLatex symbol #tilde, was misplaced.
• In TASImage::DrawtText, TTF::SetTextSize was called with a rounded value (to pixel). This cause some misplacements of character in TLatex formulae.

### TPDF and TPostScript

• Parenthesis can be used in PDF and PS file names.
• In PDF files, italic greek characters were not correct for non null text angle.

### TImageDump

• Fix a TBox clipping issue.

### TSVG

• Some markers did not show in Google-Chrome.

### New class TTeXDump: Graphics interface to TeX

This class allow to generate PGF/TikZ vector graphics output which can be included in TeX and LaTeX documents.

PGF is a TeX macro package for generating graphics. It is platform and format-independent and works together with the most important TeX backend drivers, including pdftex and dvips. It comes with a user-friedly syntax layer called TikZ.

To generate a such file it is enough to do:

   gStyle->SetPaperSize(10.,10.);
hpx->Draw();
gPad->Print("hpx.tex");

Then, the generated file (hpx.tex) can be included in a LaTeX document (simple.tex) in the following way:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\title{A simple LaTeX example}
\date{July 2013}
\begin{document}
\maketitle
The following image as been generated using the TTeXDump class:
\par
\input{hpx.tex}
\end{document}

Note the two directive needed at the top of the LaTeX file:

\usepackage{tikz}
\usetikzlibrary{patterns}

Then including the picture in the document is done with the \input directive.

The command pdflatex simple.tex will generate the corresponding pdf file simple.pdf.

### X11 fonts

• A coverity fix in Rotated.cxx had a side effect on rotated text drawn with X11 fonts.

• TPad::SaveAs produces named macros in .C files.
• Change the way the string input is done in the Pad toolbar for text and Pave Label. It doesn’t use anymore the TGX11 function RequestString. Now the text appears directly as it will show and it is possible to enter several text string. The input is not block in the RequestString event loop.
• The toolbar methods now work without XOR mode (useful for OpenGL()).
• A new “vertex compression” algorithm added to deal with complex histograms (thousands/millions of bins - polygons with thousands/millions of vertices) - optimization/fix for X11 crashes.

### TGaxis and TAxis

• The time axis behavior should now be correct along time zone and summer saving time. A fix has been done with the of Philippe Gras (CEA Saclay. IRFU/SEDI) and Julian Sitarek (IFAE). Time axis transported from a time zone to an other in a ROOT file are correct too. A new example test have been introduced to test the time axis (timeonaxis3.C)
• In some case the format use to build the axis labels was incorrect. (cf: Jira report ROOT-5635).
• New static function to change the position of the “power of 10” near the axis. A static function is used instead of data members in TAxis in order to keep the TAxis class small. Adding two floating point numbers in that class (in fact in TAttAxis) would have a none negligible effect on the Root files’ sizes as there is at least two axis per histogram and that there is often 1000th histograms in a single file. So we choose to follow the same mechanism as for the SetMaxDigits static method. The new function is: SetExponentOffset. Example:
...
TGaxis::SetMaxDigits(2);
TGaxis::SetExponentOffset(-0.01, 0.01, "y"); // X and Y offset for Y axis
TGaxis::SetExponentOffset(-0.05, 0.01, "x"); // Y and Y offset for X axis
...
hist->Draw();
• TGaxis::SetMaxDigits() was not acitve on standalone TGaxis.

### TLegend

• The line attribute of objects in the legend were not taken into account with the option “e”.
• In case of automatic computation of the legend items’ size, the text size was wrong if the font precision was set to 3.
• Improve the spacing between lines. Due to the way the vertical text centring is done (bounding based) the spacing between lines may appeared irregular in some cases.
• The error bar in the legend (option “E”) didn’t have the line attributes when drawn alone (without option “L”).

### TPie

• New drawing option “SC” to draw the labels with the slices’ colors.

### TLine

• Add SetNDC.

### TMathText

• TMathText’s purpose is to write mathematical equations, exactly as TeX would do it. The syntax is the same as the TeX’s one. Author: Yue Shi Lai (MIT))
Example:
    {
TMathText l;
l.SetTextAlign(23);
l.SetTextSize(0.06);
l.DrawMathText(0.50, 1.000, "\\prod_{j\\ge0} \\left(\\sum_{k\\ge0} a_{jk}z^k\\right) = \\sum_{n\\ge0} z^n \\left(\\sum_{k_0,k_1,\\ldots\\ge0\\atop k_0+k_1+\\cdots=n} a_{0k_0}a_{1k_1} \\cdots \\right)");
l.DrawMathText(0.50, 0.800, "W_{\\delta_1\\rho_1\\sigma_2}^{3\\beta} = U_{\\delta_1\\rho_1\\sigma_2}^{3\\beta} + {1\\over 8\\pi^2} \\int_{\\alpha_1}^{\\alpha_2} d\\alpha_2^\\prime \\left[ {U_{\\delta_1\\rho_1}^{2\\beta} - \\alpha_2^\\prime U_{\\rho_1\\sigma_2}^{1\\beta} \\over U_{\\rho_1\\sigma_2}^{0\\beta}} \\right]");
l.DrawMathText(0.50, 0.600, "d\\Gamma = {1\\over 2m_A} \\left( \\prod_f {d^3p_f\\over (2\\pi)^3} {1\\over 2E_f} \\right) \\left| \\mathscr{M} \\left(m_A - \\left\\{p_f\\right\\} \\right) \\right|^2 (2\\pi)^4 \\delta^{(4)} \\left(p_A - \\sum p_f \\right)");
l.DrawMathText(0.50, 0.425, "4\\mathrm{Re}\\left\\{{2\\over 1-\\Delta\\alpha} \\chi(s) \\left[ \\^{g}_\\nu^e \\^{g}_\\nu^f (1 + \\cos^2\\theta) + \\^{g}_a^e \\^{g}_a^f \\cos\\theta \\right] \\right\\}");
l.DrawMathText(0.50, 0.330, "p(n) = {1\\over\\pi\\sqrt{2}} \\sum_{k = 1}^\\infty \\sqrt{k} A_k(n) {d\\over dn} {\\sinh \\left\\{ {\\pi\\over k} \\sqrt{2\\over 3} \\sqrt{n - {1\\over 24}} \\right\\} \\over \\sqrt{n - {1\\over 24}}}");
l.DrawMathText(0.13, 0.150, "{(\\ell+1)C_{\\ell}^{TE} \\over 2\\pi}");
l.DrawMathText(0.27, 0.110, "\\mathbb{N} \\subset \\mathbb{R}");
l.DrawMathText(0.63, 0.100, "\\hbox{RHIC スピン物理 Нью-Йорк}");
}
• Implement \\frac using \\over.
• Treat \\mbox as \\hbox to improve the compatibility with TTexDump.

### TLatex

• The class TMathText is a TeX math formulae interpreter. It uses plain TeX syntax and uses “\” as control instead of “#”. If a piece of text containing “\” is given to TLatex then TMathText is automatically invoked. Therefore, as histograms’ titles, axis titles, labels etc … are drawn using TLatex, the TMathText syntax can be used for them also.
• Fix a very old bug (in TTF.cxx since the beginning). With the following code the spaces between “text” and #lambda were ignored.
       TLatex t; t.DrawLatex( 0.1,0.1,"text   #Lambda" )
• Implement #backslash.
• Implement DrawLatexNDC.
• Implement #minus and #plus typographically better than the standard "-" and "+".
• Make sure all greek and math symbols are printed correctly by TTexDump.
• Implement dummy operators #mbox and #hbox to improve the compatibility between TLatex, TMathText and TTexDump.
• Some operators like #minus, #plus, #mp, #hbar etc … ignored the color defined by the operator #color.
• With the Cocoa backend on Mac the text string were a bit too large compared to the TTF rendering.

### TPave

• Implement SetX1() etc … for TPave and inherited classes to make sure the NDC coordinates are also defined.

• Two new classes to support color gradient: TLinearGradient and TRadialGradient. Both classes inherit from TColor and can be used the same way as ROOT’s standard colors in TAttFill (SetFillColor(newColorIndex)). Gradient fill can be created using either RGBA values directly, or from color indices (colors from the ROOT’s color table).
• The new gradient fill option is available either with OpenGL (“gl-in-pad”) or with a Cocoa backend (OS X only).
• Please note, at the moment, a color gradient can not be saved in a ROOT file or a pdf/ps file. It can be saved as an image (png/jpg etc.).
• There are several demos in the tutorials/cocoa and tutorials/gl sub-directories explaining how to use these new classes:

### TGCocoa and TGQuartz

• Correct font metrics for greek and math symbols are implemented now.
• “GL-in-pad” implemented for Cocoa backend.
• Keyboard event handling is more “X11-like” now.
• Multi-display setup is supported now.
• Transparent pads (colors with alpha value) are supported natively now.

## 3D Graphics Libraries

• Transparency is now implemented for “GL in Pad” (gStyle->SetCanvasPreferGL(1)).
• Introduce the flag CanvasPreferGL in rootrc.in. So OpenGL can be use by default. The default value for this flag is 0 (no OpenGL).
• Fix size issues with the FTGL text.
• Make TMathText work with FTGL
• The new tutorial timeonaxis3.C test the time axis.
• New tutorial image2hist showing how to convert an image to a 2D histogram.