Finnigan/ScanIndexEntry.pm

filter: Statementstmt 96.8% 31 / 32 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 18 / 18 Podpod 100% 14 / 14 totaltotal 96.9% 64 / 66 CC 2 SCAR 1.2
CC
2
Cov
94%
decode
2.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Finnigan/InstrumentLogRecord.pm ↑ Summary Finnigan/Peak.pm »
1 package Finnigan::ScanIndexEntry;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings FATAL => qw( all );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 our $VERSION = 0.0206;
6  
7 2 ▶use Finnigan;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use base 'Finnigan::Decoder';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 my $fields = [
11 "offset" => ['V', 'UInt32'],
12 "index" => ['V', 'UInt32'],
13 "scan event" => ['v', 'UInt16'],
14 "scan segment" => ['v', 'UInt16'],
15 "next" => ['V', 'UInt32'],
16 "unknown long" => ['V', 'UInt32'],
17 "data size" => ['V', 'UInt32'],
18 "start time" => ['d<', 'Float64'],
19 "total current" => ['d<', 'Float64'],
20 "base intensity" => ['d<', 'Float64'],
21 "base mz" => ['d<', 'Float64'],
22 "low mz" => ['d<', 'Float64'],
23 "high mz" => ['d<', 'Float64'],
24 ];
25  
26 2 my $fields64 = [
27 "32-bit offset (defunct)" => ['V', 'UInt32'],
28 "index" => ['V', 'UInt32'],
29 "scan event" => ['v', 'UInt16'],
30 "scan segment" => ['v', 'UInt16'],
31 "next" => ['V', 'UInt32'],
32 "unknown long" => ['V', 'UInt32'],
33 "data size" => ['V', 'UInt32'],
34 "start time" => ['d<', 'Float64'],
35 "total current" => ['d<', 'Float64'],
36 "base intensity" => ['d<', 'Float64'],
37 "base mz" => ['d<', 'Float64'],
38 "low mz" => ['d<', 'Float64'],
39 "high mz" => ['d<', 'Float64'],
40 "offset" => ['Q<', 'Uint64'],
41 ];
42  
43 33 ▶sub decode {
Subroutine decode: called CC=2 SCAR=8.1
Pod documented
44 33 ▶ if ($_[2] == 64) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[2] == 64) { } 0 33 33
45 0 return bless Finnigan::Decoder->read($_[1], $fields64), $_[0];
46 }
47 else {
48 33 return bless Finnigan::Decoder->read($_[1], $fields), $_[0];
49 }
50 }
51  
52 2 ▶sub offset {
Subroutine offset: called CC=1 SCAR=0.0
Pod documented
53 2 shift->{data}->{"offset"}->{value};
54 }
55  
56 2 ▶sub index {
Subroutine index: called CC=1 SCAR=0.0
Pod documented
57 2 shift->{data}->{"index"}->{value};
58 }
59  
60 2 ▶sub scan_event {
Subroutine scan_event: called CC=1 SCAR=0.0
Pod documented
61 2 shift->{data}->{"scan event"}->{value};
62 }
63  
64 2 ▶sub scan_segment {
Subroutine scan_segment: called CC=1 SCAR=0.0
Pod documented
65 2 shift->{data}->{"scan segment"}->{value};
66 }
67  
68 2 ▶sub next {
Subroutine next: called CC=1 SCAR=0.0
Pod documented
69 2 shift->{data}->{"next"}->{value};
70 }
71  
72 2 ▶sub unknown {
Subroutine unknown: called CC=1 SCAR=0.0
Pod documented
73 2 shift->{data}->{"unknown long"}->{value};
74 }
75  
76 2 ▶sub data_size {
Subroutine data_size: called CC=1 SCAR=0.0
Pod documented
77 2 shift->{data}->{"data size"}->{value};
78 }
79  
80 2 ▶sub start_time {
Subroutine start_time: called CC=1 SCAR=0.0
Pod documented
81 2 shift->{data}->{"start time"}->{value};
82 }
83  
84 2 ▶sub total_current {
Subroutine total_current: called CC=1 SCAR=0.0
Pod documented
85 2 shift->{data}->{"total current"}->{value};
86 }
87  
88 2 ▶sub base_intensity {
Subroutine base_intensity: called CC=1 SCAR=0.0
Pod documented
89 2 shift->{data}->{"base intensity"}->{value};
90 }
91  
92 2 ▶sub base_mz {
Subroutine base_mz: called CC=1 SCAR=0.0
Pod documented
93 2 shift->{data}->{"base mz"}->{value};
94 }
95  
96 2 ▶sub low_mz {
Subroutine low_mz: called CC=1 SCAR=0.0
Pod documented
97 2 shift->{data}->{"low mz"}->{value};
98 }
99  
100 2 ▶sub high_mz {
Subroutine high_mz: called CC=1 SCAR=0.0
Pod documented
101 2 shift->{data}->{"high mz"}->{value};
102 }
103  
104  
105 2 1;
106 __END__
« Finnigan/InstrumentLogRecord.pm ↑ Summary Finnigan/Peak.pm »