gate4
1
hello;
I wrote a program to combine files ROOT with Tchain
[b]{
gROOT-> Reset();
TChain chain(“Hits”);
chain.Add("/home/root1010.1.root");
…
…
chain.Add("/home/root1010.23.root");
chain.Draw(“posX”);
TFile *f = new TFile("1010.root ", “recreate”);
}
[/b]
my problem in TFile *f = new TFile("1010.root ", “recreate”);
ROOT 1010.root the file is created but empty, there is nothing.
brun
2
Please read documentation of TChain, in particular TChain::Merge ; root.cern.ch/root/html/TChain.html#TChain:Merge
and do:
{
TChain chain("Hits");
chain.Add("/home/root1010.1.root");
......
....
chain.Add("/home/root1010.23.root");
chain.Merge("1010.root","fast");
}
Rene
gate4
3
hello
thank you
but I have the same problem when I add the command
chain.Merge(“1010.root”,“fast”);
the Hits file is created but empty
[code]{
TChain chain(“Hits”);
chain.Add("/home/root1010.1.root");
…
…
chain.Merge(“1010.root”,“fast”);
}
[/code]
pcanal
4
Hi,
[quote]the Hits file is created but empty
[/quote]
What is the ‘Hits file’ what is it suppose to contain?
Cheers,
Philippe.
gate4
5
[quote=“pcanal”]Hi,
[quote]the Hits file is created but empty
[/quote]
What is the ‘Hits file’ what is it suppose to contain?
Cheers,
Philippe.[/quote]
all information from examples posX;posY;posZ
this in one root file
but after chain the Hits is empty
pcanal
6
Hi,
Could you post the shortest RUNNING example that shows how this is failing for you so that we can attempt to reproduce the problem?
Thanks,
Philippe.