[Bio] / Sprout / ERDBGenerator.pl Repository:
ViewVC logotype

Diff of /Sprout/ERDBGenerator.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7, Thu Apr 2 01:36:27 2009 UTC revision 1.8, Thu May 28 18:06:58 2009 UTC
# Line 22  Line 22 
22  use ERDB;  use ERDB;
23  use ERDBGenerate;  use ERDBGenerate;
24  use ERDBLoadGroup;  use ERDBLoadGroup;
25    use ERDBExtras;
26    
27  =head1 ERDBGenerator Script  =head1 ERDBGenerator Script
28    
# Line 151  Line 152 
152    
153  =item DBD  =item DBD
154    
155  Name of the DBD file. If specified, the DBD must be in the main FIG directory  Fully-qualified name of the DBD file. This option allows the use of an alternate
 (specified in C<$FIG_Config::fig>). This option allows the use of an alternate  
156  DBD during load, so that access to the database by other processes is not  DBD during load, so that access to the database by other processes is not
157  compromised.  compromised.
158    
# Line 187  Line 187 
187      # Get the parameters.      # Get the parameters.
188      my ($database, @groups) = @parameters;      my ($database, @groups) = @parameters;
189      # Check for an alternate DBD.      # Check for an alternate DBD.
190      my $altDBD = ($options->{DBD} ? "$FIG_Config::fig/$options->{DBD}" : undef);      my $altDBD = $options->{DBD} || undef;
191      # Connect to the database and get its load directory.      # Connect to the database and get its load directory.
192      my $erdb = ERDB::GetDatabase($database, $altDBD);      my $erdb = ERDB::GetDatabase($database, $altDBD);
193      my $directory = $erdb->LoadDirectory();      my $directory = $erdb->LoadDirectory();
# Line 294  Line 294 
294                  my $label = "$options->{label}$i";                  my $label = "$options->{label}$i";
295                  $workerOptions{label} = $label;                  $workerOptions{label} = $label;
296                  my $commandOptions = Tracer::UnparseOptions(\%workerOptions);                  my $commandOptions = Tracer::UnparseOptions(\%workerOptions);
297                  my $inFile = "$FIG_Config::temp/Pipe-$label.tbl";                  my $inFile = "$ERDBExtras::temp/Pipe-$label.tbl";
298                  my $oh = Open(undef, ">$inFile");                  my $oh = Open(undef, ">$inFile");
299                  my $command = "$command $commandOptions $commandParms <$inFile >null &";                  my $command = "$command $commandOptions $commandParms <$inFile >null &";
300                  push @workers, { handle => $oh, label => $label, command => $command };                  push @workers, { handle => $oh, label => $label, command => $command };
# Line 378  Line 378 
378      # We'll count our errors in here.      # We'll count our errors in here.
379      my $errorCount = 0;      my $errorCount = 0;
380      my $maxErrors = $options->{maxErrors};      my $maxErrors = $options->{maxErrors};
381        # Create the master statistics object.
382        my $stats = Stats->new();
383      # Compute the kill file name.      # Compute the kill file name.
384      my $killFileName = ERDBLoadGroup::KillFileName($erdb, $erdb->LoadDirectory());      my $killFileName = ERDBLoadGroup::KillFileName($erdb, $erdb->LoadDirectory());
385      my $killed = 0;      my $killed = 0;
# Line 419  Line 421 
421                  }                  }
422              }              }
423          }          }
424            # Display our statistics.
425          Trace("Statistics for $group in $options->{label}:\n" . $loader->DisplayStats()) if T(2);          Trace("Statistics for $group in $options->{label}:\n" . $loader->DisplayStats()) if T(2);
426            # Add them to the master statistics.
427            $loader->AccumulateStats($stats);
428      }      }
429        # Tell the user we're done.
430      Trace("Processing finished for worker $options->{label}.") if T(2);      Trace("Processing finished for worker $options->{label}.") if T(2);
431        Trace("Statistics for this worker:\n" . $stats->Show()) if T(2);
432  }  }
433    
434  1;  1;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3