]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
expand particle map when needed
authorsaiola <salvatore.aiola@cern.ch>
Thu, 10 Jul 2014 14:39:21 +0000 (10:39 -0400)
committersaiola <salvatore.aiola@cern.ch>
Thu, 10 Jul 2014 14:39:39 +0000 (10:39 -0400)
PWG/EMCAL/AliEmcalMCTrackSelector.cxx

index c634b19f5ef109ebfa51df522144be2dde3335d7..d083e74c259e15837ecdb6e1ce52817e6ecb8227 100644 (file)
@@ -216,6 +216,8 @@ void AliEmcalMCTrackSelector::CopyMCParticles()
 
   const Int_t Nparticles = fParticlesIn->GetEntriesFast();
 
+  if (fParticlesMap->GetSize() <= Nparticles) fParticlesMap->Set(Nparticles*2);
+
   // loop over particles
   for (Int_t iPart = 0, nacc = 0; iPart < Nparticles; iPart++) {