slic/scripts
diff -u -r1.1 -r1.2
--- gdb.sh 15 Jul 2005 05:57:21 -0000 1.1
+++ gdb.sh 12 Oct 2005 19:31:29 -0000 1.2
@@ -1 +1,2 @@
+source $SLIC_BASE/scripts/ld-path.sh
gdb $SLIC_BASE/bin/Linux-g++/slic -command=gdb.cmd
slic/src
diff -u -r1.26 -r1.27
--- StdHepToLcioConvertor.cc 12 Oct 2005 17:22:39 -0000 1.26
+++ StdHepToLcioConvertor.cc 12 Oct 2005 19:31:29 -0000 1.27
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.26 2005/10/12 17:22:39 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.27 2005/10/12 19:31:29 jeremy Exp $
#include "StdHepToLcioConvertor.hh"
// slic
@@ -72,7 +72,7 @@
}
#endif
- // first loop over records to create MCP and set parent links
+ /* Loop #1 : Create MCParticles with no parentage or daughter links. */
int ntracks = m_reader->nTracks();
for ( int ihep = 0;
ihep < ntracks;
@@ -88,9 +88,20 @@
}
#endif
- // FIXME: First loop should not set parentage. Add additional loop to do this.
+ /* Loop #2 : Set the MCParticle parentage. */
+ for ( int ihep = 0;
+ ihep < ntracks;
+ ihep++ ) {
+
+ MCParticleImpl* mcp =
+ dynamic_cast<MCParticleImpl*> ( m_currentMcpColl->getElementAt(ihep) );
- // second loop to set daughter links
+ if ( mcp ) {
+ setupParents( ihep, mcp, m_reader, m_currentMcpColl );
+ }
+ }
+
+ /* Loop #3 : Setup the daughters. */
for ( int ihep = 0;
ihep < ntracks;
ihep++ ) {
@@ -114,7 +125,10 @@
#endif
}
- // create based on args
+ /*
+ * Create an MCParticle from a single StdHep particle record.
+ * NOTE: Does not setup parentage or daughters.
+ */
IMPL::MCParticleImpl* StdHepToLcioConvertor::createMcpFromStdHep( int ihep, lStdHep* rdr, EVENT::LCCollection* mcpColl )
{
assert(mcpColl);
@@ -197,9 +211,6 @@
// add to mcpColl
mcpColl->addElement( mcp );
- // setup parentage
- setupParents( ihep, mcp, rdr, mcpColl );
-
#ifdef SLIC_VERBOSE
if ( verbose() > 1 ) {
cout << "done with ihep <" << ihep << ">" << endl;