Linear Collider Forum



Home » Software Tools » LCIO » confusion about memory issues.
Re: confusion about memory issues. [message #1670 is a reply to message #1668] Fri, 19 December 2008 07:35 Go to previous message
fengy
Messages: 15
Registered: September 2008
Location: IU
Thanks for the clarify, Frank.

So it basicially means LCEvent holds the ownership of the LCCollections, and the LCCollections hold the owndership of LCObjects.

I also noticed LCObject::clone is not overidden in MCParticle subclass.

therefore, I can not preserve a LCObject after the event is removed, right?


BTW: did you know GObject system? GObject features dynamical types at runtime.
It seems like a lot of physics projects also need to do this heavily(ROOT!?), but C++ actually doesn't support it well in a fundamental level.

AKA in gobject you can do a LCIO_IS_MCPARTICLE_COLLECTION(mc_particles), or (mc_particles is MCParticleCollection), where in C++ we have to define mc_particles.getName() == LCIO::MCPARTICLE: basically implementing minimal dynamical types.

I know it is impossible to switch the fundamental of the frameworks. I am just trying to let more people know this excellent toolkit.

Yu
 
Read Message
Read Message
Read Message
Previous Topic:Strange behaviour of LCEvent::takeCollection()
Next Topic:new release v01-11
Goto Forum:
  


Current Time: Sun Feb 25 01:25:04 Pacific Standard Time 2018
.:: Contact :: Home ::.

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