lcio/src/java/hep/lcio/util
diff -u -r1.2 -r1.3
--- StdhepConvertCommandHandler.java 7 Dec 2006 00:47:33 -0000 1.2
+++ StdhepConvertCommandHandler.java 8 Nov 2007 01:21:38 -0000 1.3
@@ -10,6 +10,8 @@
{
File infile;
File outfile;
+ int maxEvents = -1;
+ int skipEvents = -1;
StdhepConvertCommandHandler()
{
@@ -33,6 +35,14 @@
opt.setArgs(1);
options.addOption(opt);
+ opt = new Option("m", true, "Maximum number of events to read.");
+ opt.setArgs(1);
+ options.addOption(opt);
+
+ opt = new Option("s", true, "Number of events to skip.");
+ opt.setArgs(1);
+ options.addOption(opt);
+
return options;
}
@@ -62,11 +72,21 @@
}
outfile = new File(lcioname);
+
+ if (cl.hasOption("m"))
+ {
+ maxEvents = Integer.valueOf(cl.getOptionValue("m"));
+ }
+
+ if (cl.hasOption("s"))
+ {
+ skipEvents = Integer.valueOf(cl.getOptionValue("s"));
+ }
}
public void execute() throws Exception
{
StdhepConverter converter = new StdhepConverter();
- converter.convert(infile, outfile);
+ converter.convert(infile, outfile, skipEvents, maxEvents);
}
}
\ No newline at end of file