File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,12 @@ void iSpectraSamplerWrapper::PassHadronListToJetscapeSameEvent() {
317
317
}
318
318
319
319
void iSpectraSamplerWrapper::PassHadronListToJetscape () {
320
+ // clear hadron list before passing new events
321
+ for (unsigned i = 0 ; i < Hadron_list_.size (); i++) {
322
+ Hadron_list_.at (i).clear ();
323
+ }
324
+ Hadron_list_.clear ();
325
+
320
326
unsigned int nev = iSpectraSampler_ptr_->get_number_of_sampled_events ();
321
327
VERBOSE (2 ) << " Passing all sampled hadrons to the JETSCAPE framework" ;
322
328
VERBOSE (4 ) << " number of events to pass : " << nev;
@@ -354,6 +360,9 @@ void iSpectraSamplerWrapper::PassHadronListToJetscape() {
354
360
<< Hadron_list_.at (iev).size () << " particles." ;
355
361
}
356
362
}
363
+
364
+ // clear iSS memory, particles have passed to the framework
365
+ iSpectraSampler_ptr_->clear ();
357
366
}
358
367
359
368
void iSpectraSamplerWrapper::WriteTask (weak_ptr<JetScapeWriter> w) {
You can’t perform that action at this time.
0 commit comments