lcsim/src/org/lcsim/contrib/Partridge/StrategyBuilding
diff -N ExampleDriver.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ExampleDriver.java 13 Oct 2008 22:37:10 -0000 1.1
@@ -0,0 +1,53 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.lcsim.contrib.Partridge.StrategyBuilding;
+
+import java.io.File;
+import java.util.List;
+import org.lcsim.recon.tracking.seedtracker.SeedStrategy;
+
+import org.lcsim.recon.tracking.seedtracker.StrategyXMLUtils;
+import org.lcsim.recon.tracking.seedtracker.strategybuilder.StrategyBuilder;
+import org.lcsim.util.Driver;
+
+/**
+ * Driver used to illustrate usage of StrategyBuilder w/out using the
+ * command line. (Look at RunStrategyBuilder to learn how to use Strategy
+ * Builder with the command line).
+ *
+ * @author cozzy
+ */
+public class ExampleDriver extends Driver {
+
+ //this will be the output file... this example outputs it in the
+ //system's temporary directory.
+ private String outputfile = System.getProperties().getProperty("java.io.tmpdir")+
+ System.getProperties().getProperty("file.separator")+
+ "ExampleStrategyList.xml";
+
+ public ExampleDriver(){
+
+ StrategyBuilder builder = new StrategyBuilder();
+
+ //set the output file
+ builder.setOutput(outputfile);
+ builder.setVerbose(true); //verbose output
+ builder.setSymmetrize(true);
+// String file1 = "c:\\StartingStrategies.xml";
+// List<SeedStrategy> starting = StrategyXMLUtils.getStrategyListFromFile(new File(file1));
+// builder.setStartingStrategyList(starting);
+ String file2 = "c:\\PrototypeStrategies.xml";
+ List<SeedStrategy> prototype = StrategyXMLUtils.getStrategyListFromFile(new File(file2));
+ builder.setStrategyPrototype(prototype.get(0));
+ builder.setMinimumUnweightedScore(1);
+ //see the IStrategyBuilder interface for other settable options
+
+ add(builder);
+
+ }
+
+
+}