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", "configName|i=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", "xSection|x=s", "help|h"); |
25 |
|
my $argc = @ARGV; |
26 |
|
|
27 |
|
printHelp ($ARGV[0]) if $opt{"help"}; |
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"}, $opt{"configName"}) 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"}, $opt{"xSection"}) 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"}; |
193 |
|
my $release = shift; |
194 |
|
my $globalTag = shift; |
195 |
|
my $configName = shift; |
196 |
+ |
my $xSection = shift; |
197 |
|
|
198 |
|
my $user = $userAndHost; |
199 |
|
$user =~ s/@.*$//g; |
308 |
|
my $id = 1; |
309 |
|
$id = $row[0] + 1 if $results->numrows (); |
310 |
|
|
311 |
< |
$query = "insert into ntuple (id, dataset, creationTime, lastUpdateTime, lastUpdateUser, user, format, location, fileList, nFiles, sizeInGB, status, comment, pset, crabCfg, jsonFile, lumiSummary, version, globalTag) values ($id, '$dataset', now(), now(), '$userAndHost', '$user', '$format', '$fullLocation', '$fileList', $nFiles, $size, '$status', '$comment', '$pset', '$crabCfg', '$jsonFile', '$lumiSummary', '$release', '$globalTag')"; |
311 |
> |
$query = "insert into ntuple (id, dataset, creationTime, lastUpdateTime, lastUpdateUser, user, format, location, fileList, nFiles, sizeInGB, status, comment, pset, crabCfg, jsonFile, lumiSummary, version, globalTag, crossSectionInPicobarn) values ($id, '$dataset', now(), now(), '$userAndHost', '$user', '$format', '$fullLocation', '$fileList', $nFiles, $size, '$status', '$comment', '$pset', '$crabCfg', '$jsonFile', '$lumiSummary', '$release', '$globalTag', $xSection)"; |
312 |
|
} |
313 |
|
if ($id > 0) |
314 |
|
{ |
346 |
|
$values .= ", lumiSummary='$lumiSummary'" if $lumiSummary; |
347 |
|
$values .= ", version='$release'" if $release; |
348 |
|
$values .= ", globalTag='$globalTag'" if $globalTag; |
349 |
+ |
$values .= ", crossSectionInPicobarn=$xSection" if $xSection; |
350 |
|
|
351 |
|
$values =~ s/^, //; |
352 |
|
$query = "update ntuple set $values where id=$id"; |
417 |
|
printf "%-29s%s\n", " -p, --pyConfig FILE", "Python config used to produce ntuples"; |
418 |
|
printf "%-29s%s\n", " -r, --release NAME", "ntuple release used to produce ntuples"; |
419 |
|
printf "%-29s%s\n", " -s, --lumiSummary FILE", "lumiSummary.json reported by CRAB"; |
420 |
+ |
printf "%-29s%s\n", " -x, --xSection XSEC", "cross section in picobarns for the sample"; |
421 |
|
} |
422 |
|
elsif ($command eq "createOther") |
423 |
|
{ |
445 |
|
printf "%-29s%s\n", " -p, --pyConfig FILE", "Python config used to produce ntuples"; |
446 |
|
printf "%-29s%s\n", " -r, --release NAME", "ntuple release used to produce ntuples"; |
447 |
|
printf "%-29s%s\n", " -s, --lumiSummary FILE", "lumiSummary.json reported by CRAB"; |
448 |
+ |
printf "%-29s%s\n", " -x, --xSection XSEC", "cross section in picobarns for the sample"; |
449 |
|
} |
450 |
|
elsif ($command eq "finish") |
451 |
|
{ |