line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::ProfileChunk; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
115
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use Finnigan; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
47
|
|
8
|
2
|
|
|
2
|
|
10
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
681
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $preamble_0 = [ |
12
|
|
|
|
|
|
|
"first bin" => ['V', 'UInt32'], |
13
|
|
|
|
|
|
|
"nbins" => ['V', 'UInt32'], |
14
|
|
|
|
|
|
|
]; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $preamble = [@$preamble_0, "fudge" => ['f<', 'Float32']]; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub decode { |
19
|
580
|
|
|
580
|
1
|
733
|
my $self; |
20
|
580
|
50
|
|
|
|
969
|
if ( $_[2] > 0 ) { # the layout flag in the packet header |
21
|
580
|
|
|
|
|
1547
|
$self = Finnigan::Decoder->read($_[1], $preamble); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
else { |
24
|
0
|
|
|
|
|
0
|
$self = Finnigan::Decoder->read($_[1], $preamble_0); |
25
|
|
|
|
|
|
|
} |
26
|
580
|
|
|
|
|
1753
|
bless $self, $_[0]; # class |
27
|
580
|
|
|
|
|
2488
|
return $self->iterate_scalar($_[1], $self->{data}->{"nbins"}->{value}, signal => ['f<', 'Float32']); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub nbins { |
31
|
1
|
|
|
1
|
1
|
9
|
shift->{data}->{"nbins"}->{value}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub first_bin { |
35
|
1
|
|
|
1
|
1
|
8
|
shift->{data}->{"first bin"}->{value}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub fudge { |
39
|
1
|
|
|
1
|
1
|
8
|
shift->{data}->{fudge}->{value}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub signal { |
43
|
1
|
|
|
1
|
1
|
9
|
shift->{data}->{"signal"}->{value}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
__END__ |