Skip to content
Snippets Groups Projects

Fix triangle loop detection in v1 Particle combiner

Merged Alex Pearce requested to merge apearce-moore-300 into master
All threads resolved!
1 file
+ 1
8
Compare changes
  • Side-by-side
  • Inline
@@ -536,14 +536,7 @@ private:
if ( decay.children()[IInput].pid() == decay.children()[IInput - 1].pid() ) {
// Yes, in this case we should insist that the `IInput`th and
// `IInput-1`th inputs were, in fact, the same...
// FIXME(AP): we cannot compare containers because the inputs are Range
// objects which get instantiated when this algorithm's operator() is
// called; the same underlying container passed in N times will result
// in N Range objects with different memory addresses. Instead we use
// the memory address of the first element of the container; this is
// very shaky and we could come up with a better definition of
// 'identical containers'
if ( UNLIKELY( *( std::get<IInput>( inputs ).begin() ) != *( std::get<IInput - 1>( inputs ).begin() ) ) ) {
if ( UNLIKELY( !( std::get<IInput>( inputs ) == std::get<IInput - 1>( inputs ) ) ) ) {
throw GaudiException{"Got contiguous children with the same PIDs, but the corresponding algorithm inputs "
"were not the same. This is unsupported.",
"NBodyCombiner<name>", StatusCode::FAILURE};
Loading