26 T->Branch(
"v3",&
v,32000,1);
28 for (
Int_t i=0;i<10000;i++) {
29 v->SetXYZ(
r.Gaus(0,1),
r.Landau(0,1),
r.Gaus(100,10));
41 T->SetBranchAddress(
"v3",&
v);
42 TH1F *
h1 =
new TH1F(
"x",
"x component of Vector3",100,-3,3);
56 T->SetBranchAddress(
"v3",&
v);
57 TBranch *by = T->GetBranch(
"fY");
58 TH1F *h2 =
new TH1F(
"y",
"y component of Vector3",100,-5,20);
A TTree is a list of TBranches.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a float per channel (see TH1 documentation)}
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.
void SetXYZ(Double_t x, Double_t y, Double_t z)