Linear Collider Forum



Home » Software Tools » LCIO » Seg Fault when adding collections
Re: Seg Fault when adding collections [message #2207 is a reply to message #2206] Wed, 15 February 2012 04:38 Go to previous messageGo to previous message
gaede
Messages: 232
Registered: January 2004
Location: DESY, Hamburg
Hi Tony,

LCIO collections take ownership of their elements.
If you copy elements (pointers to elements, really) from an existing collection to a new one, you need to flag the new collection as a 'subset collection' (i.e. only pointers are stored and elements not deleted at end of scope):

  lccParticlesOut->setSubset(true); 



Cheers, Frank.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:LCIO Wiki
Next Topic:Request: addition of "quality" word to TrackerData
Goto Forum:
  


Current Time: Wed Aug 15 10:07:50 Pacific Daylight Time 2018
.:: Contact :: Home ::.

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