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
gaede
Messages: 232
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
events.
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 Aug 15 10:06:02 Pacific Daylight Time 2018
.:: Contact :: Home ::.

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