NAME
Finnigan::InstrumentLogRecord -- the decoder for a single Instrument Log record
SYNOPSIS
my $entry = Finnigan::InstrumentLogRecord->decode(\*INPUT, $header->ordered_field_templates);
use Finnigan;
my $i = 0;
foreach my $field ($entry->fields) {
say $entry->time
. "\t" . $header->field($i)->label
. "\t" . $field->{value};
$j++;
}
DESCRIPTION
This decoder is prototyped on Finnigan::GenericRecord, which is a pass-through decorder that only passes the field definitions it obtains from the header (Finnigan::GenericDataHeader) to Finnigan::Decoder. It is essentially a copy of the Finnigan::GenericRecord code with one specific field (retention time) prepended to the template list.
Because Thermo's GenericRecord objects are odered and may have "virtual" spacers and section titles in them, the Finnigan::Decoder's method of stashing the decoded data into a hash is not directly applicable. A GenericRecord may have duplicate keys and the key order needs to be preserved. That is why Finnigan::GenericRecord relies on the field_templates method of Finnigan::GenericDataHeader to insert ordinal numbers into the keys.
METHODS
- decode($stream)
-
The constructor method
- time
-
Get the timestamp. The timestamp is retention time measured in seconds and stored as floating-point value.
- fields
-
Get the list of all fields in the record. Each field is decoded with the Finnigan::GenericRecord decoder using the definitions from Finnigan::GenericDataHeader, and it contains, for example, the following data:
{value => '8.1953125', type => 'Float32', addr => 803445, seq => 70, size => 4}
SEE ALSO
Finnigan::ScanEvent
AUTHOR
Gene Selkov, <selkovjr@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Gene Selkov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.