Finnigan/ScanEventPreamble.pm

filter: Statementstmt 94.1% 80 / 85 Branchbran 65.9% 29 / 44 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 18 / 18 Podpod 100% 13 / 13 totaltotal 87.5% 140 / 160 CC 24 SCAR 11.1
CC
24
Cov
84%
list
5.0
corona
3.5
detector
3.5
CRAP 3.0
« Finnigan/ScanEvent.pm ↑ Summary Finnigan.pm »
1 package Finnigan::ScanEventPreamble;
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 ▶use overload ('""' => 'stringify');
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 my %SYMBOL = (
13 bool => {
14 0 => "False",
15 1 => "True"
16 },
17  
18 "on/off" => {
19 0 => "Off",
20 1 => "On",
21 2 => "undefined",
22 },
23  
24 detector => {
25 0 => "valid",
26 1 => "undefined",
27 },
28  
29 analyzer => {
30 0 => "ITMS",
31 1 => "TQMS",
32 2 => "SQMS",
33 3 => "TOFMS",
34 4 => "FTMS",
35 5 => "Sector",
36 6 => "undefined"
37 },
38  
39 polarity => {
40 0 => "negative",
41 1 => "positive",
42 2 => "undefined",
43 },
44  
45 "scan mode" => {
46 0 => "centroid",
47 1 => "profile",
48 2 => "undefined",
49 },
50  
51 "scan type" => {
52 0 => "Full",
53 1 => "Zoom",
54 2 => "SIM",
55 3 => "SRM",
56 4 => "CRM",
57 5 => "undefined",
58 6 => "Q1",
59 7 => "Q3",
60 },
61  
62 "ms power" => {
63 0 => "undefined",
64 1 => "MS1",
65 2 => "MS2",
66 3 => "MS3",
67 4 => "MS4",
68 5 => "MS5",
69 6 => "MS6",
70 7 => "MS7",
71 8 => "MS8",
72 },
73  
74 ionization => {
75 0 => "EI",
76 1 => "CI",
77 2 => "FABI",
78 3 => "ESI",
79 4 => "APCI",
80 5 => "NSI",
81 6 => "TSI",
82 7 => "FDI",
83 8 => "MALDI",
84 9 => "GDI",
85 10 => "undefined"
86 },
87 );
88  
89 2 my %TYPE = (
90 "corona" => "on/off",
91 "detector" => "detector",
92 "polarity" => "polarity",
93 "scan mode" => "scan mode",
94 "ms power" => "ms power",
95 "scan type" => "scan type",
96 "dependent" => "bool",
97 "ionization" => "ionization",
98 "wideband" => "on/off",
99 "analyzer" => "analyzer",
100 );
101  
102 2 my @common_fields = (
103 "unknown byte[0]" => ['C', 'UInt8'],
104 "unknown byte[1]" => ['C', 'UInt8'],
105 "corona" => ['C', 'UInt8'],
106 "detector" => ['C', 'UInt8'],
107 "polarity" => ['C', 'UInt8'],
108 "scan mode" => ['C', 'UInt8'],
109 "ms power" => ['C', 'UInt8'],
110 "scan type" => ['C', 'UInt8'],
111 "unknown byte[8]" => ['C', 'UInt8'],
112 "unknown byte[9]" => ['C', 'UInt8'],
113 "dependent" => ['C', 'UInt8'],
114 "ionization" => ['C', 'UInt8'],
115 "unknown byte[12]" => ['C', 'UInt8'],
116 "unknown byte[13]" => ['C', 'UInt8'],
117 "unknown byte[14]" => ['C', 'UInt8'],
118 "unknown byte[15]" => ['C', 'UInt8'],
119 "unknown byte[16]" => ['C', 'UInt8'],
120 "unknown byte[17]" => ['C', 'UInt8'],
121 "unknown byte[18]" => ['C', 'UInt8'],
122 "unknown byte[19]" => ['C', 'UInt8'],
123 "unknown byte[20]" => ['C', 'UInt8'],
124 "unknown byte[21]" => ['C', 'UInt8'],
125 "unknown byte[22]" => ['C', 'UInt8'],
126 "unknown byte[23]" => ['C', 'UInt8'],
127 "unknown byte[24]" => ['C', 'UInt8'],
128 "unknown byte[25]" => ['C', 'UInt8'],
129 "unknown byte[26]" => ['C', 'UInt8'],
130 "unknown byte[27]" => ['C', 'UInt8'],
131 "unknown byte[28]" => ['C', 'UInt8'],
132 "unknown byte[29]" => ['C', 'UInt8'],
133 "unknown byte[30]" => ['C', 'UInt8'],
134 "unknown byte[31]" => ['C', 'UInt8'],
135 "wideband" => ['C', 'UInt8'],
136 "unknown byte[33]" => ['C', 'UInt8'],
137 "unknown byte[34]" => ['C', 'UInt8'],
138 "unknown byte[35]" => ['C', 'UInt8'],
139 "unknown byte[36]" => ['C', 'UInt8'],
140 "unknown byte[37]" => ['C', 'UInt8'],
141 "unknown byte[38]" => ['C', 'UInt8'],
142 "unknown byte[39]" => ['C', 'UInt8'],
143 "analyzer" => ['C', 'UInt8'],
144 );
145  
146 2 my %specific_fields;
147 2 $specific_fields{8} = [];
148 2 $specific_fields{57} = [
149 "unknown byte[41]" => ['C', 'UInt8'],
150 "unknown byte[42]" => ['C', 'UInt8'],
151 "unknown byte[43]" => ['C', 'UInt8'],
152 "unknown byte[44]" => ['C', 'UInt8'],
153 "unknown byte[45]" => ['C', 'UInt8'],
154 "unknown byte[46]" => ['C', 'UInt8'],
155 "unknown byte[47]" => ['C', 'UInt8'],
156 "unknown byte[48]" => ['C', 'UInt8'],
157 "unknown byte[49]" => ['C', 'UInt8'],
158 "unknown byte[50]" => ['C', 'UInt8'],
159 "unknown byte[51]" => ['C', 'UInt8'],
160 "unknown byte[52]" => ['C', 'UInt8'],
161 "unknown byte[53]" => ['C', 'UInt8'],
162 "unknown byte[54]" => ['C', 'UInt8'],
163 "unknown byte[55]" => ['C', 'UInt8'],
164 "unknown byte[56]" => ['C', 'UInt8'],
165 "unknown byte[57]" => ['C', 'UInt8'],
166 "unknown byte[58]" => ['C', 'UInt8'],
167 "unknown byte[59]" => ['C', 'UInt8'],
168 "unknown byte[60]" => ['C', 'UInt8'],
169 "unknown byte[61]" => ['C', 'UInt8'],
170 "unknown byte[62]" => ['C', 'UInt8'],
171 "unknown byte[63]" => ['C', 'UInt8'],
172 "unknown byte[64]" => ['C', 'UInt8'],
173 "unknown byte[65]" => ['C', 'UInt8'],
174 "unknown byte[66]" => ['C', 'UInt8'],
175 "unknown byte[67]" => ['C', 'UInt8'],
176 "unknown byte[68]" => ['C', 'UInt8'],
177 "unknown byte[69]" => ['C', 'UInt8'],
178 "unknown byte[70]" => ['C', 'UInt8'],
179 "unknown byte[71]" => ['C', 'UInt8'],
180 "unknown byte[72]" => ['C', 'UInt8'],
181 "unknown byte[73]" => ['C', 'UInt8'],
182 "unknown byte[74]" => ['C', 'UInt8'],
183 "unknown byte[75]" => ['C', 'UInt8'],
184 "unknown byte[76]" => ['C', 'UInt8'],
185 "unknown byte[77]" => ['C', 'UInt8'],
186 "unknown byte[78]" => ['C', 'UInt8'],
187 "unknown byte[79]" => ['C', 'UInt8'],
188 ];
189  
190 2 $specific_fields{60} = $specific_fields{57};
191  
192 2 $specific_fields{62} = [
193 "unknown byte[41]" => ['C', 'UInt8'],
194 "unknown byte[42]" => ['C', 'UInt8'],
195 "unknown byte[43]" => ['C', 'UInt8'],
196 "unknown byte[44]" => ['C', 'UInt8'],
197 "unknown byte[45]" => ['C', 'UInt8'],
198 "unknown byte[46]" => ['C', 'UInt8'],
199 "unknown byte[47]" => ['C', 'UInt8'],
200 "unknown byte[48]" => ['C', 'UInt8'],
201 "unknown byte[49]" => ['C', 'UInt8'],
202 "unknown byte[50]" => ['C', 'UInt8'],
203 "unknown byte[51]" => ['C', 'UInt8'],
204 "unknown byte[52]" => ['C', 'UInt8'],
205 "unknown byte[53]" => ['C', 'UInt8'],
206 "unknown byte[54]" => ['C', 'UInt8'],
207 "unknown byte[55]" => ['C', 'UInt8'],
208 "unknown byte[56]" => ['C', 'UInt8'],
209 "unknown byte[57]" => ['C', 'UInt8'],
210 "unknown byte[58]" => ['C', 'UInt8'],
211 "unknown byte[59]" => ['C', 'UInt8'],
212 "unknown byte[60]" => ['C', 'UInt8'],
213 "unknown byte[61]" => ['C', 'UInt8'],
214 "unknown byte[62]" => ['C', 'UInt8'],
215 "unknown byte[63]" => ['C', 'UInt8'],
216 "unknown byte[64]" => ['C', 'UInt8'],
217 "unknown byte[65]" => ['C', 'UInt8'],
218 "unknown byte[66]" => ['C', 'UInt8'],
219 "unknown byte[67]" => ['C', 'UInt8'],
220 "unknown byte[68]" => ['C', 'UInt8'],
221 "unknown byte[69]" => ['C', 'UInt8'],
222 "unknown byte[70]" => ['C', 'UInt8'],
223 "unknown byte[71]" => ['C', 'UInt8'],
224 "unknown byte[72]" => ['C', 'UInt8'],
225 "unknown byte[73]" => ['C', 'UInt8'],
226 "unknown byte[74]" => ['C', 'UInt8'],
227 "unknown byte[75]" => ['C', 'UInt8'],
228 "unknown byte[76]" => ['C', 'UInt8'],
229 "unknown byte[77]" => ['C', 'UInt8'],
230 "unknown byte[78]" => ['C', 'UInt8'],
231 "unknown byte[79]" => ['C', 'UInt8'],
232  
233 "unknown byte[80]" => ['C', 'UInt8'],
234 "unknown byte[81]" => ['C', 'UInt8'],
235 "unknown byte[82]" => ['C', 'UInt8'],
236 "unknown byte[83]" => ['C', 'UInt8'],
237 "unknown byte[84]" => ['C', 'UInt8'],
238 "unknown byte[85]" => ['C', 'UInt8'],
239 "unknown byte[86]" => ['C', 'UInt8'],
240 "unknown byte[87]" => ['C', 'UInt8'],
241 "unknown byte[88]" => ['C', 'UInt8'],
242 "unknown byte[89]" => ['C', 'UInt8'],
243 "unknown byte[90]" => ['C', 'UInt8'],
244 "unknown byte[91]" => ['C', 'UInt8'],
245 "unknown byte[92]" => ['C', 'UInt8'],
246 "unknown byte[93]" => ['C', 'UInt8'],
247 "unknown byte[94]" => ['C', 'UInt8'],
248 "unknown byte[95]" => ['C', 'UInt8'],
249 "unknown byte[96]" => ['C', 'UInt8'],
250 "unknown byte[97]" => ['C', 'UInt8'],
251 "unknown byte[98]" => ['C', 'UInt8'],
252 "unknown byte[99]" => ['C', 'UInt8'],
253 "unknown byte[100]" => ['C', 'UInt8'],
254 "unknown byte[101]" => ['C', 'UInt8'],
255 "unknown byte[102]" => ['C', 'UInt8'],
256 "unknown byte[103]" => ['C', 'UInt8'],
257 "unknown byte[104]" => ['C', 'UInt8'],
258 "unknown byte[105]" => ['C', 'UInt8'],
259 "unknown byte[106]" => ['C', 'UInt8'],
260 "unknown byte[107]" => ['C', 'UInt8'],
261 "unknown byte[108]" => ['C', 'UInt8'],
262 "unknown byte[109]" => ['C', 'UInt8'],
263 "unknown byte[110]" => ['C', 'UInt8'],
264 "unknown byte[111]" => ['C', 'UInt8'],
265 "unknown byte[112]" => ['C', 'UInt8'],
266 "unknown byte[113]" => ['C', 'UInt8'],
267 "unknown byte[114]" => ['C', 'UInt8'],
268 "unknown byte[115]" => ['C', 'UInt8'],
269 "unknown byte[116]" => ['C', 'UInt8'],
270 "unknown byte[117]" => ['C', 'UInt8'],
271 "unknown byte[118]" => ['C', 'UInt8'],
272 "unknown byte[119]" => ['C', 'UInt8'],
273 ];
274  
275 2 $specific_fields{63} = [
276 "unknown byte[41]" => ['C', 'UInt8'],
277 "unknown byte[42]" => ['C', 'UInt8'],
278 "unknown byte[43]" => ['C', 'UInt8'],
279 "unknown byte[44]" => ['C', 'UInt8'],
280 "unknown byte[45]" => ['C', 'UInt8'],
281 "unknown byte[46]" => ['C', 'UInt8'],
282 "unknown byte[47]" => ['C', 'UInt8'],
283 "unknown byte[48]" => ['C', 'UInt8'],
284 "unknown byte[49]" => ['C', 'UInt8'],
285 "unknown byte[50]" => ['C', 'UInt8'],
286 "unknown byte[51]" => ['C', 'UInt8'],
287 "unknown byte[52]" => ['C', 'UInt8'],
288 "unknown byte[53]" => ['C', 'UInt8'],
289 "unknown byte[54]" => ['C', 'UInt8'],
290 "unknown byte[55]" => ['C', 'UInt8'],
291 "unknown byte[56]" => ['C', 'UInt8'],
292 "unknown byte[57]" => ['C', 'UInt8'],
293 "unknown byte[58]" => ['C', 'UInt8'],
294 "unknown byte[59]" => ['C', 'UInt8'],
295 "unknown byte[60]" => ['C', 'UInt8'],
296 "unknown byte[61]" => ['C', 'UInt8'],
297 "unknown byte[62]" => ['C', 'UInt8'],
298 "unknown byte[63]" => ['C', 'UInt8'],
299 "unknown byte[64]" => ['C', 'UInt8'],
300 "unknown byte[65]" => ['C', 'UInt8'],
301 "unknown byte[66]" => ['C', 'UInt8'],
302 "unknown byte[67]" => ['C', 'UInt8'],
303 "unknown byte[68]" => ['C', 'UInt8'],
304 "unknown byte[69]" => ['C', 'UInt8'],
305 "unknown byte[70]" => ['C', 'UInt8'],
306 "unknown byte[71]" => ['C', 'UInt8'],
307 "unknown byte[72]" => ['C', 'UInt8'],
308 "unknown byte[73]" => ['C', 'UInt8'],
309 "unknown byte[74]" => ['C', 'UInt8'],
310 "unknown byte[75]" => ['C', 'UInt8'],
311 "unknown byte[76]" => ['C', 'UInt8'],
312 "unknown byte[77]" => ['C', 'UInt8'],
313 "unknown byte[78]" => ['C', 'UInt8'],
314 "unknown byte[79]" => ['C', 'UInt8'],
315  
316 "unknown byte[80]" => ['C', 'UInt8'],
317 "unknown byte[81]" => ['C', 'UInt8'],
318 "unknown byte[82]" => ['C', 'UInt8'],
319 "unknown byte[83]" => ['C', 'UInt8'],
320 "unknown byte[84]" => ['C', 'UInt8'],
321 "unknown byte[85]" => ['C', 'UInt8'],
322 "unknown byte[86]" => ['C', 'UInt8'],
323 "unknown byte[87]" => ['C', 'UInt8'],
324 "unknown byte[88]" => ['C', 'UInt8'],
325 "unknown byte[89]" => ['C', 'UInt8'],
326 "unknown byte[90]" => ['C', 'UInt8'],
327 "unknown byte[91]" => ['C', 'UInt8'],
328 "unknown byte[92]" => ['C', 'UInt8'],
329 "unknown byte[93]" => ['C', 'UInt8'],
330 "unknown byte[94]" => ['C', 'UInt8'],
331 "unknown byte[95]" => ['C', 'UInt8'],
332 "unknown byte[96]" => ['C', 'UInt8'],
333 "unknown byte[97]" => ['C', 'UInt8'],
334 "unknown byte[98]" => ['C', 'UInt8'],
335 "unknown byte[99]" => ['C', 'UInt8'],
336 "unknown byte[100]" => ['C', 'UInt8'],
337 "unknown byte[101]" => ['C', 'UInt8'],
338 "unknown byte[102]" => ['C', 'UInt8'],
339 "unknown byte[103]" => ['C', 'UInt8'],
340 "unknown byte[104]" => ['C', 'UInt8'],
341 "unknown byte[105]" => ['C', 'UInt8'],
342 "unknown byte[106]" => ['C', 'UInt8'],
343 "unknown byte[107]" => ['C', 'UInt8'],
344 "unknown byte[108]" => ['C', 'UInt8'],
345 "unknown byte[109]" => ['C', 'UInt8'],
346 "unknown byte[110]" => ['C', 'UInt8'],
347 "unknown byte[111]" => ['C', 'UInt8'],
348 "unknown byte[112]" => ['C', 'UInt8'],
349 "unknown byte[113]" => ['C', 'UInt8'],
350 "unknown byte[114]" => ['C', 'UInt8'],
351 "unknown byte[115]" => ['C', 'UInt8'],
352 "unknown byte[116]" => ['C', 'UInt8'],
353 "unknown byte[117]" => ['C', 'UInt8'],
354 "unknown byte[118]" => ['C', 'UInt8'],
355 "unknown byte[119]" => ['C', 'UInt8'],
356  
357 "unknown byte[120]" => ['C', 'UInt8'],
358 "unknown byte[121]" => ['C', 'UInt8'],
359 "unknown byte[122]" => ['C', 'UInt8'],
360 "unknown byte[123]" => ['C', 'UInt8'],
361 "unknown byte[124]" => ['C', 'UInt8'],
362 "unknown byte[125]" => ['C', 'UInt8'],
363 "unknown byte[126]" => ['C', 'UInt8'],
364 "unknown byte[127]" => ['C', 'UInt8'],
365 ];
366  
367 2 $specific_fields{64} = $specific_fields{63};
368  
369 # stringify symbols
370 2 my %polarity_symbol = (
371 0 => "-",
372 1 => "+",
373 2 => "any",
374 );
375  
376 2 my %scan_mode_symbol = (
377 0 => "c",
378 1 => "p",
379 2 => "?",
380 );
381  
382 2 my %dependent_symbol = (
383 0 => "",
384 1 => " d",
385 );
386  
387 2 my %wideband_symbol = (
388 0 => "",
389 1 => " w",
390 2 => "",
391 );
392  
393 2 my %ms_power_symbol = (
394 0 => "?",
395 1 => "ms",
396 2 => "ms2",
397 3 => "ms3",
398 4 => "ms4",
399 5 => "ms5",
400 6 => "ms6",
401 7 => "ms7",
402 8 => "ms8",
403 );
404  
405 # used in list()
406 2 my %name = (
407 2 => "corona",
408 3 => "detector",
409 4 => "polarity",
410 5 => "scan mode",
411 6 => "ms power",
412 7 => "scan type",
413  
414 10 => "dependent",
415 11 => "ionization",
416  
417 32 => "wideband",
418 40 => "analyzer",
419 );
420  
421 37 ▶sub decode {
Subroutine decode: called CC=2 SCAR=7.1
Pod documented
422 # my ($class, $stream, $version) = @_;
423 37 ▶ die "don\'t know how to parse version $_[2]" unless $specific_fields{$_[2]};
Branch: 1 branch
BranchTrueFalseTotal
unless $specific_fields{$_[2]} 0 37 37
424 37 return bless Finnigan::Decoder->read($_[1], [@common_fields, @{$specific_fields{$_[2]}}]), $_[0];
425 }
426  
427  
428 5 ▶sub list {
Subroutine list: called CC=5 SCAR=16.1
Pod documented
429 5 my @list;
430 5 foreach my $i (0 .. keys(%{$_[0]->{data}}) - 1) {
431 640 ▶ my $key = $name{$i} ? $name{$i} : "unknown byte[$i]";
Branch: 1 branch
BranchTrueFalseTotal
$name{$i} ? : 50 590 640
432 640 my $value;
433 640 ▶ if ( $_[1] ) { # decode
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 512 128 640
434 $value = $TYPE{$key}
435 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
436 512 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 40 472 512
437 }
438 else {
439 128 $value = $_[0]->{data}->{$key}->{value};
440 }
441 640 $list[$i] = $value;
442 }
443 5 return @list;
444 }
445  
446 3 ▶sub corona {
Subroutine corona: called CC=3 SCAR=12.5
Pod documented
447 3 my $key = "corona";
448 3 ▶ if ( $_[1] ) { # decode
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 3 0 3
449 return $TYPE{$key}
450 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
451 3 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 3 0 3
452 }
453 else {
454 0 shift->{data}->{corona}->{value};
455 }
456 }
457  
458 1 ▶sub detector {
Subroutine detector: called CC=3 SCAR=12.5
Pod documented
459 1 my $key = "detector";
460 1 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 1 0 1
461 return $TYPE{$key}
462 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
463 1 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 1 0 1
464 }
465 else {
466 0 $_[0]->{data}->{$key}->{value};
467 }
468 }
469  
470 9 ▶sub polarity {
Subroutine polarity: called CC=3 SCAR=11.0
Pod documented
471 9 my $key = "polarity";
472 9 ▶ if ( $_[1] ) { # decode
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 3 6 9
473 return $TYPE{$key}
474 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
475 3 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 3 0 3
476 }
477 else {
478 6 return $_[0]->{data}->{$key}->{value};
479 }
480 }
481  
482 9 ▶sub scan_mode {
Subroutine scan_mode: called CC=3 SCAR=11.0
Pod documented
483 9 my $key = "scan mode";
484 9 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 3 6 9
485 return $TYPE{$key}
486 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
487 3 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 3 0 3
488 }
489 else {
490 6 $_[0]->{data}->{$key}->{value};
491 }
492 }
493  
494 9 ▶sub ms_power {
Subroutine ms_power: called CC=3 SCAR=11.0
Pod documented
495 9 my $key = "ms power";
496 9 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 3 6 9
497 return $TYPE{$key}
498 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
499 3 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 3 0 3
500 }
501 else {
502 6 $_[0]->{data}->{$key}->{value};
503 }
504 }
505  
506 9 ▶sub scan_type {
Subroutine scan_type: called CC=3 SCAR=12.5
Pod documented
507 9 my $key = "scan type";
508 9 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 9 0 9
509 return $TYPE{$key}
510 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
511 9 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 9 0 9
512 }
513 else {
514 0 $_[0]->{data}->{$key}->{value};
515 }
516 }
517  
518 9 ▶sub dependent {
Subroutine dependent: called CC=1 SCAR=0.0
Pod documented
519 9 $_[0]->{data}->{dependent}->{value};
520 }
521  
522 9 ▶sub ionization {
Subroutine ionization: called CC=3 SCAR=12.5
Pod documented
523 9 my $key = "ionization";
524 9 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 9 0 9
525 return $TYPE{$key}
526 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
527 9 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 9 0 9
528 }
529 else {
530 0 $_[0]->{data}->{$key}->{value};
531 }
532 }
533  
534 8 ▶sub wideband {
Subroutine wideband: called CC=3 SCAR=11.0
Pod documented
535 8 my $key = "wideband";
536 8 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 2 6 8
537 return $TYPE{$key}
538 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
539 2 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 2 0 2
540 }
541 else {
542 6 $_[0]->{data}->{$key}->{value};
543 }
544 }
545  
546 9 ▶sub analyzer {
Subroutine analyzer: called CC=3 SCAR=12.5
Pod documented
547 9 my $key = "analyzer";
548 9 ▶ if ( $_[1] ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) { } 9 0 9
549 return $TYPE{$key}
550 ? $SYMBOL{$TYPE{$key}}->{$_[0]->{data}->{$key}->{value}}
551 9 ▶ : $_[0]->{data}->{$key}->{value};
Branch: 1 branch
BranchTrueFalseTotal
$TYPE{$key} ? : 9 0 9
552 }
553 else {
554 0 $_[0]->{data}->{$key}->{value};
555 }
556 }
557  
558 6 ▶sub stringify {
Subroutine stringify: called CC=1 SCAR=0.0
Pod documented
559 6 my $self = shift;
560  
561 # consider adding {s;e} and "lock" to output, e.g.:
562 # FTMS {1;1} + p ESI Full lock ms [60.00-1200.00]"
563 $self->analyzer(decode => 1)
564 . " " . $polarity_symbol{$self->polarity}
565 . " " . $scan_mode_symbol{$self->scan_mode}
566 . " " . $self->ionization('decode')
567 . $dependent_symbol{$self->dependent}
568 . $wideband_symbol{$self->wideband}
569 . " " . $self->scan_type('decode')
570 6 . " " . $ms_power_symbol{$self->ms_power}
571 }
572  
573 2 1;
574 __END__
« Finnigan/ScanEvent.pm ↑ Summary Finnigan.pm »