Fill Tree Branch with char array

Hello

I would like to fill a Tree Branch with a char array.

This is a small example of I would like to do:

{
char name []=“ppKGKG”;

TTree * t = new TTree (“Tree”,“Example Tree”);

t->Branch(“process”,name,“name/C”);
t->Fill();
t->Show(0);
}

Executing this I get the output:

======> EVENT:0
name = ppKGKG,
ppKGKG, ppKGKG, ppKGKG, ppKGKG, ppKGKG,
ppKGKG

So the string is repetead 7 times!

I don’t understand what is happening?
Should I use string or TString objects ?

Best Regards
Pedro Ribeiro

I do not see a problem with your example.
Indicate which version you are using. See
root.cern.ch/root/roottalk/RoottalkRules.html

Rene

I am using ROOT version 4.00/07, on RedHat 7.3 Linux Cern ( kernel 2.4.20-30.7.cern )

I will try latter to instal the PRO version of ROOT, to see what happens.

Pedro Ribeiro