As you can see, both branches contain the leaf “Ed”.
How can I get the maximum of “Ed” in “bgo” branch without drawing/projecting a histogram? The method T->GetMaximum(“bgo.Ed”) doesn’t work in this case.
TFile *pFile = new TFile(“test.root”, “recreate”);
TTree *pTree = new TTree(“T”, “test tree”);
pTree->Branch(“br1”, &branch1, “x/F:y/F”);
pTree->Branch(“br2”, &branch2, “y/F:z/F”);
for (Int_t i=0; i<5; i++)
{
branch1.fx = i;
branch1.fy = i2;
branch2.fy = i3;
branch2.fz = i*4;
pTree->Fill();
}
pTree->Write("", TObject::kOverwrite);
pFile->Write();
pTree->Print();
pFile->Close();
}
[/code]
As you can see, x and z leafs exist only in one branch (br1 and br2 accordingly), but y leaf belongs to both branches.
T->GetMaximum(“x”) gives 4 - that’s right;
T->GetMaximum(“z”) gives 16 - and that’s right too;
But my question is: how can one get the maximum of y column in the second branch, for example? I was awaiting to say:
T->GetMaximum(“br2.y”), but it gives 0 instead of 12!
The prototype of GetMaximum() method is
Double_t TTree::GetMaximum(const char *columname)
What does columname mean in this very case?