Dear all,
I have a second question about the histogram cloning. I would like to know if when I clone an histogram, I clone also the objects attached to the histogram like the TPaveText. Can this create problem to the cloning?
Cheers,
Melinda
On Thu, Mar 8, 2012 at 7:39 PM, Melinda Siciliano <mellybinda_at_gmail.com>wrote:
> Dear Philippe,
>
> After some debug, I think that the problem is not related to the Clone
> operation. The problem it is probably related in the way I retrieve the
> histograms from the list.
>
> After the filling of the histograms, that are stored in a TObjectArray, I
> retrieve the histos using a TIter object. During the execution of the code,
> I use the TIter more times and at the end of the list iteration, I use the
> Begin() method to report the iterator at the beginning of the list and
> restart the process. The problem is that after the first iteration, when I
> call the Begin() mehod the iterator point to the second histogram of my
> list and not the first.
>
> I check in the ROOT code and I found that Begin() is implemented as
>
> TIter &TIter::Begin()
> {
> // Pointing to the first element of the container.
>
> fIterator->Reset();
> fIterator->Next();
> return *this;
> }
>
> I tried naively to comment the line with fIterator->Next(); . Now the
> begin method points to the first object as I expect, but the code continues
> to crash and I receive this error:
>
> Program terminated with signal 11, Segmentation fault.
> #0 0x03a522d3 in TList::RecursiveRemove(TObject*) () from
> /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>
> Have I to change the Begin() method in my code with the Reset() method?
> What is the difference between the two methods?
>
>
> Cheers,
>
> Melinda
>
>
>
> On Thu, Mar 8, 2012 at 2:12 PM, Philippe Canal <pcanal_at_fnal.gov> wrote:
>
>> Hi Melinda,
>>
>> Nothing obvious. Do you have a small running example showing the
>> problem?
>>
>> Philippe.
>>
>>
>> On 3/8/12 4:58 AM, Melinda Siciliano wrote:
>>
>> Dear all,
>>
>> I have a problem with the histogram cloning. I used this code with
>> different root version before, and I have never had problem. I updated my
>> root version to v5-30-06 and then v5-32-01 on SLC5. In both cases, I have
>> a loop in a set of histograms is filled ,and after the end of the loop in
>> a new loop the histograms are retrived and manipulated. In the first
>> iteration this second loop the code works fine. At the second iteration the
>> code broke whith the message below. The last ROOT version I used was the
>> v5-30-00-rc2. Can be this error related the some modification in the new
>> ROOT version? How can I avoid it.
>>
>> Thanks in advance for the help,
>>
>> Cheers,
>>
>> Melinda
>>
>> ===========================================================
>> There was a crash (#8 0x025862ed in SigHandler(ESignals) ()).
>> This is the entire stack trace of all threads:
>> ===========================================================
>>
>> Thread 3 (Thread 0xb7ea9b90 (LWP 10327)):
>> #0 0x005fb402 in __kernel_vsyscall ()
>> #1 0x0229f061 in select () from /lib/libc.so.6
>> #2 0x003b8a57 in dim_usleep (usecs=100000) at ./src/dtq.c:291
>> #3 0x003b8b7d in dtq_task (dummy=0x3e0c30) at ./src/dtq.c:325
>> #4 0x003b9d9b in dim_dtq_thread (tag=0x0) at ./src/dim_thr.c:99
>> #5 0x00d5a832 in start_thread () from /lib/libpthread.so.0
>> #6 0x022a64de in clone () from /lib/libc.so.6
>>
>> Thread 2 (Thread 0xb7473b90 (LWP 10328)):
>> #0 0x005fb402 in __kernel_vsyscall ()
>> #1 0x0229f061 in select () from /lib/libc.so.6
>> #2 0x003b72e4 in tcpip_task (dummy=0x3e0c30) at ./src/tcpip.c:713
>> #3 0x003b9d48 in dim_tcpip_thread (tag=0x0) at ./src/dim_thr.c:63
>> #4 0x00d5a832 in start_thread () from /lib/libpthread.so.0
>> #5 0x022a64de in clone () from /lib/libc.so.6
>>
>> Thread 1 (Thread 0xb7f186e0 (LWP 10272)):
>> #0 0x005fb402 in __kernel_vsyscall ()
>> #1 0x022658bb in waitpid () from /lib/libc.so.6
>> #2 0x0220a1ab in do_system () from /lib/libc.so.6
>> #3 0x0220a542 in system () from /lib/libc.so.6
>> #4 0x00d62efd in system () from /lib/libpthread.so.0
>> #5 0x02581d6d in TUnixSystem::Exec(char const*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #6 0x0258991d in TUnixSystem::StackTrace() ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #7 0x0258621b in TUnixSystem::DispatchSignals(ESignals) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #8 0x025862ed in SigHandler(ESignals) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #9 0x0257f1e4 in sighandler(int) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #10 <signal handler called>
>> #11 0x0e3a8864 in ?? ()
>> #12 0x0276ab38 in TInstrumentedIsAProxy<TObject>::operator()(void const*)
>> ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #13 0x0254aa88 in TClass::GetActualClass(void const*) const ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #14 0x0016846f in TBufferFile::WriteObjectAny(void const*, TClass const*)
>> ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #15 0x02529fb5 in TList::Streamer(TBuffer&) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #16 0x02546174 in TClass::StreamerTObjectInitialized(void*, TBuffer&,
>> TClass const*) const ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #17 0x0016f35f in TBufferFile::WriteFastArray(void**, TClass const*, int,
>> bool, TMemberStreamer*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #18 0x00252950 in int TStreamerInfo::WriteBufferAux<char**>(TBuffer&,
>> char** const&, int, int, int, int) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #19 0x001bc159 in TStreamerInfoActions::GenericWriteAction(TBuffer&,
>> void*, TStreamerInfoActions::TConfiguration const*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #20 0x0016a3c7 in
>> TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&,
>> void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #21 0x0016a4b2 in TBufferFile::WriteClassBuffer(TClass const*, void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #22 0x05463c73 in TH1::Streamer(TBuffer&) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libHist.so.5.32
>> #23 0x05533ce4 in ROOT::streamer_TH1(TBuffer&, void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libHist.so.5.32
>> #24 0x02576bb9 in TStreamerBase::WriteBuffer(TBuffer&, char*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #25 0x00255b3e in int TStreamerInfo::WriteBufferAux<char**>(TBuffer&,
>> char** const&, int, int, int, int) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #26 0x001bc159 in TStreamerInfoActions::GenericWriteAction(TBuffer&,
>> void*, TStreamerInfoActions::TConfiguration const*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #27 0x0016a3c7 in
>> TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&,
>> void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #28 0x0016a4b2 in TBufferFile::WriteClassBuffer(TClass const*, void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #29 0x05483a33 in TH2::Streamer(TBuffer&) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libHist.so.5.32
>> #30 0x05535a34 in ROOT::streamer_TH2(TBuffer&, void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libHist.so.5.32
>> #31 0x02576bb9 in TStreamerBase::WriteBuffer(TBuffer&, char*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #32 0x00255b3e in int TStreamerInfo::WriteBufferAux<char**>(TBuffer&,
>> char** const&, int, int, int, int) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #33 0x001bc159 in TStreamerInfoActions::GenericWriteAction(TBuffer&,
>> void*, TStreamerInfoActions::TConfiguration const*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #34 0x0016a3c7 in
>> TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&,
>> void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #35 0x0016a4b2 in TBufferFile::WriteClassBuffer(TClass const*, void*) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #36 0x05483b69 in TH2F::Streamer(TBuffer&) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libHist.so.5.32
>> #37 0x001746c7 in TDirectoryFile::CloneObject(TObject const*, bool) ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libRIO.so.5.32
>> #38 0x024b3dd0 in TObject::Clone(char const*) const ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>> #39 0x024b2eec in TNamed::Clone(char const*) const ()
>> from /home/msicilia/workdata1/alice/root/v5-32-01/lib/libCore.so.5.32
>>
>>
>>
>
Received on Fri Mar 09 2012 - 16:09:08 CET
This archive was generated by hypermail 2.2.0 : Fri Mar 09 2012 - 17:50:01 CET