Skip to content

Further simplify addConditionDerivation

Gerhard Raven requested to merge tweak-addconditionderivation into master

add an overload which requires explicitly the 'parent' algorithm, as then the parent can be used to get the derivationmanager and query for the output condition key.

This allows eg.

   StatusCode RawToHits::initialize() {
-    auto sc = Transformer::initialize();
-    if ( sc.isSuccess() )
-      addConditionDerivation<ComputeTilePosition( const DeMuonDetector& )>( DeMuonLocation::Default,
-                                                                            inputLocation<2>() );
-    return sc;
+    return Transformer::initialize().andThen( [&]() {
+      addConditionDerivation<ComputeTilePosition( const DeMuonDetector& )>( *this, DeMuonLocation::Default );
+    } );
   }

Merge request reports

Loading