Index: /trunk/tools/chip_outputs.pl
===================================================================
--- /trunk/tools/chip_outputs.pl	(revision 20813)
+++ /trunk/tools/chip_outputs.pl	(revision 20814)
@@ -19,7 +19,7 @@
 
 my ($db_host, $db_name, $db_user, $db_pw); # Database details
-my ($chip_id);                  # Chip of interest
+my ($chip_id, $class_id);       # Chip of interest
 my ($input);                    # Input list
-my ($products);			# Products of interest
+my ($products);                 # Products of interest
 
 GetOptions(
@@ -29,5 +29,6 @@
            'dbpass=s' => \$db_pw, # Database p/w
            'chip_id=s' => \$chip_id, # Chip identifier
-	   'products=s' => \$products, # Products of interest
+           'class_id=s' => \$class_id, # Class identifier
+           'products=s' => \$products, # Products of interest
            ) or die "Unable to parse arguments.\n";
 die "Unknown option: @ARGV\n" if @ARGV;
@@ -50,9 +51,10 @@
     " FROM chipProcessedImfile " .
     " WHERE chip_id = $chip_id";
+$sql .= " AND class_id = $class_id" if defined $class_id;
 
 # List of chips
 my $results = $db->selectall_arrayref( $sql ) or die "Unable to execute SQL: $DBI::errstr";
 
-my @products;			# Array of products
+my @products;                   # Array of products
 if (defined $products) {
     @products = split /,/, $products;
@@ -62,10 +64,10 @@
 
 foreach my $row ( @$results ) {
-    my $path = $$row[0];	# Path base
-    my $class_id = $$row[1];	# Class identifier
+    my $path = $$row[0];        # Path base
+    my $class_id = $$row[1];    # Class identifier
 
     my $name = "$path.$class_id"; # Full name
     foreach my $product ( @products ) {
-	copy_extension( $name, ${EXTENSIONS()}{$product} );
+        copy_extension( $name, ${EXTENSIONS()}{$product} );
     }
 }
@@ -77,5 +79,5 @@
 {
     my $path = shift;           # Path to copy
-    my $ext = shift;		# Extension to copy
+    my $ext = shift;            # Extension to copy
 
     my $neb = "$path$ext"; # Nebulous file
