ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TMISoftware/ErrorStream/makeHLTConfig.pl
Revision: 1.1
Committed: Thu May 10 18:42:52 2012 UTC (12 years, 11 months ago) by fantasia
Content type: application/x-perl
Branch: MAIN
CVS Tags: V01-00-00, HEAD
Error occurred while calculating annotation data.
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/usr/bin/perl -w
2
3 if ($#ARGV != 2-1 ) {
4 print "usage: perl modErrorStreamCfg.pl CurrentRun Dir\n";
5 exit;
6 }
7
8 $CurrentRun = $ARGV[0];
9 $Dir = $ARGV[1];
10
11 my @files = <${Dir}/*>;
12 open (OLD, "<HLT_config_${CurrentRun}.py");
13 open (NEW, ">HLT_config_${CurrentRun}_0.py");
14 while ($line = <OLD>) {
15 if ($line =~ "fileNames") {
16 my @change = split('\(', $line);
17 print NEW "$change[0]\(\n";
18 print NEW "\t\t'file:$files[0]',\n";
19 print NEW "\t),\n";
20 }
21 elsif ($line =~ "store/data") {
22 $nextline = <OLD>;
23 }
24 elsif ($line =~ "file:") {
25 $nextline = <OLD>;
26 }
27 elsif (1) {
28 print NEW $line;
29 }
30 }
31
32 close (OLD);
33 close (NEW);
34