DOCUMENTATION
SYNOPSIS
PERL PERL PROGRAM NAME: su_param
AUTHOR: Juan Lorenzo
DATE: May 5 2018
DESCRIPTION V 0.2
BASED ON: 0.1
USE
NOTES
Examples
CHANGES and their DATES May 5 2018 looks for configurations first in the local directory then in the default configuration directory /usr/local/pl/big_streams/config
V 0.0.3 June 2022 reference to L_SU_local_user_constants
removed
L_SU_local_user_constants may create cirularity
parameters for seismic unix programs
both macros and individual modules
Instantiation
sub get
returns values
as an array
input is a scalar reference
used both by superflow/pre-built flows and seismic unix configuration files
Read a default specification file
If default specification file# does not exist locally
then look in the user's configuration directory
~HOME/.L_SU/configuration/active and if that does not exist
then use the default one defined under global libs
Debug with
print ("this is $this\n");
print ("self is $self,program is $program\n");
Changing the namespace variables to lower
case is not a general solution because
original variables can have mixed upper and lower
case names
DEPRECATED:
Older versions may use Config::Simple
my $a = Config::Simple->import_from($this,'Z');
foreach my $key ( keys %Z:: )
{
my $x = lc $key;
print "key is $x\n";
print "$cfg->param($key)\n";
}
sub _check4local_config
needs name_sref
CASE for any type of flow big streams/superflows or for or sunix programs in user-built flows Check for local versions of the configuration files in PL_SEISMIC and also look in specified _CONFIG folder _CONFIG folder is defined as PL_SEISMIC for all but pre-built big streams/superflows (e.g., immodpg)
(For pre-built big streams, look at program_spec to find the definition for _CONFIG)
# my $a = $package->variables();
# foreach my $key (sort keys %$a) {
# print (" su_param,_check4local_config, , key is $key, value is $a->{$key}\n");
# }
# my $ans= $a->{_CONFIG};
# print("2. su_param,_check4local_config,package=$ans\n");
sub _check4user_config
check for versions of the configuration files
in the user's configuration directory:
.L_SU/configuration/active
only needed for Project.config
e.g., not for Sseg2su
sub check4user_config
check for versions of the Project.config file
in the user's configuration directory:
.L_SU/configuration/active
for Project.config
True when for $$name_sref='Project';