1 package org.lcsim.recon.tracking.seedtracker.strategybuilder;
2
3 import java.io.File;
4 import java.util.List;
5
6 import org.lcsim.event.EventHeader;
7 import org.lcsim.recon.tracking.seedtracker.SeedStrategy;
8 import org.lcsim.recon.tracking.seedtracker.StrategyXMLUtils;
9 import org.lcsim.util.Driver;
10
11
12
13
14
15
16 public class StrategyDriver extends Driver
17 {
18 String outputFile = null;
19 String prototypeFile = null;
20 boolean verbose = false;
21
22 public StrategyDriver()
23 {}
24
25
26
27
28
29 public void setOutputFile(String outputFile)
30 {
31 this.outputFile = outputFile;
32 }
33
34
35
36
37
38 public void setVerbose(boolean verbose)
39 {
40 this.verbose = verbose;
41 }
42
43
44
45
46
47 public void setPrototypeStrategyFile(String prototypeFile)
48 {
49 this.prototypeFile = prototypeFile;
50 }
51
52 public void startOfData()
53 {
54
55 StrategyBuilder builder = new StrategyBuilder();
56 builder.setOutput(this.outputFile);
57 builder.setSymmetrize(true);
58 List<SeedStrategy> prototype = StrategyXMLUtils.getStrategyListFromFile(new File(prototypeFile));
59 builder.setStrategyPrototype(prototype.get(0));
60 builder.setMinimumUnweightedScore(1);
61 this.add(builder);
62 super.startOfData();
63 }
64
65 public void process(EventHeader event)
66 {
67 super.process(event);
68 }
69 }