1 |
#!/usr/bin/env perl
|
2 |
|
3 |
#
|
4 |
# script which generates DBS/DLS query ascii file for pattern given as first command line argument
|
5 |
#
|
6 |
# prerequisites: setup local CMSSW project and eval `scramv1 runtime -(c)sh` an setup crab
|
7 |
#
|
8 |
# creates file: dlsdls_query_$cleaned_pattern.txt
|
9 |
# where cleaned pattern is the pattern with / replaced by _
|
10 |
#
|
11 |
# to be executed in JOBROBOT directory
|
12 |
#
|
13 |
my $pattern = $ARGV[0];
|
14 |
my $cleaned_pattern = $pattern;
|
15 |
$cleaned_pattern =~ s/\//_/g;
|
16 |
my $patternfile = "dbsdls_query_" . $cleaned_pattern . ".txt";
|
17 |
print "Execute DBS/DLS discovery for pattern: $pattern and save it in file: $patternfile\n";
|
18 |
my $cmd = "python DBS2DLSQuery.py --pattern \"$pattern\" > $patternfile";
|
19 |
system($cmd);
|