This new, backward compatible, version has major enhancements described below.
Binaries for all supported platforms are available at:
http://root.cern.ch/root/Version401.html
Versions for AFS have also been updated. See the list of supported platforms:
http://root.cern.ch/root/AFS.html
For more information, see:
http://root.cern.ch
Ilka Antcheva,
TTree::SetMaxTreeSize(Long64_t maxsize)
void TTree::SetCircular(Long64_t maxEntries)
where maxEntries is the maximum number of entries to be kept in the buffers.
When the number of entries exceeds this value, the first entries in the Tree
are deleted and the buffers used again.
The implementation minimizes memory operations by swapping basket pointers
and only shifting the data in the new first buffer.
An example of a script using a circular buffer is shown below
void circular() {
gROOT->cd(); //make sure that the Tree is memory resident
TTree *T = new TTree("T","test circular buffers");
TRandom r;
Float_t px,py,pz;
Double_t random;
UShort_t i;
T->Branch("px",&px,"px/F");
T->Branch("py",&py,"px/F");
T->Branch("pz",&pz,"px/F");
T->Branch("random",&random,"random/D");
T->Branch("i",&i,"i/s");
T->SetCircular(20000);
for (i = 0; i < 65000; i++) {
r.Rannor(px,py);
pz = px*px + py*py;
random = r.Rndm();
T->Fill();
}
T->Print();
}
The class derives from the abstract interface TVirtualIndex. It provides the same functionality as the previous code, but in addition, it supports more complex cases.
When a Tree friend has a TTreeIndex (created as before via TTree::BuildIndex), the friend tree and the parent Tree do not need to have the same serial numbers. The friend tree may have less or more events.
When getting an entry in the parent tree, the corresponding entry in the friend will be computed via the index. Note that to support this new feature, the parent Tree does not need an index. Only the friend Tree must have an index. See comments in the TTreeIndex constructor.
TTree::BuildIndex() may be used with a major-name only.
colsize=ss
Where 'ss' will be used as the default size for all the column
If this options is not specified, the default column size is 9
precision=pp
Where 'pp' will be used as the default 'precision' for the
printing format.
col=xxx
Where 'xxx' is colon (:) delimited list of printing format for
each column if no format is specified for a column, the default is
used.
For example:
tree->Scan("a:b:c","","colsize=30 precision=3 col=::20.10");
Will print 3 columns, the first 2 columns will be 30 characters long,
the third columns will be 20 characters long. The
for the columns (assuming they are numbers) will be respectively:
%30.3g %30.3g %20.10g
o Del - delete selected frame
o Shift-Del - crop action
o Ctrl-X - cut action
o Ctrl-C - copy action
o Ctrl-V - paste action
o Ctrl-R - replace action
o Ctrl-L - compact layout
o Ctrl-B - break layout
o Ctrl-H - switch horizontal-vertical layout
o Ctrl-G - switch on/off grid
o Ctrl-S - save action
o Ctrl-O - open and execute a ROOT macro file. GUI components created
after macro execution will be emebedded to currently edited
design area.
o Ctrl-N - create new main frame
- TH2 *TH2::RebinX(Int_t ngroup, const char *newname) - TH2 *TH2::RebinY(Int_t ngroup, const char *newname) - TH2 *TH2::Rebin2D(Int_t nxgroup, Int_t nygroup, const char *newname):
[0]*exp(-0.5*((x-[1])/[2])**2)
To obtain a standard normalized gaussian, use "gausn" instead of "gaus".
The expression "gausn" is a substitute for
[0]*exp(-0.5*((x-[1])/[2])**2)/sqrt(2*pi*[2])
The "gaus" and "gausn" functions use now TMath::Gaus.
Double_t TMath::CauchyDist(Double_t x, Double_t t, Double_t s)
Double_t TMath::GammaDist(Double_t x, Double_t gamma, Double_t mu, Double_t beta)
Double_t TMath::LogNormal(Double_t x, Double_t sigma, Double_t theta, Double_t m)
// Min, Max of an array
static Short_t MinElement(Long64_t n, const Short_t *a);
static Int_t MinElement(Long64_t n, const Int_t *a);
static Float_t MinElement(Long64_t n, const Float_t *a);
static Double_t MinElement(Long64_t n, const Double_t *a);
static Long64_t MinElement(Long64_t n, const Long64_t *a);
static Short_t MaxElement(Long64_t n, const Short_t *a);
static Int_t MaxElement(Long64_t n, const Int_t *a);
static Float_t MaxElement(Long64_t n, const Float_t *a);
static Double_t MaxElement(Long64_t n, const Double_t *a);
static Long64_t MaxElement(Long64_t n, const Long64_t *a);
// Locate Min, Max element number in an array
static Long64_t LocMin(Long64_t n, const Short_t *a);
static Long64_t LocMin(Long64_t n, const Int_t *a);
static Long64_t LocMin(Long64_t n, const Float_t *a);
static Long64_t LocMin(Long64_t n, const Double_t *a);
static Long64_t LocMin(Long64_t n, const Long64_t *a);
static Long64_t LocMax(Long64_t n, const Short_t *a);
static Long64_t LocMax(Long64_t n, const Int_t *a);
static Long64_t LocMax(Long64_t n, const Float_t *a);
static Long64_t LocMax(Long64_t n, const Double_t *a);
static Long64_t LocMax(Long64_t n, const Long64_t *a);
//Mean, Geometric Mean, Median, RMS
static Double_t Mean(Long64_t n, const Short_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Int_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Float_t *a, const Double_t *w=0);
static Double_t Mean(Long64_t n, const Double_t *a,const Double_t *w=0);
static Double_t Mean(Long64_t n, const Long64_t *a,const Double_t *w=0);
static Double_t GeomMean(Long64_t n, const Short_t *a);
static Double_t GeomMean(Long64_t n, const Int_t *a);
static Double_t GeomMean(Long64_t n, const Float_t *a);
static Double_t GeomMean(Long64_t n, const Double_t *a);
static Double_t GeomMean(Long64_t n, const Long64_t *a);
static Double_t RMS(Long64_t n, const Short_t *a);
static Double_t RMS(Long64_t n, const Int_t *a);
static Double_t RMS(Long64_t n, const Float_t *a);
static Double_t RMS(Long64_t n, const Double_t *a);
static Double_t RMS(Long64_t n, const Long64_t *a);
static Double_t Median(Long64_t n, const Short_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Int_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Float_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Double_t *a, const Double_t *w=0, Long64_t *work=0);
static Double_t Median(Long64_t n, const Long64_t *a, const Double_t *w=0, Long64_t *work=0);
static Short_t KOrdStat(Long64_t n, const Short_t *a, Long64_t k, Long64_t *work=0);
static Int_t KOrdStat(Long64_t n, const Int_t *a, Long64_t k, Long64_t *work=0);
static Float_t KOrdStat(Long64_t n, const Float_t *a, Long64_t k, Long64_t *work=0);
static Double_t KOrdStat(Long64_t n, const Double_t *a, Long64_t k, Long64_t *work=0);
static Long64_t KOrdStat(Long64_t n, const Long64_t *a, Long64_t k, Long64_t *work=0);
// Binary search
static Long64_t BinarySearch(Long64_t n, const Short_t *array, Short_t value);
static Long64_t BinarySearch(Long64_t n, const Short_t **array, Short_t value);
static Long64_t BinarySearch(Long64_t n, const Int_t *array, Int_t value);
static Long64_t BinarySearch(Long64_t n, const Int_t **array, Int_t value);
static Long64_t BinarySearch(Long64_t n, const Float_t *array, Float_t value);
static Long64_t BinarySearch(Long64_t n, const Float_t **array, Float_t value);
static Long64_t BinarySearch(Long64_t n, const Double_t *array, Double_t value);
static Long64_t BinarySearch(Long64_t n, const Double_t **array, Double_t value);
static Long64_t BinarySearch(Long64_t n, const Long64_t *array, Long64_t value);
static Long64_t BinarySearch(Long64_t n, const Long64_t **array, Long64_t value);
// Sorting
static void Sort(Int_t n, const Short_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Int_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Float_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Double_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Int_t n, const Long64_t *a, Int_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Short_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Int_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Float_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Double_t *a, Long64_t *index, Bool_t down=kTRUE);
static void Sort(Long64_t n, const Long64_t *a, Long64_t *index, Bool_t down=kTRUE);
We added a new option to rootcint --lib-list-prefi=xxx. When used, it tells rootcint to read a list of rootmap files in xxx.in and output in xxx.out a list of libraries where the symbols in the header files can be found.
Also to keep track of the dependencies, the library produced by ACLiC are now explictly linked to all the libraries loaded in ROOT at the time (which now included the result of autoloading). This allow the resulting library to be also loaded in a new session (with the user loading any other library).
.qqqqq (or .QQQQQ) calls gSystem->Exit
.qqqqqqq (or .QQQQQQQ) calls gSystem->Abort
This matches the corresponding CINT options:
qqqqq : exit process immediately
qqqqqqq : abort process