Print

Print


Commit in lcio/src/cpp/src/UTIL on MAIN
LCStdHepRdr.cc+26-221.9 -> 1.10
fixed 'bug' in updateNextEvent: ignore daughters if the first daughter index is illegal (0 in stdhep)

lcio/src/cpp/src/UTIL
LCStdHepRdr.cc 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- LCStdHepRdr.cc	23 Nov 2007 15:54:04 -0000	1.9
+++ LCStdHepRdr.cc	7 Nov 2008 15:53:12 -0000	1.10
@@ -390,29 +390,33 @@
 	    }
 
 	  }
-	else if(ld > -1 )
-	  {
-	    if(  ld < NHEP ){
-	      d = dynamic_cast<MCParticleImpl*>
-		(mcVec->getElementAt(ld));
-	      int np = d->getParents().size();
-	      bool gotit = false;
-	      for(int ip=0;ip < np;ip++)
-		{
-		  p = dynamic_cast<MCParticleImpl*>
-		    (d->getParents()[ip]);
-		  if(p == mcp)gotit = true;
-		}
-	      if(!gotit)d->addParent(mcp);
-
-	    } else {
-	      //FIXME: whizdata has lots of of illegal daughter indices 21 < NHEP
-// 	      std::cout << " WARNING: LCStdhepReader: invalid index in stdhep : " << ld 
-// 			<< " NHEP = " << NHEP << " - ignored ! " << std::endl ;
+// --------- fg: ignore daughters if the first daughter index is illegal (0 in stdhep, -1 here)
+// 	else if(ld > -1 )
+// 	  {
+// 	    std::cout << " WARNING: LCStdhepReader: illegal daughter index in stdhep : " << ld 
+// 		      << " NHEP = " << NHEP << " - ignored ! " << std::endl ;
+	// 	    if(  ld < NHEP ){
+	// 	      d = dynamic_cast<MCParticleImpl*>
+	// 		(mcVec->getElementAt(ld));
+	// 	      int np = d->getParents().size();
+	// 	      bool gotit = false;
+	// 	      for(int ip=0;ip < np;ip++)
+	// 		{
+	// 		  p = dynamic_cast<MCParticleImpl*>
+	// 		    (d->getParents()[ip]);
+	// 		  if(p == mcp)gotit = true;
+	// 		}
+	// 	      if(!gotit)d->addParent(mcp);
+	
+	// 	    } else {
+	// 	      //FIXME: whizdata has lots of of illegal daughter indices 21 < NHEP
+	// // 	      std::cout << " WARNING: LCStdhepReader: invalid index in stdhep : " << ld 
+	// // 			<< " NHEP = " << NHEP << " - ignored ! " << std::endl ;
+	
+	// 	    }
+	
+	// 	  }
 
-	    }
-
-	  }
       }// End second loop over particles
     //
     //  Return the collection
CVSspam 0.2.8