File: modules/TrDat.pm Version: 1.52
TrDat ... TrDat.pm Manage TR.DAT ( Namelist ) file Use: Err
File
TrDir
TrEnv
TrMDS
TrStat
Util
strictRoutine Comment Arguments AddPreExt Add a new file definition... Bad_nml Filter for data lines no longer valid ( currently otf VAR = ! no value supplied ) Change Edit MDSplus related namelist parameters
print ("\n\tEnter ? for help on ( some ) parameters " );Cline Write a line as a comment..
(my $line = $_[0]) =~ s/\s//g ; # No blanksDelPreExt Delete a file definition... Diff Compare TR.DAT with 'previous' file EXT_clean Remove file defn info from EXT cards EdDat Launch txt editor EdPreExt Edit pre, ext cards EdPreExt1 Edit all/bad file defns my ( $h, $opt ) = @_ ; EdPreExt2 Edit one pre, ext pair... Ext Construct a file extension argument
eg (EXTNB2=) 'NBI_0340 UFL:2:tranppf:0340:$SDD:Reprocessed NBI data :'my( $DTY, $seq, $UID, $ttl ) = @_; Filter out bad lines.. GeoAnt Workaround to set RF Antenna geometry.. Hcomp Returns hash of elements in h1 which differ from h2 IsPPF EXT cards specift PPF ?? IsUFL EXT cards specift UFL ?? IsX test EXT cards.. Key Extract key from line..
01Jun2012 jec Remove array indexing from key definitionKeys Do things with the keys.. my ($opt,$h) = @_ ; MDSdf Set default values of MDSplus qtys.. NewTrDat Find a new TrDat file PrKey Print hash entry as namelist item my( $key, $href ) = @_ ; PrOld Print old update block, if parts are still live..
15Mar2004 jconboy@jet.uk
BUGfix - missing EOL on first line => append
to previous commentmy ( $updref, $line ) = @_ ; PrUpd Print block of updates PrtPreExt print all/bad file defns RdDAT Extract parameters from the tr.dat file
20Oct2003 4.00 Add mdsplus variables
d print "\nRdDAT :- " ;Reset Reset a parameter in TR.DAT ( quick & dirty .. )
sed -e "s%EXTNB2\s*=.*%EXTNB2='$ext'%"RunConfig Display run configuration, confirm with user
New at 4.00, 20Oct2003
1.41 28Jan2013
Back to top after Edit, to maintain synch btwn file & variables
RunConfig
RdDat Reads selected data to hash
Runconfig sets some defaults
CONFIG:
| Show Disply current values
| Request action
|A -> Vfy
|C -> Change
Keys("Edit")
| EditKey()
|D -> Diff
|E -> EdDat
| RdDat
|R -> ( Reset saved values )
|V -> Vfy()
Keys("Verify")
| VfyKey()
|Q -> ( return 12 )
End CONFIG
hPar
UpDAT
Status
targetSetInput Set input parameters SetKMDS Reset KMDSPLUS & Ufile flags ( temp fix - TrFile should do this.. )
[ called only from TrExe::mdsdata - 28Jan2013 jec ]Show Show main variables Status Create a new status file .. arg is hash of values extracted from TRDAT file Test Testbed for TrDat
TestSetup();TestConfig Testbed for TR.DAT manipulation -
Use
$SR/ModTest <dir> DAT Config 50621 M00TestSetup for TrDat tests TestUpDAT Testbed for TR.DAT manipulation $SR/ModTest DAT UpDAT 50621 M00
chdir $Transp::TWD or Err::Die( " Cant cd to TWD " );TrDat_Vn Choose target TR.DAT, if versions changed by TrFile exist.. TrDat_par Set parameters from Status file ( not used for data/config steps ) TrdatParm Extract parameters from the tr.dat file
20Oct2003 4.00 Add mdsplus variablesmy ( $file, $trdat ) = @_ ; UpDAT Update TR.DAT V Print version number Vfy Check for valid run configuration VfyKey Verify Key/Value pair my ( $h, $key, $val ) = @_ ; WriteNewPreExt write new file defs ( at end of TRDATA namelist ) hPar Fix some hash parameters.. init_var initialise nblist_status deduce nblist update status of TR.DAT
Expect to find
Search -e "configuration|EXTNB2" $TRDAT
EXTNB2='NBI_0382 UFL:2:tranppf:0382:$SDD:NBI4/17/JETPPF'
!NBLIST.FOR ! Run=50621T51 beam constants, configuration = JET2000my( $file, $run, $UID, $seq ) = @_ ; printl Print one line pserv Write the temp. file pserv target Create $TWD/<run>.target, needed by TEQ