Changeset 105
- Timestamp:
- 12/10/05 23:49:30 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData.pm
- Property cvs2svn:cvs-rev changed from 1.34 to 1.35
r104 r105 323 323 } 324 324 325 =head2 get_obs_data_handle($obs, $datatype) 326 327 Return an ObsData::Repository object about directory for $obs station 328 about $datatype data. $datatype can be undefined if you want to get default 329 directory 330 331 =cut 332 333 sub get_obs_data_handle { 334 my ($self, $obs, $datatype) = @_; 335 336 my $dir = $self->getvalue($obs, ($datatype ? "datadir/$datatype" : "datadir")); 337 if (!$dir) { 338 $self->loging(4, 339 "Can't find data directory for %s, type: %s", 340 $obs, $datatype || '(none)' 341 ); 342 return undef; 343 } 344 my $or = ObsData::Repository::dir->new( 345 { 346 obsdata => $self, 347 dir => $dir, 348 obs => $obs, 349 datatype => $datatype, 350 statusfile => "$dir/obsdata.ini" 351 } 352 ); 353 if (!defined($or)) { 354 $self->loging(4, "Can't parse %s, check directory exists", $dir); 355 return undef; 356 } 357 358 return($or); 359 } 360 361 =head2 process_obs($obs) 362 363 Process all data handle by $obs station 364 365 =cut 366 325 367 sub process_obs { 326 368 my ($self, $obs) = @_; … … 335 377 } 336 378 337 sub get_obs_data_handle {338 my ($self, $obs, $datatype) = @_;339 340 my $dir = $self->getvalue($obs, ($datatype ? "datadir/$datatype" : "datadir"));341 if (!$dir) {342 $self->loging(4,343 "Can't find data directory for %s, type: %s",344 $obs, $datatype || '(none)'345 );346 return undef;347 }348 my $or = ObsData::Repository::dir->new(349 {350 obsdata => $self,351 dir => $dir,352 obs => $obs,353 datatype => $datatype,354 statusfile => "$dir/obsdata.ini"355 }356 );357 if (!defined($or)) {358 $self->loging(4, "Can't parse %s, check directory exists", $dir);359 return undef;360 }361 362 return($or);363 }364 365 379 1; 380 381 =head1 AUTHOR 382 383 Olivier Thauvin <olivier.thauvin@aerov.jussieu.fr> 384 385 =cut
Note: See TracChangeset
for help on using the changeset viewer.