ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/JOBROBOT/generateDBS2DLSQueryAsciiFile.pl
Revision: 1.1
Committed: Tue Jun 5 10:29:17 2007 UTC (17 years, 10 months ago) by marcelo
Content type: application/x-perl
Branch: MAIN
CVS Tags: HEAD
Log Message:
DBS2 version of the generateDBSDLSQueryAsciiFile.pl script.

File Contents

# User Rev Content
1 marcelo 1.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);