Dear Experts,

I’m trying to plot histograms from a small root file with using following way,

```
TFile *TPCTOFEfffile = TFile::Open("EFFTPCTOF.root","read");
TH1F* TPCTOFEFFDeltapp = (TH1F*)(TPCTOFEfffile->FindObject(hEff;1)) ;
TH1F* TPCTOFEFFDeltamm = (TH1F*)(TPCTOFEfffile->FindObject(hEff;2)) ;
TH1F* TPCTOFEFFAverage = (TH1F*)(TPCTOFEfffile->FindObject(hEff;3)) ;
TCanvas *d23 = new TCanvas("d23","efficiency*acc",0,0,950,700);
TPCTOFEFFDeltapp->Draw();
TPCTOFEFFDeltamm->Draw("same");
TPCTOFEFFAverage->Draw("same");
d23->SaveAs("TPC_TOF_EFF_ACC.eps");
```

This gives following crash,

```
root [0] .x test.C
*** Break *** segmentation violation
===========================================================
There was a crash (#7 0x002f6b6d in SigHandler ()).
This is the entire stack trace of all threads:
===========================================================
#0 0x00110402 in __kernel_vsyscall ()
#1 0x02ad6953 in __waitpid_nocancel () from /lib/libc.so.6
#2 0x02a7abab in do_system () from /lib/libc.so.6
#3 0x052038dd in system () from /lib/libpthread.so.0
#4 0x002f279d in TUnixSystem::Exec ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#5 0x002f9c0d in TUnixSystem::StackTrace ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#6 0x002f6a98 in TUnixSystem::DispatchSignals ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#7 0x002f6b6d in SigHandler ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#8 0x002f0014 in sighandler ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#9 <signal handler called>
#10 0x004245f4 in G__G__Base2_10_0_15 ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#11 0x009c1a8a in Cint::G__ExceptionWrapper ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#12 0x00a7c076 in G__execute_call ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#13 0x00a8063d in G__call_cppfunc ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#14 0x00a533e3 in G__interpret_func ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#15 0x00a41088 in G__getfunction ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#16 0x00b3feec in G__getstructmem ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#17 0x00b35bc8 in G__getvariable ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#18 0x00a148f1 in G__getitem ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#19 0x00a1f3b5 in G__getexpr ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#20 0x00ab2ab0 in G__exec_statement ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#21 0x00a555f6 in G__interpret_func ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#22 0x00a411fd in G__getfunction ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#23 0x00a149e1 in G__getitem ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#24 0x00a1f3b5 in G__getexpr ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#25 0x00a25fcd in G__calc_internal ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#26 0x00abea87 in G__process_cmd ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCint.so
#27 0x002b0ac3 in TCint::ProcessLine ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#28 0x002b06df in TCint::ProcessLineSynch ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#29 0x00203989 in TApplication::ExecuteFile ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#30 0x00203f1c in TApplication::ProcessFile ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#31 0x00200a95 in TApplication::ProcessLine ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#32 0x0082d234 in TRint::HandleTermInput ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libRint.so
#33 0x0082b575 in TTermInputHandler::Notify ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libRint.so
#34 0x0082dd04 in TTermInputHandler::ReadNotify ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libRint.so
#35 0x002f667b in TUnixSystem::CheckDescriptors ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#36 0x002f7202 in TUnixSystem::DispatchOneEvent ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#37 0x00263be1 in TSystem::InnerLoop ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#38 0x00267d01 in TSystem::Run ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#39 0x001ff1a8 in TApplication::Run ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libCore.so
#40 0x0082d7ff in TRint::Run ()
from /home/myroot/CERN2/alice/packages/VO_ALICE/ROOT/v5-28-00a/v5-28-00a/lib/libRint.so
#41 0x08048d83 in main ()
===========================================================
The crash is most likely caused by a problem in your script.
Try to compile it (.L myscript.C+g) and fix any errors.
If that does not help then please submit a bug report at
[root.cern.ch/bugs](http://root.cern.ch/bugs). Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
Root > Function test() busy flag cleared
```

Please help me to find where I’m doing wrong.

Thank you,

Kind regards,

Ayben

test.C (478 Bytes)

EFFTPCTOF.root (4.84 KB)