ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TMISoftware/ErrorStream/modErrorStreamCfg.pl
Revision: 1.3
Committed: Mon Sep 17 11:15:40 2012 UTC (12 years, 7 months ago) by fantasia
Content type: application/x-perl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +9 -9 lines
Error occurred while calculating annotation data.
Log Message:
needed changes

File Contents

# Content
1 #!/usr/bin/perl -w
2
3 if ($#ARGV != 1-1 ) {
4 print "usage: perl modErrorStreamCfg.pl HLT_new\n";
5 exit;
6 }
7
8 $HLT_new = $ARGV[0];
9
10 open (OLD, "<HLT_old.py");
11 open (NEW, ">${HLT_new}");
12 while ($line = <OLD>) {
13 if ($line =~ "input = cms.untracked") {
14 my @change2 = split('\(', $line);
15 print NEW "$change2[0]\(-1\)\n";
16 }
17 elsif ($line =~ "cms.EndPath") { #Online keep outputA
18 if ($line =~ " process.hltOutputA ") {
19 print NEW $line;
20 }
21 else {
22 my $nextline = <OLD>; #burn a line (is this wanted/needed?)
23 }
24 }
25 elsif ($line =~ "process.hltTriggerType \+" && $line !~ "EDFilter") { #Remove trigger type check for error stream events
26 my @change3 = split('process.hltTriggerType \+', $line);
27 print NEW "$change3[0]$change3[1]";
28 }
29 # elsif ($line =~ "globaltag = cms.string") {
30 # my @tag = split('"', $line);
31 # $GT = "$tag[1]";
32 # print NEW $line;
33 # }
34 # elsif ($line =~ "GlobalTag.pfnPrefix") {
35 # print NEW $line;
36 # print NEW " process.GlobalTag.globaltag = \'${GT}\'\n";
37 # }
38 else {
39 print NEW $line;
40 }
41 }
42
43 close (OLD);
44 close (NEW);
45