All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fix_log_debug_art211.pl
Go to the documentation of this file.
1 
2 use strict;
3 use warnings;
4 
5 if( $#ARGV < 0 ) {
6  print "\n";
7  print "USAGE: fix_log_debug_art211.pl <input-file>\n";
8  print "\n";
9  exit 1;
10 }
11 
12 my $inputfile = $ARGV[0];
13 my $outputfile = $inputfile.".new";
14 
15 print "check $inputfile for LOG_DEBUG\n";
16 open(PIN, "< $inputfile") or die "Couldn't open $inputfile";
17 open(POUT, "> $outputfile") or die "Couldn't open $outputfile";
19 while ( $line=<PIN> ) {
20  chop $line;
21  if (( $line =~ m/LOG_DEBUG/ ) && ( $line =~ m/<</ )) {
22  if ( $line =~ m/^\/\// ) {
23  print POUT "$line\n";
24  } else {
25  print "updating $line\n";
26  print POUT "// workaround for #19851\n";
27  print POUT "//$line\n";
28  $line =~ s/LOG_DEBUG/mf::LogDebug/;
29  print POUT "$line\n";
30  }
31  } else {
32  print POUT "$line\n";
33  }
34 
35 }
36 close(PIN);
37 close(POUT);
38 
39 exit(0);
my $inputfile
my $outputfile
use warnings
Definition: SubmitCommand.pl:9
do one_file $F done echo for F in find $TOP name CMakeLists txt print
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
my($xml, $fcl, $workdir, $check, $merge)
use strict
Definition: SubmitCommand.pl:8
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
while($line=< PIN >)
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")