private/clsim/tabulator/I3CLSimTabulatorModule.cxx
void I3CLSimTabulatorModule::HarvestSteps()
{
	// Get the first reference source. This will block until something is
	// added to the queue.
	I3ParticleConstPtr reference = sourceQueue_.Get();
	for (;;) {
		I3CLSimStepSeriesConstPtr steps;
		bool barrierWasJustReset=false;
		steps = particleToStepsConverter_->GetConversionResultWithBarrierInfo(barrierWasJustReset);
		
		if (steps && !steps->empty()) {
			// Do stuff
			tabulator_->EnqueueSteps(I3CLSimStepSeriesPtr(new I3CLSimStepSeries(*steps)), reference);
			log_trace_stream("enqueued " << steps->size() << " steps");
		}
		
		if (barrierWasJustReset) {
			if (!run_) {
				log_trace("Exiting on barrier");
				return;
			} else {
				// Signal main thread to continue
				semaphore.cv.notify_one();
				// Get the reference source for the next frame
				reference = sourceQueue_.Get();
			}
		}
	}
	
}
/// Harvest steps and feed them to the tabulator
Harvest steps and feed them to the tabulator
Harvest steps and feed them to the tabulator
void I3CLSimTabulatorModule::HarvestSteps()
{
	I3ParticleConstPtr reference = sourceQueue_.Get();
	for (;;) {
		I3CLSimStepSeriesConstPtr steps;
		bool barrierWasJustReset=false;
		steps = particleToStepsConverter_->GetConversionResultWithBarrierInfo(barrierWasJustReset);
		if (steps && !steps->empty()) {
			tabulator_->EnqueueSteps(I3CLSimStepSeriesPtr(new I3CLSimStepSeries(*steps)), reference);
			log_trace_stream("enqueued " << steps->size() << " steps");
		}
		if (barrierWasJustReset) {
			if (!run_) {
				log_trace("Exiting on barrier");
				return;
			} else {
				semaphore.cv.notify_one();
				reference = sourceQueue_.Get();
			}
		}
	}
}
void I3CLSimTabulatorModule :: HarvestSteps ( ) { I3ParticleConstPtr reference = sourceQueue_ . Get ( ) ; for ( ; ; ) { I3CLSimStepSeriesConstPtr steps ; bool barrierWasJustReset = false ; steps = particleToStepsConverter_ -> GetConversionResultWithBarrierInfo ( barrierWasJustReset ) ; if ( steps && ! steps -> empty ( ) ) { tabulator_ -> EnqueueSteps ( I3CLSimStepSeriesPtr ( new I3CLSimStepSeries ( * steps ) ) , reference ) ; log_trace_stream ( " " << steps -> size ( ) << " " ) ; } if ( barrierWasJustReset ) { if ( ! run_ ) { log_trace ( " " ) ; return ; } else { semaphore . cv . notify_one ( ) ; reference = sourceQueue_ . Get ( ) ; } } } }
Harvest steps and feed them to the tabulator
Harvest steps and feed them to the tabulator
// Get the first reference source. This will block until something is // added to the queue. // Do stuff // Signal main thread to continue // Get the reference source for the next frame