From 419e287137a203cb35567db5053c8871b5c1b708 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 20 Aug 2024 10:53:36 -0400 Subject: [PATCH] cleanup --- .../org/jlab/clas/reco/EngineProcessor.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java index 380bd32c6..0e1141ff7 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java @@ -36,23 +36,20 @@ public class EngineProcessor { public EngineProcessor(){} - /** - * Get the (first) engine with the given class name. Note, this exists - * because engines are mapped by (what can be) a user-defined name, and . - * @param clazz - * @return - */ private ReconstructionEngine findEngine(String clazz) { for (String k : processorEngines.keySet()) { - if (processorEngines.get(k).getClass().getName().equals(clazz)) + if (processorEngines.get(k).getClass().getName().equals(clazz)) { return processorEngines.get(k); + } } return null; } public void setBackgroundFiles(String filenames) { - if (findEngine(ENGINE_CLASS_BG) == null) + if (findEngine(ENGINE_CLASS_BG) == null) { + LOGGER.info("Adding BackgroundEngine for -B option."); addEngine("BG",ENGINE_CLASS_BG); + } findEngine(ENGINE_CLASS_BG).engineConfigMap.put("filename", filenames); findEngine(ENGINE_CLASS_BG).init(); } @@ -120,7 +117,7 @@ public void initDefault(){ public void initAll(){ String[] names = new String[]{ - "MAGFIELDS","BG", + "MAGFIELDS", "FTCAL", "FTHODO", "FTTRK", "FTEB", "URWELL", "DCCR", "DCHB","FTOFHB","EC","RASTER", "CVTFP","CTOF","CND","BAND", @@ -131,7 +128,6 @@ public void initAll(){ String[] services = new String[]{ "org.jlab.clas.swimtools.MagFieldsEngine", - "org.jlab.service.bg.BackgroundEngine", "org.jlab.rec.ft.cal.FTCALEngine", "org.jlab.rec.ft.hodo.FTHODOEngine", "org.jlab.rec.ft.trk.FTTRKEngine", @@ -144,7 +140,6 @@ public void initAll(){ "org.jlab.service.raster.RasterEngine", "org.jlab.rec.cvt.services.CVTEngine", "org.jlab.service.ctof.CTOFEngine", - //"org.jlab.service.cnd.CNDEngine", "org.jlab.service.cnd.CNDCalibrationEngine", "org.jlab.service.band.BANDEngine", "org.jlab.service.htcc.HTCCReconstructionService",