Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:50

0001 #!/usr/local/bin/perl
0002 
0003 #Get the RUI name
0004 $RUI_DUMMY = substr($ARGV[0],30);
0005 $RUI = substr($RUI_DUMMY,0, 5);
0006 
0007 #This is what we begin with
0008 @DSOURCE_ARRAY=(
0009 "untracked vstring RUI00 = {}",
0010 "untracked vstring RUI01 = {}",
0011 "untracked vstring RUI02 = {}",
0012 "untracked vstring RUI03 = {}",
0013 "untracked vstring RUI04 = {}",
0014 "untracked vstring RUI05 = {}",
0015 "untracked vstring RUI06 = {}",
0016 "untracked vstring RUI07 = {}",
0017 "untracked vstring RUI08 = {}",
0018 "untracked vstring RUI09 = {}",
0019 "untracked vstring FED750 = {}",
0020 "untracked vstring FED751 = {}",
0021 "untracked vstring FED752 = {}",
0022 "untracked vstring FED753 = {}",
0023 "untracked vstring FED754 = {}",
0024 "untracked vstring FED755 = {}",
0025 "untracked vstring FED756 = {}",
0026 "untracked vstring FED757 = {}",
0027 "untracked vstring FED758 = {}",
0028 "untracked vstring FED759 = {}",
0029 "untracked vstring FED760 = {}"
0030 );
0031 
0032 %MAP=("RUI00",FED750,
0033       "RUI01",FED751,
0034       "RUI02",FED752,
0035       "RUI03",FED753,
0036       "RUI04",FED754,
0037       "RUI05",FED755,
0038       "RUI06",FED756,
0039       "RUI07",FED757,
0040       "RUI08",FED758,
0041       "RUI09",FED759);
0042 
0043 #loop over the full array from above
0044 #put all lines except the one with the RUI into the input variable
0045 $MAP_VAR = $MAP{"$RUI"};
0046 foreach (@DSOURCE_ARRAY){
0047  if( ($_ !~ $RUI ) && ($_ !~ $MAP_VAR) ) {
0048      $DSOURCE_INPUT = $DSOURCE_INPUT . $_  . "\n";
0049  };
0050  #with the others...
0051  if ($_ =~ $RUI){
0052      $DSOURCE_INPUT = $DSOURCE_INPUT . "untracked vstring " . $MAP_VAR . " ={\'$RUI\'}" . "\n";
0053  };
0054 };
0055 
0056 open(CONFIGUPDATE, ">ConfigUpdate.txt");
0057 print CONFIGUPDATE "$DSOURCE_INPUT";
0058 close(CONFIGUPDATE); 
0059