Print

Print


Commit in lcsim/src/org/lcsim/util/loop on MAIN
LCIODriver.java+11-11.10 -> 1.11
JM: modify to allow usage of keep list in XML steering file

lcsim/src/org/lcsim/util/loop
LCIODriver.java 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- LCIODriver.java	11 Sep 2008 22:54:28 -0000	1.10
+++ LCIODriver.java	27 Oct 2008 20:08:31 -0000	1.11
@@ -25,6 +25,7 @@
 {
 	private LCIOWriter writer;
 	private Collection<String> listIgnore = Collections.EMPTY_SET;
+	private Collection<String> listKeep = Collections.EMPTY_SET;
 	private String filePath;
 	
 	public LCIODriver(String file)
@@ -72,6 +73,11 @@
 		listIgnore = Arrays.asList(ignoreCollections);
 	}
 	
+	public void setWriteOnlyCollections(String [] keepCollections)
+	{
+		listKeep = Arrays.asList(keepCollections);
+	}
+	
 	public LCIOWriter getWriter()
 	{
 		return writer;
@@ -86,7 +92,11 @@
 				throw new RuntimeException("Cannot create LCIO writer.  The filePath was not set!");
 			try
 			{
-				this.writer = new LCIOWriter(new File(filePath),listIgnore);
+				this.writer = new LCIOWriter(new File(filePath));
+				if (listIgnore != Collections.EMPTY_SET)
+					writer.addAllIgnore(listIgnore);
+				if (listKeep != Collections.EMPTY_SET)
+					writer.addAllWriteOnly(listKeep);
 			}
 			catch (IOException x)
 			{
CVSspam 0.2.8