46 memset(x, 0,
sizeof(
Double_t) * (dim + 1));
49 for (
Int_t d = 0; d < dim; ++d) {
56 tree->
Branch(
"coord", x, branchname);
57 tree->
Branch(
"bincontent", &x[dim],
"bincontent/D");
62 for (
Int_t d = 0; d < dim; ++d) {
79 TTree* tree = toTree(h);
83 const TLeaf* leaf = 0;
84 while ((leaf = (
const TLeaf*)iLeaf())) {
87 whatToDraw += leaf->GetName();
89 tree->
Draw(whatToDraw,
"",
"para");
96 var->SetHistogramBinning(axis->
GetNbins());
100 var->SetTitle(
"bin content");
107 const Int_t ndims = 8;
108 Int_t bins[ndims] = {10, 10, 5, 30, 10, 4, 18, 12};
109 Double_t xmin[ndims] = {-5., -10., -1000., -3., 0., 0., 0., 0.};
110 Double_t xmax[ndims] = {10., 70., 3000., 3., 5., 2., 2., 5.};
115 for (
Long_t i = 0; i < 100000; ++i) {
116 for (
Int_t d = 0; d < ndims; ++d) {
121 case 3: x[d] = (x[d-1]*x[d-1] - 1.5)/1.5 + (0.5*
gRandom->
Rndm());
break;
129 TFile*
f =
new TFile(
"drawsparse.root",
"RECREATE");
131 TCanvas* canv =
new TCanvas(
"hDrawSparse",
"Drawing a sparse hist");
143 h3proj->
Draw(
"lego1");
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Long64_t Fill(const Double_t *x, Double_t w=1.)
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual Int_t Fill()
Fill all branches.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Long64_t GetNbins() const
THnSparseT< TArrayD > THnSparseD
Efficient multidimensional histogram.
TH1D * Projection(Int_t xDim, Option_t *option="") const
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Double_t Rndm()
Machine independent random number generator.
Double_t GetBinContent(const Int_t *idx) const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TAxis * GetAxis(Int_t dim) const
const char * GetTitle() const
Returns title of object.
Class to manage histogram axis.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
tomato 3-D histogram with a double per channel (see TH1 documentation)}
R__EXTERN TRandom * gRandom
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Int_t GetNdimensions() const
Parallel Coordinates class.
virtual Int_t Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="")
Create one branch for each element in the collection.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
A TTree object has a header with a name and a title.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual TObjArray * GetListOfLeaves()