Changeset 16319 for trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
- Timestamp:
- Feb 5, 2008, 3:55:43 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r16207 r16319 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.7 3 2008-01-23 23:33:25 eugene Exp $3 # $Id: Config.pm,v 1.74 2008-02-06 01:55:43 price Exp $ 4 4 5 5 package PS::IPP::Config; … … 784 784 } 785 785 786 # Return hash of tessellations, from TESSELLATIONS within the camera configuration 787 sub tessellations 788 { 789 my $self = shift; # Configuration object 790 791 unless (defined $self) { 792 carp "Programming error"; 793 exit($PS_EXIT_PROG_ERROR); 794 } 795 796 my $camera = $self->{camera}; # Camera configuration 797 unless (defined $camera) { 798 carp "Camera has not yet been defined.\n"; 799 exit($PS_EXIT_PROG_ERROR); 800 } 801 802 my $tessellations = metadataLookupMD($camera, 'TESSELLATIONS'); # Tessellations 786 # Return catdir for tessellation, from TESSELLATIONS within the site configuration 787 sub tessellation_catdir 788 { 789 my $self = shift; # Configuration object 790 my $tess_id = shift; # Tessellation identifier 791 792 unless (defined $self and defined $self->_ipprc and defined $tess_id) { 793 carp "Programming error"; 794 exit($PS_EXIT_PROG_ERROR); 795 } 796 797 my $tessellations = metadataLookupMD($self->_ipprc, 'TESSELLATIONS'); # Tessellations 803 798 unless (defined $tessellations) { 804 carp "Can't find TESSELLATIONS in camera configuration.\n"; 805 exit($PS_EXIT_CONFIG_ERROR); 806 } 807 808 my %tessellations; # Tessellations hash to return 809 foreach my $tess ( @$tessellations ) { 810 unless ($tess->{type} eq "STR") { 811 carp "Type for " . $tess->{name} . " within TESSELLATIONS in camera config is not STR.\n"; 812 next; 813 } 814 815 $tessellations{$tess->{name}} = $tess->{value}; 816 } 817 818 return \%tessellations; 799 carp "Can't find TESSELLATIONS in site configuration.\n"; 800 exit($PS_EXIT_CONFIG_ERROR); 801 } 802 803 my $catdir = metadataLookupStr($tessellations, $tess_id); 804 unless (defined $catdir) { 805 carp "Can't find tessellation identifier $tess_id in TESSELLATIONS in site configuration.\n"; 806 exit($PS_EXIT_CONFIG_ERROR); 807 } 808 809 ### Because DVO doesn't use psModules, it doesn't understand Nebulous --- check 810 my $scheme = file_scheme($catdir); # The scheme, e.g., file, path, neb 811 if (defined $scheme and lc($scheme) eq 'neb') { 812 carp "Tessellation $tess_id refers to a Nebulous path: $catdir\n"; 813 exit($PS_EXIT_CONFIG_ERROR); 814 } 815 816 return $catdir 819 817 } 820 818
Note:
See TracChangeset
for help on using the changeset viewer.
