From 7320aa450f6ef4ba5e8da0fb558566b6ba55ce7a Mon Sep 17 00:00:00 2001
From: Edward Moyse <edward.moyse@cern.ch>
Date: Mon, 30 Sep 2019 09:39:48 +0200
Subject: [PATCH] Added back missing file (lost in a git mv) and reduced
 interface to minimum.

I somehow forgot to add the header (and I guess in my local tests it got picked up from the path somehow). Also try to make the implementation as minimalist as possible, by removing the explicit ctor, dtor and finalize.
---
 .../src/MuPatTrackBuilder.cxx                 | 11 ------
 .../src/MuPatTrackBuilder.h                   | 36 +++++++++++++++++++
 2 files changed, 36 insertions(+), 11 deletions(-)
 create mode 100755 MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.h

diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx
index c2f7d26c16a..840f169bfad 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.cxx
@@ -17,11 +17,6 @@
 
 using namespace Muon;
 
-MuPatTrackBuilder::MuPatTrackBuilder(const std::string& name, ISvcLocator* pSvcLocator)
-   : AthAlgorithm(name,pSvcLocator)
-{
-}
-
 StatusCode MuPatTrackBuilder::initialize()
 {
   if (m_trackMaker.retrieve().isFailure()){
@@ -36,7 +31,6 @@ StatusCode MuPatTrackBuilder::initialize()
   
  ATH_CHECK( m_segmentKey.initialize() );
  ATH_CHECK( m_spectroTrackKey.initialize() );
- ATH_CHECK( m_spectroPartiKey.initialize() );
 
   return StatusCode::SUCCESS; 
 }
@@ -84,8 +78,3 @@ StatusCode MuPatTrackBuilder::execute()
   return StatusCode::SUCCESS;
 } // execute
 
-StatusCode MuPatTrackBuilder::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.h
new file mode 100755
index 00000000000..22f15f9b402
--- /dev/null
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/src/MuPatTrackBuilder.h
@@ -0,0 +1,36 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef MUPATTRACKBUILDER_H
+#define MUPATTRACKBUILDER_H
+
+#include <string>
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "TrkSegment/SegmentCollection.h"
+#include "TrkTrack/TrackCollection.h"
+#include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
+#include "MuonRecToolInterfaces/IMuonTrackFinder.h"
+
+class MuPatTrackBuilder : public AthAlgorithm
+{
+ public:
+ using AthAlgorithm::AthAlgorithm;
+ public:
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+
+ private:
+
+  SG::ReadHandleKey<Trk::SegmentCollection>  m_segmentKey {this, "MuonSegmentCollection", "MooreSegments", "Input segment location"};       //!< Key of input MuonSegmentCombination collection
+  SG::WriteHandleKey<TrackCollection>        m_spectroTrackKey {this, "SpectrometerTrackOutputLocation", "MuonSpectrometerTracks"};  //!< Track output Key for tracks strictly in MS
+  ToolHandle<Muon::IMuonTrackFinder> m_trackMaker {this, "TrackSteering", "Muon::MuonTrackFinder/MuonTrackSteering", "Actual tool to do the track finding"};  //!< Actual tool to do the track finding
+  ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc {this, "edmHelper", 
+      "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
+      "Handle to the service providing the IMuonEDMHelperSvc interface" };    //!< helper Tool 
+};
+
+#endif 
-- 
GitLab