Index: trunk/ippScripts/scripts/ipp_serial_inject_mosaic.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_serial_inject_mosaic.pl	(revision 12645)
+++ trunk/ippScripts/scripts/ipp_serial_inject_mosaic.pl	(revision 12657)
@@ -25,7 +25,5 @@
 	  -msg => "Required options: --camera --telescope --workdir",
 	  -exitval => 3,
-	  ) unless scalar @ARGV == 0 or ( defined $camera
-					  and defined $telescope
-					  and defined $workdir );
+	  ) unless defined $camera and defined $telescope and defined $workdir;
 
 my $ipprc = PS::IPP::Config->new(); # IPP configuration
@@ -38,17 +36,24 @@
 # Inject new data into the database
 if (scalar @ARGV != 0) {
-    my @classes;
+    my @classes;		# Names of the classes
+    my @files;			# What to add to the filename for each class
     my $imfiles;
     my $add_dir;		# Add directory name to get file name?
     if ($camera eq "MEGACAM") {
 	for (my $i = 0; $i < 36; $i++) {
-	    push @classes, sprintf(".ccd%02d", $i);
+	    push @classes, sprintf("ccd%02d", $i);
+	    push @files, sprintf(".ccd%02d", $i);
 	}
     } elsif ($camera eq "MCSHORT") {
-	@classes = ( '.ccd12', '.ccd13', '.ccd14', '.ccd21', '.ccd22', '.ccd23' );
+	@classes = ( 'ccd12', 'ccd13', 'ccd14', 'ccd21', 'ccd22', 'ccd23' );
+	@files   = ( '.ccd12', '.ccd13', '.ccd14', '.ccd21', '.ccd22', '.ccd23' );
+	
     } elsif ($camera eq "CTIO_MOSAIC2") {
 	@classes = ();
+	@files = ();
     } elsif ($camera eq "TC3") {
-	@classes = ( '00', '01', '10', '11', '20', '21', '30', '31' );
+	@classes = ( 'CCID58-1-06b2', 'CCID45-1-14A', 'CCID45-1-11A', 'CCID45-1-22A',
+		   'CCID45-1-04C', 'CCID45-1-13A', 'CCID45-1-05A', 'CCID45-1-19A' );
+	@files = ( '00', '01', '10', '11', '20', '21', '30', '31' );
 	$add_dir = 1;
     } else {
@@ -64,6 +69,8 @@
 	my @line = split(/\s+/, $$stdout_buf[0]); # The output line, containing the exposure tag
 	my $exp_tag = $line[2];	# The exposure tag
-	foreach my $class_id (@classes) {
-	    my $filename = "$exp$class_id.fits";
+	for (my $i = 0; $i < scalar @classes; $i++) {
+	    my $class_id = $classes[$i];
+	    my $file_id = $files[$i];
+	    my $filename = "$exp$file_id.fits";
 	    $filename = File::Spec->catfile( $exp, $filename ) if defined $add_dir;
 	    $filename = File::Spec->catfile( $workdir_abs, $filename);
