ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/DBTools/scripts/osudb
(Generate patch)

Comparing UserCode/OSUT3Analysis/DBTools/scripts/osudb (file contents):
Revision 1.21 by ahart, Sun Feb 3 00:14:20 2013 UTC vs.
Revision 1.22 by ahart, Wed Feb 6 00:35:57 2013 UTC

# Line 21 | Line 21 | our $db = Mysql->connect ("cmshead.mps.o
21  
22   my %opt;
23   Getopt::Long::Configure ("bundling");
24 < GetOptions (\%opt, "comment|c=s", "format|f=s", "pyConfig|p=s", "crabCfg|b=s", "jsonFile|j=s", "lumiSummary|s=s", "location|l=s", "name|n=s", "fileList|t=s", "release|r=s", "other|o", "recipe|e=s", "globalTag|g=s", "help|h");
24 > GetOptions (\%opt, "comment|c=s", "format|f=s", "pyConfig|p=s", "crabCfg|b=s", "jsonFile|j=s", "lumiSummary|s=s", "location|l=s", "name|n=s", "fileList|t=s", "release|r=s", "other|o", "recipe|e=s", "globalTag|g=s", "configName|i=s", "help|h");
25   my $argc = @ARGV;
26  
27   printHelp ($ARGV[0]) if $opt{"help"};
# Line 86 | Line 86 | else
86          print "This location is already registered in the database!\n";
87          exit;
88        }
89 <    dbUpdate ($id, $fullDataset, "$ENV{'USER'}\@$ENV{'HOSTNAME'}", $opt{"format"}, $opt{"location"}, $opt{"name"}, $opt{"fileList"}, $status, $opt{"comment"}, $opt{"pyConfig"}, $opt{"crabCfg"}, $opt{"jsonFile"}, $opt{"lumiSummary"}, $opt{"release"}, $opt{"globalTag"}) if !$opt{"other"};
89 >    dbUpdate ($id, $fullDataset, "$ENV{'USER'}\@$ENV{'HOSTNAME'}", $opt{"format"}, $opt{"location"}, $opt{"name"}, $opt{"fileList"}, $status, $opt{"comment"}, $opt{"pyConfig"}, $opt{"crabCfg"}, $opt{"jsonFile"}, $opt{"lumiSummary"}, $opt{"release"}, $opt{"globalTag"}, $opt{"configName"}) if !$opt{"other"};
90      dbUpdateOther ($id, $opt{"comment"}, "$ENV{'USER'}\@$ENV{'HOSTNAME'}") if $opt{"other"};
91      dbDelete ($id) if $ARGV[0] eq "deleteEntry" && !$opt{"other"};
92      dbDeleteOther ($id) if $ARGV[0] eq "deleteEntry" && $opt{"other"};
# Line 192 | Line 192 | dbUpdate
192    my $lumiSummaryName = shift;
193    my $release = shift;
194    my $globalTag = shift;
195 +  my $configName = shift;
196  
197    my $user = $userAndHost;
198    $user =~ s/@.*$//g;
# Line 263 | Line 264 | dbUpdate
264        close (LUMI_SUMMARY);
265        $lumiSummary = join ("", @lumiSummary);
266      }
267 <  if ($release)
267 <    {
268 <      my $query = "select id from ntupleRelease where name='$release'";
269 <      $db->selectdb ("ntuple");
270 <      my $results = $db->query ($query);
271 <      if ($results->numrows () != 1)
272 <        {
273 <          print "Ntuple release \"$release\" not found!\n";
274 <          exit;
275 <        }
276 <    }
267 >  $release .= ".$configName" if $configName;
268    ($nFiles, $size) = sizeOfDataset ($dataset, $location, $fileList);
269    my $fullLocation = $location;
270    $fullLocation = "$ENV{'PWD'}/$location" if !($location =~ m/^\//);
# Line 418 | Line 409 | printHelp
409        printf "%-29s%s\n", "  -c, --comment COMMENT", "comment for the database entry";
410        printf "%-29s%s\n", "  -f, --format FORMAT", "ntuple format (default: BEAN)";
411        printf "%-29s%s\n", "  -g, --globalTag TAG", "global tag";
412 +      printf "%-29s%s\n", "  -i, --configName NAME", "name of config used to produce ntuples";
413        printf "%-29s%s\n", "  -j, --jsonFile FILE", "JSON file used for this dataset";
414        printf "%-29s%s\n", "  -l, --location DIRECTORY", "directory containing the ntuples";
415        printf "%-29s%s\n", "  -p, --pyConfig FILE", "Python config used to produce ntuples";
# Line 442 | Line 434 | printHelp
434        printf "%-29s%s\n", "  -c, --comment COMMENT", "comment for the database entry";
435        printf "%-29s%s\n", "  -f, --format FORMAT", "ntuple format";
436        printf "%-29s%s\n", "  -g, --globalTag TAG", "global tag";
437 +      printf "%-29s%s\n", "  -i, --configName NAME", "name of config used to produce ntuples";
438        printf "%-29s%s\n", "  -j, --jsonFile FILE", "JSON file used for this dataset";
439        printf "%-29s%s\n", "  -l, --location DIRECTORY", "directory containing the ntuples";
440        printf "%-29s%s\n", "  -n, --name NAME", "rename the entry";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines