Below is the set of root input and output:
14:57:~/code/root/read/root-scripts>root
root [0] TChain *ptree= new TChain("ptree") ; ptree->Add("$CAENROOT/run159.root"); ptree->Add("$CAENROOT/run159_1.root");
root [1] .x ../psd-cut/cut_02_01/cut_ch1.C
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] cutg->GetName()
(const char* 0xb835f8)"cut1"
root [3] ptree->Draw("Ec","cut1")
*** Break *** segmentation violation
Attaching to program: /proc/6608/exe, process 6608
[Thread debugging using libthread_db enabled]
[New Thread 0x7f657c4156f0 (LWP 6608)]
0x00007f657976d4a5 in waitpid () from /lib/libc.so.6
error detected on stdin
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/6608/exe, process 6608
Root >
And here is the interesting thing – if I do not Add the second file to the Chain, everything works out just fine:
14:58:~/code/root/read/root-scripts>root
root [0] TChain *ptree= new TChain("ptree") ; ptree->Add("$CAENROOT/run159.root");
root [1] .x ../psd-cut/cut_02_01/cut_ch1.C
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] cutg->GetName()
(const char* 0xb83598)"cut1"
root [3] ptree->Draw("Ec","cut1")
(Long64_t)23200
root [4]
What am I doing wrong?
p.s. the cut_ch1.C script is attached for your inspection.
p.p.s. just in case if this matters: the two files that go into the chain are together about 2.1GB, and total to ~10.7mln entries.
cut_ch1.C (1.86 KB)