-
- Trace t;
- if( args[0].equals( "-2txt" ) ) {
- t = new Trace( true, args[1], args[2] );
- } else {
- t = new Trace( false, args[0], args[1] );
+ String inputfile=null;
+ String outputfile=null;
+ boolean events=false;
+ HashSet<Integer> eventset=new HashSet<Integer>();
+ boolean hasinput=false;
+ long maxtime=-1;
+ long mintime=0;
+ long scale=1;
+
+ for(int i=0; i<args.length; i++) {
+ if (args[i].equals("-2txt")) {
+ events=true;
+ } else if (args[i].equals("-event")) {
+ eventset.add(Integer.parseInt(args[i+1]));
+ i++;
+ } else if (args[i].equals("-maxtime")) {
+ maxtime=Long.parseLong(args[i+1]);
+ i++;
+ } else if (args[i].equals("-mintime")) {
+ mintime=Long.parseLong(args[i+1]);
+ i++;
+ } else if (args[i].equals("-scale")) {
+ scale=Long.parseLong(args[i+1]);
+ i++;
+ } else {
+ if (hasinput) {
+ outputfile=args[i];
+ } else {
+ hasinput=true;
+ inputfile=args[i];
+ }
+ }