Skip to content
Snippets Groups Projects
Commit 8998edaf authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Merge branch 'replace-linkertool-with-linkedto' into 'master'

Replace LinkerTool with LinkedTo

See merge request lhcb/Alignment!354
parents d1107586 4d3cb48e
Branches
No related tags found
No related merge requests found
Pipeline #5238940 passed
......@@ -34,7 +34,6 @@
#include "GaudiKernel/IMagneticFieldSvc.h"
#include "GaudiKernel/ToolHandle.h"
#include "Linker/LinkedTo.h"
#include "Linker/LinkerTool.h"
#include "MCInterfaces/ITrackGhostClassification.h"
#include "TrackInterfaces/IHitExpectation.h"
#include "TrackInterfaces/ITrackExtrapolator.h"
......@@ -76,10 +75,8 @@ public:
StatusCode execute() override;
private:
typedef std::vector<double> Array;
typedef LinkerTool<LHCb::Track, LHCb::MCParticle> AsctTool;
static const int defValue = -999999;
typedef std::vector<double> Array;
static const int defValue = -999999;
//======================================================================
// Properties
......@@ -227,9 +224,9 @@ StatusCode AlignSaveTuple::execute() {
Tuples::Tuple trackSelTuple = nTuple( "AllVariables" );
// Get the association table
AsctTool associator( evtSvc(), m_tracksPath );
auto const* links = get<LHCb::LinksByKey>( LHCb::LinksByKey::linkerName( m_tracksPath ) );
auto isGhostTrack = [this, directTable = associator.direct()]( const LHCb::Track* trk ) {
auto isGhostTrack = [this, directTable = LinkedTo<LHCb::MCParticle>{links}]( const LHCb::Track* trk ) {
//===========================================================================
// Is track ghost or not?
//===========================================================================
......@@ -237,7 +234,7 @@ StatusCode AlignSaveTuple::execute() {
this->Error( "Track MCParticle table missing. Are you running TrackAssociator before?" ).ignore();
return false;
}
return directTable.relations( trk ).empty();
return directTable.range( trk ).empty();
};
//**********************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment