Hi, I am not able to reproduce this problem. However, you should not that, even if successfull, the procedure you follow would not do what you need. Graphical Cut are uniquely identified by name. They get the default name CUTG. If you try to create a 2nd cut, the first one will be deleted unless you changed its name. So you currently would have: (1) open ROOT format file (2) draw a 2d histogram (3) define a graphical cut by the graphical editor. (4) define one more graphical cut for another region of the same histogram. (5) first cut is deleted. Instead do: (1) open ROOT format file (2) draw a 2d histogram (3) define a graphical cut by the graphical editor. (4) rename the graphical cut. (5) define one more graphical cut for another region of the same histogram. To do (4), either right-click on the cut and select SetName or do on the command line: TObject *cut = gROOT->GetListOfSpecials()->FindObject("CUTG"); if (cut) cut->SetName("myfirstcut"); Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Satoru KAMEOKA Sent: Thursday, August 07, 2003 3:07 AM To: brun@pcbrun.cern.ch Cc: roottalk@pcroot.cern.ch Subject: Re: [ROOT] How to define multiple gcut with one histogram Hi, Rene, sorry for my insufficient information. What I did are, (1) open ROOT format file (2) draw a 2d histogram (3) define a graphical cut by the graphical editor. (4) attempt to define one more graphical cut for another region of the same histogram. (5) segmentation violation. I am running ROOT on RedHat Linux 8.0. (gdb) run Starting program: /usr/local/cern/root/v3.05.05/bin/root.exe [New Thread 8192 (LWP 3149)] ******************************************* * * * W E L C O M E to R O O T * * * * Version 3.05/05 15 May 2003 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for linux with thread support. CINT/ROOT C/C++ Interpreter version 5.15.86, Apr 29 2003 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] TFile f("calib_1550-1590.root") root [1] h51003->Draw() <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 root [2] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 8192 (LWP 3149)] 0x40918803 in TGraph::ExecuteEvent(int, int, int) () from /usr/local/cern/root/dev/lib/libGraf.so (gdb) bt #0 0x40918803 in TGraph::ExecuteEvent(int, int, int) () from /usr/local/cern/root/dev/lib/libGraf.so #1 0x40e430b0 in TCanvas::HandleInput(EEventType, int, int) () from /usr/local/cern/root/dev/lib/libGpad.so #2 0x411323d8 in TRootCanvas::HandleContainerButton(Event_t*) () from /usr/local/cern/root/dev/lib/libGui.so #3 0x41132b9f in TRootContainer::HandleButton(Event_t*) () from /usr/local/cern/root/dev/lib/libGui.so #4 0x410db7f4 in TGFrame::HandleEvent(Event_t*) () from /usr/local/cern/root/dev/lib/libGui.so #5 0x410c1a25 in TGClient::HandleEvent(Event_t*) () from /usr/local/cern/root/dev/lib/libGui.so #6 0x410c171a in TGClient::ProcessOneEvent() () from /usr/local/cern/root/dev/lib/libGui.so #7 0x410c17ab in TGClient::HandleInput() () from /usr/local/cern/root/dev/lib/libGui.so #8 0x410be902 in TGInputHandler::Notify() () from /usr/local/cern/root/dev/lib/libGui.so #9 0x4019ed39 in TUnixSystem::DispatchOneEvent(bool) () from /usr/local/cern/root/dev/lib/libCore.so #10 0x40123051 in TSystem::InnerLoop() () from /usr/local/cern/root/dev/lib/libCore.so #11 0x40122fea in TSystem::Run() () from /usr/local/cern/root/dev/lib/libCore.so #12 0x400d8715 in TApplication::Run(bool) () from /usr/local/cern/root/dev/lib/libCore.so #13 0x40c87820 in TRint::Run(bool) () from /usr/local/cern/root/dev/lib/libRint.so #14 0x08048782 in main () #15 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 Best regards, Satoru Kameoka From: Rene Brun <brun@pcbrun.cern.ch> Subject: Re: [ROOT] How to define multiple gcut with one histogram Date: Thu, 7 Aug 2003 09:28:01 +0200 (MEST) Message-ID: <Pine.LNX.4.44.0308070927010.1154-100000@pcbrun.cern.ch> > Hi Satoru, > > I cannot reproduce this problem. Please give more details and run under > gdb. > see :http://root.cern.ch/root/roottalk/RoottalkRules.html > > Rene Brun > > On Thu, 7 Aug > 2003, Satoru KAMEOKA wrote: > > > Dear ROOTers, > > > > When I try to define second graphical cut(TCutG) object on > > 2d-histogram by graphical editor, segmentation violation is caused. > > What's going on? > > I am using ver.3.05/05. > > Followings are the stack trace. > > > > root [4] > > *** Break *** segmentation violation > > Generating stack trace... > > 0x401a06fe in TUnixSystem::StackTrace() + 0x36c from /usr/local/cern/root/dev//lib/libCore.so > > 0x4019f2c2 in TUnixSystem::DispatchSignals(ESignals) + 0x7a from /usr/local/cern/root/dev//lib/libCore.so > > 0x4019e4d3 in <unknown> from /usr/local/cern/root/dev//lib/libCore.so > > 0x401a1ee1 in <unknown> from /usr/local/cern/root/dev//lib/libCore.so > > 0x40cca47e in <unknown> from /lib/i686/libpthread.so.0 > > 0x42028c48 in <unknown> from /usr/local/cern/root/dev//bin/root.exe > > 0x40e430b0 in TCanvas::HandleInput(EEventType, int, int) + 0x296 from /usr/local/cern/root/dev//lib/libGpad.so > > 0x411323d8 in TRootCanvas::HandleContainerButton(Event_t*) + 0xcc from /usr/local/cern/root/dev//lib/libGui.so > > 0x41132b9f in TRootContainer::HandleButton(Event_t*) + 0x21 from /usr/local/cern/root/dev//lib/libGui.so > > 0x410db7f4 in TGFrame::HandleEvent(Event_t*) + 0x158 from /usr/local/cern/root/dev//lib/libGui.so > > 0x410c1a25 in TGClient::HandleEvent(Event_t*) + 0xd1 from /usr/local/cern/root/dev//lib/libGui.so > > 0x410c171a in TGClient::ProcessOneEvent() + 0x6e from /usr/local/cern/root/dev//lib/libGui.so > > 0x410c17ab in TGClient::HandleInput() + 0x2d from /usr/local/cern/root/dev//lib/libGui.so > > 0x410be902 in TGInputHandler::Notify() + 0x1e from /usr/local/cern/root/dev//lib/libGui.so > > 0x4019ed39 in TUnixSystem::DispatchOneEvent(bool) + 0x3b from /usr/local/cern/root/dev//lib/libCore.so > > 0x40123051 in TSystem::InnerLoop() + 0x1b from /usr/local/cern/root/dev//lib/libCore.so > > 0x40122fea in TSystem::Run() + 0x78 from /usr/local/cern/root/dev//lib/libCore.so > > 0x400d8715 in TApplication::Run(bool) + 0x2d from /usr/local/cern/root/dev//lib/libCore.so > > 0x40c87820 in TRint::Run(bool) + 0x2e4 from /usr/local/cern/root/dev//lib/libRint.so > > 0x08048782 in main + 0x6e from /usr/local/cern/root/dev//bin/root.exe > > 0x420158d4 in __libc_start_main + 0xa4 from /usr/local/cern/root/dev//bin/root.exe > > 0x08048685 in _Unwind_Resume + 0x31 from /usr/local/cern/root/dev//bin/root.exe > > > > > > > > Best regards, > > Satoru Kameoka > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET