lcio/rootio
diff -u -r1.1.2.3 -r1.1.2.4
--- readevent.C 20 Nov 2009 15:28:50 -0000 1.1.2.3
+++ readevent.C 24 Nov 2009 10:47:21 -0000 1.1.2.4
@@ -76,12 +76,12 @@
branches.push_back( bevt ) ;
IMPL::LCCollectionVec* col = new IMPL::LCCollectionVec ;
-// branches.push_back( t->GetBranch("MCParticlesSkimmed") ) ;
-// branches.back()->SetAddress( &col ) ;
+ branches.push_back( t->GetBranch("MCParticlesSkimmed") ) ;
+ branches.back()->SetAddress( &col ) ;
IMPL::LCCollectionVec* cpfo = new IMPL::LCCollectionVec ;
-// branches.push_back( t->GetBranch("PandoraPFOs") ) ;
-// branches.back()->SetAddress( &cpfo ) ;
+ branches.push_back( t->GetBranch("PandoraPFOs") ) ;
+ branches.back()->SetAddress( &cpfo ) ;
IMPL::LCCollectionVec* crml = new IMPL::LCCollectionVec ;
@@ -135,7 +135,8 @@
EVENT::ReconstructedParticle* pfo = dynamic_cast<EVENT::ReconstructedParticle*>( cpfo->getElementAt(j) ) ;
- ePFO += pfo->getEnergy() ;
+ if( pfo )
+ ePFO += pfo->getEnergy() ;
}
hepfo->Fill(ePFO) ;
@@ -153,7 +154,8 @@
// cout << " ++ " << mcp << endl ;
- herm->Fill( pfo->getEnergy() , mcp->getEnergy() ) ;
+ if( pfo && mcp )
+ herm->Fill( pfo->getEnergy() , mcp->getEnergy() ) ;
}
lcio/src/cpp/src/RIO
diff -u -r1.1.2.4 -r1.1.2.5
--- RIOWriter.cc 20 Nov 2009 15:28:51 -0000 1.1.2.4
+++ RIOWriter.cc 24 Nov 2009 10:47:21 -0000 1.1.2.5
@@ -219,7 +219,7 @@
std::string typeName = col->getTypeName() ;
std::cout << " registering collection " << *name << " of " << typeName << std::endl ;
- if( *name == "RecoMCTruthLink" )
+ if( *name != "RecoMCTruthLink" )
//if( *name == "PandoraPFOs" )
_branches[ *name ] = new RIO::RIOLCCollectionHandler( *name, typeName, _tree) ;
}