lcsim-contrib/src/main/java/org/lcsim/contrib/uiowa/uiowapfa/macros
diff -N CheckFile.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ CheckFile.java 23 Oct 2011 09:54:22 -0000 1.1
@@ -0,0 +1,36 @@
+package org.lcsim.contrib.uiowa.uiowapfa.macros;
+
+import java.io.*;
+import hep.aida.*;
+
+public class CheckFile {
+
+ static public void main(String [] argv) throws IOException{
+
+ if(argv.length < 1){
+ System.out.println("Not enough arguments:");
+ System.out.println("Usage: "+(new Exception()).getStackTrace()[0].getClassName()+" <input file>");
+ return;
+ }
+
+ String input = argv[0];
+
+ File f = new File( input );
+
+ if( !f.exists() ) {
+ throw new IOException("File "+f+" does not exist");
+ }
+
+ IAnalysisFactory af = IAnalysisFactory.create();
+ ITree tree = af.createTreeFactory().create( input, "xml" , true );
+
+ String [] objectNames = tree.listObjectNames(tree.pwd(), true);
+ String [] objectTypes = tree.listObjectTypes(tree.pwd(), true);
+
+ for(int i=0; i<objectNames.length; i++){
+ String objectName = objectNames[i];
+ String objectType = objectTypes[i];
+ System.out.println(objectType+" "+objectName);
+ }
+ }
+}
lcsim-contrib/src/main/java/org/lcsim/contrib/uiowa/uiowapfa/macros
diff -u -r1.1 -r1.2
--- Normalize.java 27 May 2011 12:01:08 -0000 1.1
+++ Normalize.java 23 Oct 2011 09:54:22 -0000 1.2
@@ -1,4 +1,4 @@
-package org.lcsim.contrib.uiowa.mergeAidaFiles;
+package org.lcsim.contrib.uiowa.uiowapfa.macros;
import java.io.*;
import hep.aida.*;