Linear Collider Forum

Home » Software Tools » LCIO » Strange behaviour of LCEvent::takeCollection()
Re: Strange behaviour of LCEvent::takeCollection() [message #1662 is a reply to message #1660] Mon, 08 December 2008 00:53 Go to previous message
Messages: 233
Registered: January 2004
Location: DESY, Hamburg
Hi Martin,

from the documentation of LCEvent::takeCollection():
Returns the collection for the given name and transfers the ownership of the collection
to the caller.

The caller is responsible for deleting the collection _after_ the
Event is deleted. The collection is still in the event but flagged 
as transient after the call returns.
This is usefull when you want to keep the collection for the next
Use with care!

which is what it does.
This behaviour is needed foe example for conditions data collections that should be kept for the following events, as long as they are valid.
Can you not use it that way, i.e. not remove it from the original event ?

Cheers, Frank.
Read Message
Read Message
Previous Topic:stdehepjob fails on 64 bit
Next Topic:confusion about memory issues.
Goto Forum:

Current Time: Wed Feb 26 16:56:36 Pacific Standard Time 2020
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software