line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::GenericDataHeader; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
80
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
95
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
10
|
use Finnigan; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
8
|
2
|
|
|
2
|
|
9
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
766
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub decode { |
11
|
3
|
|
|
3
|
1
|
8
|
my ($class, $stream) = @_; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
|
|
23
|
my $self = Finnigan::Decoder->read($stream, [n => ['V', 'UInt32']]); |
14
|
3
|
|
|
|
|
15
|
bless $self, $class; |
15
|
|
|
|
|
|
|
|
16
|
3
|
50
|
|
|
|
11
|
if ( $self->n ) { |
17
|
3
|
|
|
|
|
10
|
$self->iterate_object($stream, $self->n, field => 'Finnigan::GenericDataDescriptor'); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# prepare the field templates |
21
|
3
|
|
|
|
|
7
|
my $ord = 1; |
22
|
3
|
|
|
|
|
6
|
foreach my $f ( @{$self->{data}->{"field"}->{value}} ) { |
|
3
|
|
|
|
|
12
|
|
23
|
608
|
|
|
|
|
769
|
push @{$self->{templates}}, $f->definition; |
|
608
|
|
|
|
|
1958
|
|
24
|
608
|
|
|
|
|
921
|
push @{$self->{ordered_templates}}, $f->definition($ord++); |
|
608
|
|
|
|
|
2207
|
|
25
|
608
|
|
|
|
|
899
|
push @{$self->{labels}}, $f->label; |
|
608
|
|
|
|
|
2140
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
|
|
19
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub n { |
32
|
|
|
|
|
|
|
# the number of data descriptors |
33
|
9
|
|
|
9
|
1
|
90
|
shift->{data}->{"n"}->{value}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub fields { |
37
|
21
|
|
|
21
|
1
|
140
|
shift->{data}->{"field"}->{value}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub labels { |
41
|
0
|
|
|
0
|
1
|
0
|
shift->{labels}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub field_templates { |
45
|
33
|
|
|
33
|
1
|
1234
|
shift->{templates}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub ordered_field_templates { |
49
|
18
|
|
|
18
|
1
|
176
|
shift->{ordered_templates}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |