Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:58

0001 #!/usr/bin/perl
0002 
0003 use lib "./lib";
0004 
0005 use warnings;
0006 use strict;
0007 $|++;
0008 
0009 use TB04::RunDB;
0010 use ConnectionFile;
0011 
0012 print "Connecting to DB...";
0013 my $condDB = ConnectionFile::connect();
0014 print "Done.\n";
0015 
0016 print "Loading runs info...";
0017 my $runDB = new TB04::RunDB;
0018 #$rundb->connect();
0019 #$rundb->load_from_db();
0020 $runDB->load_from_file("rundb");  # XXX hardcoded file name
0021 print "Done.\n";
0022 
0023 print "Defining runs table...";
0024 $runDB->fill_runs_table($condDB);
0025 print "Done.\n";
0026 
0027 print "Updating bad runs...";
0028 open FILE, '<', "bad_runs" or die $!;
0029 my $status = 0;
0030 while (<FILE>) {
0031   chomp;
0032   my ($run, $comment) = split /,/;
0033   $condDB->update_run(-run_number => $run, 
0034               -status => $status, 
0035               -comments => $comment);
0036 }
0037 close FILE;
0038 print "Done.\n";
0039 
0040 print "All Done.\n";