Dear All,
I am trying to fill a TBranch with a table of characters, but the way I did it doesn’t work correctly…
G4String name;
Int_t Nsampler;
const Char_t SamplerName[20];
TTree SamplerTree = new TTree(“AllDetectors”, “Sampler output”);
…
SamplerTree->Branch(“Nsampler”,&Nsampler,“Nsampler/I”);
SamplerTree>Branch(“SamplerName”,(void*)SamplerName,“SamplerName[Nsampler]/C”);
…
…
// Place where I fill the Branch
for(Int_t i=0;i<Nsampler;i++)
{
…
SamplerName[i]=name.c_str();
…
}
sTree->Fill();
Please tell me where I am wrong.
Hayg