Skip to content
Snippets Groups Projects
Commit 13082d30 authored by Sergi Rodriguez Bosca's avatar Sergi Rodriguez Bosca Committed by Melissa Yexley
Browse files

add public service TRT_StrawNeighbourSvcCfg and getPrimaryAndMerge

parent fc41fc48
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ def FillAlignTRTHitsCfg(flags,name='FillAlignTRTHits',**kwargs) :
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg, TRT_StrawStatusSummaryToolCfg, TRT_StrawNeighbourSvcCfg
kwargs.setdefault("TRTCalDbTool", acc.popToolsAndMerge(TRT_CalDbToolCfg(flags)))
kwargs.setdefault("TRTStrawSummaryTool", acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags)))
kwargs.setdefault("NeighbourSvc", acc.popToolsAndMerge(TRT_StrawNeighbourSvcCfg(flags)))
kwargs.setdefault("NeighbourSvc", acc.getPrimaryAndMerge(TRT_StrawNeighbourSvcCfg(flags)))
acc.setPrivateTools(CompFactory.FillAlignTRTHits(name, **kwargs))
......@@ -64,10 +64,7 @@ def FillAlignTRTHitsCfg(flags,name='FillAlignTRTHits',**kwargs) :
# Tool to refit tracks
def FitToolCfg(flags, name = "FitToolCfg" ,**kwargs):
acc = ComponentAccumulator()
FittingTool = acc.popToolsAndMerge(CompFactory.FitTool(name, **kwargs))
acc.setPrivateTools(FittingTool)
acc.setPrivateTools(CompFactory.FitTool(name, **kwargs))
return acc
# Tool to process R-t ntuple. Produces histograms and calibration text files.
......@@ -143,7 +140,8 @@ def TRT_CalibrationMgrCfg(flags,name='TRT_CalibrationMgr',calibconstants='',**kw
# FIXME - FillAlignTRTHitsCfg and FillAlignTrkInfoCfg functions should be moved to TRT_CalibTools (where the .cxx/.h are stored)
kwargs.setdefault("AlignTrkTools", [acc.popToolsAndMerge(FillAlignTrkInfoCfg(flags)), acc.popToolsAndMerge(FillAlignTRTHitsCfg(flags))] )
kwargs.setdefault("AlignTrkTools", [acc.addPublicTool(acc.popToolsAndMerge(FillAlignTrkInfoCfg(flags))),
acc.addPublicTool(acc.popToolsAndMerge(FillAlignTRTHitsCfg(flags)))] )
# SERGI - FitTool.cxx is empty?? why it is actually used?
# if "FitTools" not in kwargs:
......
......@@ -20,12 +20,8 @@
#include <map>
FillAlignTrkInfo::FillAlignTrkInfo(const std::string& type, const std::string& name, const IInterface* parent) :
AthAlgTool(type, name, parent),
m_TrackSummaryTool("Trk::TrackSummaryTool/TrackSummaryTool")
{
declareInterface<IFillAlignTrkInfo>(this);
declareProperty("TrackSummaryTool",m_TrackSummaryTool);
}
AthAlgTool(type, name, parent)
{}
StatusCode FillAlignTrkInfo::initialize()
{
......
......@@ -37,7 +37,7 @@ class FillAlignTrkInfo : virtual public IFillAlignTrkInfo, public AthAlgTool {
virtual StatusCode initialize();
private:
ToolHandle<Trk::ITrackSummaryTool> m_TrackSummaryTool;
ToolHandle<Trk::ITrackSummaryTool> m_TrackSummaryTool {this, "TrackSummaryTool", "Trk::TrackSummaryTool/TrackSummaryTool", ""};
};
#endif // TRT_CALIBTOOLS__FILLALIGNTRKINFO_H
......@@ -39,15 +39,10 @@ def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forc
acc.setPrivateTools(CompFactory.TRT_StrawStatusSummaryTool(name, **kwargs))
return acc
def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc"):
def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs):
acc = ComponentAccumulator()
svc = CompFactory.TRT_StrawNeighbourSvc(name)
acc.addService(svc)
acc.addService(CompFactory.TRT_StrawNeighbourSvc(name, **kwargs), primary=True)
return acc
def TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment