I’m trying to fill a single Branch (I don’t want to use tree->fill() ).
Therefor I wrote something like:
TFile *file;
TTree *tree;
TBranch *bra;
[…]
void open(void)
{
file = new TFile("./histotree.root",“RECREATE”);
tree= new TTree(“Asim”,“name2”);
bra = new evtree->Branch(“bra”,&blatt,“amp/I:channel/I:rot/I:dist/F:height/F”);
}
If I do write “tree->fill” instead of “bra->fill” everything is fine.
But since I need to create several branches and I have to choose which branch has to be filled, I can’t use “tree->fill”.
As far as I’ve seen in the web, “Fill” should be declared for TBranch, too (?),
so what am I doing wrong ?
[quote]But since I need to create several branches and I have to choose which branch has to be filled, I can’t use “tree->fill”.
As far as I’ve seen in the web, “Fill” should be declared for TBranch, too (?),
[/quote]
What is your problem?
In general it does not make much sense to fill only one branch.