use STAR::Checker; $check = STAR::Checker->check( -datablock=>$ARGV[0], -dictionary=>$ARGV[1] );
Usage: $check = STAR::Checker->check(-datablock=>$data, -dictionary=>$dict [, -options=>$options ] );
Checks the DataBlock object $data
against the dictionary object
$dict
(see STAR::Parser and STAR::DataBlock). Checks 1) whether all items in the
DataBlock are defined in the dictionary, 2) whether mandatory items are
present in the file, 3) whether dependent items are present in the file
(e.g. cartn_x makes cartn_y and cartn_z dependent), 4) whether parent items
are present, and 5) whether the item values in the DataBlock conform to the
item type definitions in the dictionary.
Returns 1 if the check was successful (no problems were found), and 0 if
the check was unsuccessful (problems were found). A list of the specific
problems is written to STDERR when -options=>'l'
is specified.