Linear Collider Forum



Home » Software Tools » LCIO » Daughter Collections
Re: Daughter Collections [message #1712 is a reply to message #1710] Thu, 19 March 2009 06:21 Go to previous messageGo to previous message
gaede
Messages: 232
Registered: January 2004
Location: DESY, Hamburg
Hi Oliver,

as Martin has pointed out correctly (missed his posting when writing mine..) :

the mechanism you can use are the subset collections. You simple create two new collections and set the subset flag:
LCCollectionVec* col1= new LCCollectionVec ;
LCCollectionVec* col2= new LCCollectionVec ;
col1.setSubset(true) ;
col2.setSubset(true) ;

//... loop over original collection ....

  if( cond1 )
    col1->addElement( e ) ;
  else
    col2->addElement( e) ;

These collections will just hold pointers, i.e. no unnecessary copying involved.

-Frank.

[Updated on: Thu, 19 March 2009 06:23]

 
Read Message
Read Message
Read Message
Read Message
Previous Topic:easier way to test if an object is in an collection?
Next Topic:lsh: this event does not exist
Goto Forum:
  


Current Time: Mon May 21 11:59:34 Pacific Daylight Time 2018
.:: Contact :: Home ::.

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