# ROOT Version 5.34/08 Release Notes

ROOT version 5.32/00 has been released on November 29, 2011. In case you are upgrading from an old version, please read the releases notes of version 5.26, 5,28 and version 5.30 in addition to these notes.

The release of version 5.34 is scheduled for May 30, 2012.

• Bindings - packages related to the interplay with other programming languages (Python, Ruby)
• Cint - the C++ interpreter
• Core - the basic ROOT functionality
• Geometry - building, representing and drawing geometrical objects
• 2D Graphics - ROOT's two dimensional graphics interface
• 3D Graphics - ROOT's three dimensional graphics interface
• Graphical User Interface - from basic GUI elements to ROOT's own, complete dialogs
• Histograming - counting values, spectra, and drawing them
• HTML - the documentation generator
• Input/Ouput - storing and reading data
• Mathemathics - everything one can use to calculate: minimizers, matrixes, FFT, and much more
• Miscellaneous - things that didn't make it into the other groups: table
• Monte Carlo - monte carlo and physics simulation interfaces
• Networking - network-related parts, e.g. protocols and authentication interfaces
• PROOF - parallel ROOT facility
• RooFit - a fitting library
• RooStats - a collection of statistical tools
• SQL - database interfaces
• TMVA - multivariate analysis tools
• Trees - ROOT's unique container class and related utilities
• Tutorials - ROOT's Tutorials

      http://root.cern.ch

The following people have contributed to this new version:

Bertrand Bellenot, CERN/SFT,
Rene Brun, CERN/SFT,
Philippe Canal, FNAL,
Olivier Couet, CERN/SFT,
Kyle Cranmer, NYU, RooStats,
Gerri Ganis, CERN/SFT,
Andrei Gheata, CERN/Alice,
Wim Lavrijsen, LBNL, PyRoot,
Lorenzo Moneta, CERN/SFT,
Axel Naumann, CERN/SFT,
Paul Russo, FNAL,
Joerg Stelzer, DESY/Atlas, TMVA,
Eckhard von Toerne, University Bonn, ATLAS, TMVA,
Wouter Verkerke, NIKHEF/Atlas, RooFit,

### Core Libraries

#### ROOT Error Handlers

There is a new rootrc variable which allows to control the installation of the ROOT error handlers. By default the handlers are activated:


Root.ErrorHandlers:      1


but setting the value to 0 result in no error handlers being installed and the originals remaining in place. This can be useful if ROOT is used in conjunction with other frameworks that already installed their own handlers.

#### TString

TString::Hash() and thus also TMath::Hash() now use MurmurHash3_x64_128 from http://code.google.com/p/smhasher/ which is public domain. To accelerate the hash in the case of pointers even further, pointers (and same-sized texts) are hashed using a simple bitwise xor. This dramatically increases the hash performance for long texts, and still by a factor 5 for pointers. The pointer case is most visible for certain I/O operations (TExMap).

#### TColor

Add the method SetAlpha() to set the alpha value (transparency level) for an existing color.

#### TStyle

The default font set by gStyle->SetLegendFont() was ignored.

#### TUnixSystem

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

### I/O Libraries

• Support for multiple TFileCacheRead per TFile.

Multiple TFileCacheRead per TFile are supported by augmenting the existing TFile::SetCacheRead() function with an optional TObject* argument specifying the owner (i.e. tree) of the cache. This function will assign a TFileCacheRead to a TFile for the given TTree. A cache can be removed by setting the pointer TFileCacheRead to 0.

In addition to the unassigned TFileCacheRead pointer, TFile will maintain a map of tree specific cache pointers.

Backward compatibility in both functions is handled by making the TObject* argument optional. If it is not specified in the TFile::SetCacheRead() call, only the unassigned TFileCacheRead pointer is updated, otherwise the map and the unassigned cache are updated. In TFile::GetCacheRead(), if an owner is not specified or doesn't exist in the file's cache map, the unassigned cache is returned, unless it is 0 and there is exactly one entry in the cache map.

#### TFileMerger

• Improve efficiency of TFileMerger when merging a single file by doing a TFile::Cp rather than a load/write of the objects.
• In TFileMerger and hadd when objects can not be merged do not overwrite the last object in the set with the first!
• Renable warning about not being able to merge objects in TFileMerger and hadd.
• Fix hadd problem where the incremental merging fails if the TTree are stored in sub-directories.
• Improve the code used for forward compatibility (record the type as TDirectory even-though the class is now TDirectoryFile) by delaying the switching of the class name until it is written (to the buffer). This avoids problem where a TKey is created (by TFile::mkdir) and then immediately used for reading (this happens in the incremental file merger).

### 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 the HTTP server

To start the 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.

### Tree Libraries

#### Performance

• 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).

• 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'
• TEntryList::Relocate(const char *fn, const char *newroot,
const char *oldroot = 0, const char *enlnm = 0)
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:
1. The requested size if more than one cluster fits in the cache.
2. Twice the requested size if at least one basket per branch fits in the cache.
3. 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.

### PROOF System

• Added interface to simplify the creation of the performance tree: two new methods TProof::SetPerfTree("<file>") and TProof::SavePerfTree("<file>", "<queryref>") allow set and/or save the information to a given file path. The perfomance tree settim=ngs are diabled after each query, so they need to be enabled each time. See also Creating and saving the performance tree.
• Add support for a command line test run of 'proofserv'; this is useful to test that the environment is setup correctly.
• In TProofBench::DrawCPU, add possibility to extract of a couple of numbers supposed to give an idea of the computing specs of the cluster being benchmarked. These are the maximum rate for the standard CPU intensive task and the normalized, per worker, rate. Both are expressed in RNGPS (RaNdom Generation Per Second). See also Getting the performance specs .
• Add class TProofPerfAnalysis collecting a set of tools to analyse the performance tree. See Analysing the performance tree .
• Add support for selector-by-object processing in PROOF. The selector object, created and configured locally by the user, is added to the input list and recuperated from there on the worker machines for processing. Any input list setting in the selector itself is not streamed but temporarly moved to then standard input list, so that user can use the selector input list as container of processing information if they find convenient to do so. Process(...) methods with the file name argument replaced by 'TSelector *' have  introduced where relevant (TProof, TProofPlayer and their derivatives, TDSet).
• Add the possibility to force submerging at node level, i.e. one submerger per physical machine. In this way the network traffic can be minimized, for example when merging large output files. The new feature is enabled by setting the Int_t parameter 'PROOF_MergersByHost' (or the directive 'Proof.MergersByHost') to a non-null value.
• Simplify enabling of basic feedback. In TProof::Process, add support for switches "fb=name1,name2,name3,... " or "feedback=name1,name2,name3,... " in the option field. This enables feedback for the specified objects, creating a TDrawFeedback object attached to the session. Feedback for the specified objects is disabled at the end of the query and the created TDrawFeedback is destroyed. The special name 'stats' enables the three feedback histograms required by a dedicated new class TStatsFeedback, and uses a TStatsFeedback instead of TDrawFeedback to display the feedback.
• Improvements
• Add to TProofMgr two static functions to upload files. These functions are both called UploadFiles and differ in the first argument, which is used to pass the files to be uploaded. These can be given as a list (of TFileInfo or TObjString), a directory or specified in a text file. See Uploading data files to a PROOF cluster .
• Add support for paralell dataset verification. This is implemented via a dedicated TSelector (TSelVerifyDataSet) which is run over the list of files in the dataset via TPacketizerFile. The file order is preserved using the recently introduced index in TFileInfo.
• In TProofOutputFile, add switch to control the way histograms are merged by TFileMerger, i.e. one-by-one or all-in-one-go. The default is one-by-one which requires much less memory. Merging in one-go (the previous default) can be activated by passing 'H' in the constructor options.
• In ProofBench, add possibility to change the location of the generated files via the third argument of TProofBench::MakeDataSet.
• Several optimizations in the low level PROOF event loop (TProofPlayer::Process),  allowing to reduce dramatically the overhead introduced by the operations PROOF needs to perform during the event loop. A measurement of the overhead can be obtained from a very light computational task, for example, generating one random number and filling one histogram; executing this task within a PROOF-Lite session with 1 worker now takes only 1.8 times the time required by a straight loop in the parent ROOT session; the same number before was about 13.
• In TDrawFeedback::Feedback, call method Draw() of objects not identified as TH1 derivation. This allows user-defined objects implementing Draw to be displayed via this utility class.
• In TProof::LoadPackageOnClient, do not create a symlink 'pack_name' to the package dir, but add directly the package dir to the include path. This solves the longstanding annoying problem of failure when a directory or file with the name of the package did already exist in the local working directory.
• Fixes
• Fix merging issue affecting automatic dataset creation when only one worker is active.
• Fix the realtime reported by TProof::GetRealTime() for masters (it was overwritten with the ones coming from workers).
• Fix serious problem with TProof::Load: additional files were not copied in the master sandbox but left in the cache. A workaround for backward compatibility has also been implemented.
• Fix a problem preventing actions requiring access to worker nodes (log file retrieval, reset) to work on workers where the username is different from the one o the master, e.g. PoD on gLite.
• Fix issue with the specification of the working directory template in 'xpd.multiuser'.

### THn, THnBase, THNSparse

• The new, non-sparse n-dimensional histogram THn has been introduced. It follows the same interfaces as THnSparse, and thus also implements THnF THnD THnC THnS THnI THnL.
NOTE: the memory usage of this class increases with the number of bins, i.e. exponentially with the number of dimensions! A 5-dimensional THnD with 100 bins per dimension uses more than 80GB of RAM! Better use THnSparse if only a small fraction of the bins are filled.
• Most algorithms are now implemented in THnBase, the new common base class of THnSparse and THn. If a function does not care about the actual storage format on in incoming objects it might as well reference a THnBase.
• The bins of THn are held by objects of the new type TNDArray: an n-dimensional array with lazy allocation (only when a bin is set) that implements an operator [].
• THn and THnSparse can be created from histograms and from each other, allowing for easy conversion. There is currently no support for drawing a THnBase-derived object; project it into a TH1/2/3 first.

### THistPainter

• When 1D histograms are painted with the options TEXT and BAR simultaneously, the text for each bin is placed taking into account the bar offset and bar width attributes. Previously, when several histogram were drawn that way, the texts overlapped.
• When a TF1 was clipped vertically, horizotal lines appeared at the maximum and minimum when the function was draw with a line width greater than 1. The follwoing macro reproduces the problem:
{
TCanvas *c1=new TCanvas("c1", "A canvas", 10,0, 800, 600);
c1->SetLogy();
histo_dummy=c1->DrawFrame(0,1e-4,27,10);
TF1 gaussian_func("gaussian_func","gaus",0,25.4);
gaussian_func.SetLineColor(kRed);
gaussian_func.SetParameters(1e-2,10,3);
gaussian_func.Draw("same");
}

• When two histograms where painted on top of each other with the option BOX (the 2nd one with BOX,SAME) the plot was wrong if the minimum of the first histogram was not zero.
• Take into account the absolute value of the histogram's minimum to compute the maximal boxes' size when an histogram is drawn with the option BOX.
• Add support for drawing the asymmetric errors for the TH1 and TH2
• The fit function was not drawn in the correct range when a fitted 2D histogram was painted with the option lego or surf.
• With option TEXT, do not draw the bins with 0 content for 1D histograms to be consistent with the 2D histograms case. Example:
root [0] TH1D * histo = new TH1D ("histo","",20,-5.,5.) ;
root [1] histo->FillRandom("gaus",1000) ;
root [2] histo->Draw("hist,text") ;

• 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");
}


Candle plot example

• 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

• A time axis defined with the GMT option, saved into a root file in a given time zone, was different when displayed in an other time zone. The time zone offset in which the axis was created is now saved with the time axis offset allowing to make the right adjustments when the axis is displayed in an other time zone.

### TGraph2DPainter

• Because of the range along the Z axis, the following macro produced a wrong plot. The markers' colors did not match the palette and some of them were not clipped.
{
Double_t x[10] = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.};
Double_t y[10] = {.4,.5,.1,.3,.8,.4,.5,.6,.2,.1};
Double_t z[10] = {1.,2.,3.,4.,5.,6.,7.3,8.,9.,10.};
TGraph2D *gr = new TGraph2D("graph2d","graph2d",10,x,y,z);
gr->SetMarkerStyle(20);
gr->SetMaximum(7.5);
gr->SetMinimum(2.5);
gr->Draw("zpcol");
}


### TMultiGraph

• A new option 3D allows to draw the graphs in a 3D space. See the following example:
{
c1 = new TCanvas("c1","multigraph L3",200,10,700,500);
c1->SetFrameFillColor(30);

TMultiGraph *mg = new TMultiGraph();

TGraph *gr1 = new TGraph(); gr1->SetLineColor(kBlue);
TGraph *gr2 = new TGraph(); gr2->SetLineColor(kRed);
TGraph *gr3 = new TGraph(); gr3->SetLineColor(kGreen);
TGraph *gr4 = new TGraph(); gr4->SetLineColor(kOrange);

Double_t dx = 6.28/100;
Double_t x  = -3.14;
for (int i=0; i<=100; i++) {
x = x+dx;
gr1->SetPoint(i,x,2.*TMath::Sin(x));
gr2->SetPoint(i,x,TMath::Cos(x));
gr3->SetPoint(i,x,TMath::Cos(x*x));
gr4->SetPoint(i,x,TMath::Cos(x*x*x));
}

mg->Draw("a fb  l3d");
}


### TH1

• A canvas saved in a .C file generated wrong code if it contained an histogram drawn with the option COLZ.
• Add the support for asymmetric errors, by adding the methods TH1::GetBinErrorLow(ibin) and TH1::GetBinErrorUp(ibin).
• Add possibility to use different bin error types with TH1::SetBinErrorOption(type). The type of errors which one can set are:
• TH1::kNormal: this are the default errors (symmetric) based on the normal approximation. Bin error = sqrt(N). In case of a weighted histogram (non-integer bin content), the normal approximation is always used
• TH1::kPoisson: in this case the lower and upper error are defined by the 68% classical (frequentist) Poisson interval for N counts (Garwood Poisson interval).
• TH1::kPoisson2: as above but in this case a 95% (2-sigma) Poisson interval is used.
• Change all the TH1::Add, TH1::Divide, TH1::Multiply, methods and those in the derived classes (e.g. in TProfile classes) to return a boolean. The boolean is set to false in case the method fails (e.g when the histograms are not consistent, they have different bins)
• Add in TH1::Add a check for the labels. If the histogram axes to be added have same bin labels no warning is produced

### Factory

• NormMode: as called in PrepareTrainingAndTestTree
The default has changed and is now "EqualNumEvents" (with fixed meaning) While previously NumEvents and EqualNumEvents (by mistake/miscommunication) took into account training+test events, they are now correctly normalising only "Training Events" (note the reason for these normalisations was to have the possibility to easily force the effective (weighted) number of training events used for Signal (class 0) to equal the number of training events in the Backgr. (sum of all remaining classes in multiclass mode)
NumEvents:
- the weighted number of events is scaled, independently for signal and backgroundm, such that the sum of weights equals the number of events given in the Factory::PrepareTrainingAndTestTree("",nTrain_Signal=3000,nTrain_Background=6000) call. This example call will give hence end up in having 2x more background events in the training compared to the signal, no matter what the individual event weights have been. (watch out! if you specify nTrain_Signal=0,nTrain_Background=0), then the ratio will be according to total numbers of MC events in the signal and background respectively, which could be very different from the usually good ratio of having about the same weighted number signal and background events in the training. In that case it is better to use:
EqualNumEvents:
- for the signal events, the same is done as for NumEvents. The background events however are reweighted such, that their sum of weights equals that for the signal events. This results in the same effective (weighted) number of signal and background events to be seen in the training.
• Transformations=I is default again in Factory (this defines which variables distribution plots are added to the TMVA output file - and hence displayable via the TMVAGui)

### Boosted Decision Trees

some changes to the training options:
nEventsMin (deprecated) please replace by --> MinNodeSize
The option nEventsMin which specified the minimum number of training event in a leaf node as an absolute number has been replaced by "MinNodeSize" which is given in "percentage of the trainin sample". Like this the training options become less dependent on the actual number of training sample size
NNodesMax (deprecated) please replace by --> MaxDepth
GradBaggingFraction and UseNTrainEvents replaced by BaggedSampleFraction
- they both meant the same thing and are now deprecated --> use BaggedSampleFraction instead
- like this, the use of a bagged sample in Grad-Boost or AdaBoost has the same option name
UseWeightedTrees --> removed
- it was default anyway and the only reasonable choice there is
PruneBeforeBoost --> removed
- it has been mostly a debug/trial option
NegWeightTreatment=IgnoreNegWeights --> replaced by NegWeightTreatment=IgnoreNegWeightsInTraining
- Unfortunatly the default "IgnoreNegWeights" to the BDT option "NegWeightTreatment" collided with the a global option and had to be replaced.

### MethodBoost

• some cleanup (removed strange experimental boosting option HighEdgeGaus, HighEdgeCoPara ..... )
• remove options MethodWeightType... have it defined by the Boost Method (these have been trial options.. but for clarity it is much better to stick to the "standard" ones (i.e log(alpha) for AdaBoost etc)
• up to now, the first classifier was trained with the full sample, I think however, it should also be a bagged sample (i.e. particularily if smaller sample sizes for the bagged samples were demanded) .. it's changed now, accordingly

### MonteCarlo Libraries

#### VMC

• Update of the VMC interfaces for multi-threading: TVirtualMC and TVirtualMCApplication instances are now declared thread local. Added new functions in TVirtualMC and TVirtualMCApplication for multi-threading applications with default implementation.
In TVirtualMC:
 virtual Bool_t IsMT() const { return kFALSE; }

In TVirtualMCApplication:
  virtual TVirtualMCApplication* CloneForWorker() const { return 0;}
virtual void InitForWorker() const {}
virtual void BeginWorkerRun() const {}
virtual void FinishWorkerRun() const {}
virtual void Merge(TVirtualMCApplication* /*localMCApplication*/) {}

• Removed default implementation of newly added functions in TVirtualMC:
  virtual Bool_t IsRootGeometrySupported() const = 0;
virtual Bool_t GetMaterial(Int_t imat, TString& name,...) = 0;
virtual Bool_t CurrentBoundaryNormal(..) = 0;

• Removed deprecated functions from TVirtualMC:
  // Return parameters for material specified by material number imat
// Deprecated - replaced with GetMaterial()
virtual void  Gfmate(Int_t imat, char *name, Float_t &a, Float_t &z,
Float_t &dens, Float_t &radl, Float_t &absl,
Float_t *ubuf, Int_t &nbuf) = 0;

//  Return parameters for material specified by material number imat
// (in double precision)
// Deprecated - replaced with GetMaterial()
virtual void  Gfmate(Int_t imat, char *name, Double_t &a, Double_t &z,
Double_t &dens, Double_t &radl, Double_t &absl,
Double_t *ubuf, Int_t &nbuf) = 0;

// Check the parameters of a tracking medium
// Deprecated
virtual void  Gckmat(Int_t imed, char *name) = 0;


### GUI Libraries

#### TGTextButton

• Fix a problem with new style when using SetBackgroundPixmap() with flat buttons. To be able to set (and keep) a pixmap as background, one should set the kOwnBackground flag. E.g.:
   fButton->SetBackgroundPixmap(img->GetPixmap());
fButton->ChangeOptions(fButton->GetOptions() | kOwnBackground);
fButton->SetStyle("modern");


#### TRootBrowser

• Use the ProcessedConfigure signal to be notified when an embedded frame change its layout, to properly call Layout() on its parent frame, to automatically display the change (for example, showing the EventStatusBar of a TCanvas embedded in a TBrowser was only appearing after manually resizing the window)

#### TGFSComboBox

• Fix a problem when the current directory is similar to $ROOTSYS, for example with$ROOTSYS being /home/user/root and $PWD being /home/user/rootdev, only "dev" was displayed, stripping off$ROOTSYS
• Properly handle backslashes as directory separators on Windows

#### TGFileDialog

• Change the file name only if the selected entry is not a directory (as reported on the forum)

#### TGMsgBox

• Implemented "Enter" and "Escape" key handling in TGMsgBox (used as Ok and Cancel buttons, if they are there)

#### TGTextEntry

• Several issues with text selection and combination of cursor position and text alignment in text entries have been solved

#### TRootCanvas

• A check has been added for the case where the canvas is embedded (e.g. in the browser), then the layout of the main frame has to be re-applied when showing/hiding the editor
• Stay in the current (working) directory when using "File -> Save as..." from a canvas or from a text editor (as the file dialog changes the current directory)

#### TFitParametersDialog

• Implemented keyboard navigation (tab and shift+tab) between the different number entry fields of the dialog

#### TFitEditor

• Layout improvements and removed useless text in message box

#### TTreeViewer

• Fixed a problem with array names (e.g. fVertex[]) as reported on the forum)

#### TGWin32

• Fixed several resource leaks (including GDI & USER objects)

#### 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

• The table of content entries were not correct if there was and extra option before "Title:".
• After a title was once set, this title will be used for all following additions to the PDF file, instead of "Page ###".
• Better sizes matching with the screen output for markers 6 and 7 (dots).
• Implement the transparency in PDF files. To make a graphics object transparent it is enough to set its color to a transparent one. The color transparency is defined via its alpha component. The alpha value varies from 0. to 1. 0. makes an object fully transparent, and 1. makes it fully opaque. To set the alpha value of an existing color it is enough to do:
         TColor *col26 = gROOT->GetColor(26);
col26->SetAlpha(0.01);

A new color can be created transparent the following way:
         Int_t ci = 1756;
TColor *color = new TColor(ci, 0.1, 0.2, 0.3, 0.5); // alpha = 0.5

An example of tranparency usage with parallel coordinates can be found in \$ROOTSYS/tutorials/tree/parallelcoordtrans.C
• Parenthesis can be used in PDF and PS file names.
• In PDF files, italic greek characters were not correct for non null text angle.

#### TSVG

• Implement the transparency in SVG files (cf TPDF).
• Some markers did not show in Google-Chrome.

#### TImageDump

• Fix a TBox clipping issue.

#### 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.

#### TLegend

• The option E, to draw the error bar on a legend entry, does not need anymore the option L to be active. It is now possible to draw the error bar only using the option E alone. The combination of the options E and L still works as before.
• The text attributes were not properly initialized by the default constructor.
• 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.

#### TPave

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

#### 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.

• New method DivideSquare a canvas in to n sub-pads. The number of sub-pads along the X and Y axis are computed according to the square root of n. Example:
      void divsquare(int w, int h, int n)
{
TCanvas *c = new TCanvas ("c","c",0,0,w,h);
c->DivideSquare(n);
for (int i=1; i<=n; i++) {
c->cd(i);
}
}

• TPad::Print always use TImageDump to print gif, png and jpeg files, in interactive and batch mode (previously it was used in the batch case only). This allows to generate output transparent colors in these formats even in interactive mode. The generation of gif, png and jpeg files from the graphics window in interactive mode is kept for OpenGL canvases.
• 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()).

#### 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.

#### 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.

#### New graphical back-end for MacOSX

TGCocoa/TGQuartz classes are the implementation of TVirtualX based on Cocoa and Quartz 2D. They let to use ROOT's GUI and graphics on MacOS X without installing X11.app and also give an access to Apple's native graphics and GUI frameworks. Window management, event loop, event dispatching, etc. are implemented on top of Cocoa. Graphics (GUI rendering and non-GUI) is done by Quartz 2D (Core Grapchis). An example of a TCanvas with a THStack object, transparency, anti-aliasing, gradient fill, shadows:

ROOT must be configured with --enable-cocoa parameter to use Cocoa back-end instead of X11 version. Please note, this is still a work in progress.

### 3D Graphics Libraries

#### EVE

• TEveRGBAPalette: Add support for displaying palette values in UI elements (GUI, overlay) as real values, mapped with a linear function. This is enabled by calling:
  TEveRGBAPalette::SetUIDoubleRep(Bool_t b, Double_t f=1, Double_t c=0);

and the mapping between integer 'i' and real 'r' values is:
  r = f*i + c;

• TEveRGBAPaletteOverlay New class - an overlay element showing TEveRGBAPalette legend in GL overlay. See tutorials/eve/overlay_palette.C.

### Tutorials

• The new tutorial timeonaxis3.C test the time axis.
• New version of cernbluid.C allowing to turn off the printouts.

ROOT page - Class index - Top of the page -