File: classOpenMS_1_1FileHandler.html

package info (click to toggle)
openms 1.11.1-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 436,688 kB
  • ctags: 150,907
  • sloc: cpp: 387,126; xml: 71,547; python: 7,764; ansic: 2,626; php: 2,499; sql: 737; ruby: 342; sh: 325; makefile: 128
file content (503 lines) | stat: -rw-r--r-- 38,230 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
<HTML>
<HEAD>
<TITLE>FileHandler Class Reference</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK HREF="style_ini.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<A href="index.html">Home</A> &nbsp;&middot;
<A href="classes.html">Classes</A> &nbsp;&middot;
<A href="annotated.html">Annotated Classes</A> &nbsp;&middot;
<A href="modules.html">Modules</A> &nbsp;&middot;
<A href="functions_func.html">Members</A> &nbsp;&middot;
<A href="namespaces.html">Namespaces</A> &nbsp;&middot;
<A href="pages.html">Related Pages</A>
<HR style="height:1px; border:none; border-top:1px solid #c0c0c0;">
<!-- Generated by Doxygen 1.8.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceOpenMS.html">OpenMS</a></li><li class="navelem"><a class="el" href="classOpenMS_1_1FileHandler.html">FileHandler</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classOpenMS_1_1FileHandler-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">FileHandler Class Reference<div class="ingroups"><a class="el" href="group__FileIO.html">File IO</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Facilitates file handling by file type recognition.  
 <a href="classOpenMS_1_1FileHandler.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="FileHandler_8h_source.html">OpenMS/FORMAT/FileHandler.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a819235ed2844f03df53f4983a7008f28"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a819235ed2844f03df53f4983a7008f28">getOptions</a> ()</td></tr>
<tr class="memdesc:a819235ed2844f03df53f4983a7008f28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mutable access to the options for loading/storing.  <a href="#a819235ed2844f03df53f4983a7008f28">More...</a><br/></td></tr>
<tr class="separator:a819235ed2844f03df53f4983a7008f28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fa0d33e72b9dc6624eeb42c2ca6955a"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a5fa0d33e72b9dc6624eeb42c2ca6955a">getOptions</a> () const </td></tr>
<tr class="memdesc:a5fa0d33e72b9dc6624eeb42c2ca6955a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-mutable access to the options for loading/storing.  <a href="#a5fa0d33e72b9dc6624eeb42c2ca6955a">More...</a><br/></td></tr>
<tr class="separator:a5fa0d33e72b9dc6624eeb42c2ca6955a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a408091416e0e1f6019abd59bdb6a9269"><td class="memTemplParams" colspan="2">template&lt;class PeakType &gt; </td></tr>
<tr class="memitem:a408091416e0e1f6019abd59bdb6a9269"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a408091416e0e1f6019abd59bdb6a9269">loadExperiment</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename, <a class="el" href="classOpenMS_1_1MSExperiment.html">MSExperiment</a>&lt; <a class="el" href="namespaceOpenMS.html#a013338b7bdbb5c3b4c78666656070e23">PeakType</a> &gt; &amp;exp, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> force_type=<a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a>, <a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87c">ProgressLogger::LogType</a> log=<a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87cac157bdf0b85a40d2619cbc8bc1ae5fe2">ProgressLogger::NONE</a>, const bool compute_hash=true)</td></tr>
<tr class="memdesc:a408091416e0e1f6019abd59bdb6a9269"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a file into an <a class="el" href="classOpenMS_1_1MSExperiment.html" title="Representation of a mass spectrometry experiment. ">MSExperiment</a>.  <a href="#a408091416e0e1f6019abd59bdb6a9269">More...</a><br/></td></tr>
<tr class="separator:a408091416e0e1f6019abd59bdb6a9269"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a8354ef45f8a0eac5a5038b3a025f37"><td class="memTemplParams" colspan="2">template&lt;class PeakType &gt; </td></tr>
<tr class="memitem:a4a8354ef45f8a0eac5a5038b3a025f37"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a4a8354ef45f8a0eac5a5038b3a025f37">storeExperiment</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename, const <a class="el" href="classOpenMS_1_1MSExperiment.html">MSExperiment</a>&lt; <a class="el" href="namespaceOpenMS.html#a013338b7bdbb5c3b4c78666656070e23">PeakType</a> &gt; &amp;exp, <a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87c">ProgressLogger::LogType</a> log=<a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87cac157bdf0b85a40d2619cbc8bc1ae5fe2">ProgressLogger::NONE</a>)</td></tr>
<tr class="memdesc:a4a8354ef45f8a0eac5a5038b3a025f37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores an <a class="el" href="classOpenMS_1_1MSExperiment.html" title="Representation of a mass spectrometry experiment. ">MSExperiment</a> to a file.  <a href="#a4a8354ef45f8a0eac5a5038b3a025f37">More...</a><br/></td></tr>
<tr class="separator:a4a8354ef45f8a0eac5a5038b3a025f37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bc5a0452855c2d30d125261783b55cf"><td class="memTemplParams" colspan="2">template&lt;class FeatureType &gt; </td></tr>
<tr class="memitem:a5bc5a0452855c2d30d125261783b55cf"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a5bc5a0452855c2d30d125261783b55cf">loadFeatures</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename, <a class="el" href="classOpenMS_1_1FeatureMap.html">FeatureMap</a>&lt; FeatureType &gt; &amp;map, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> force_type=<a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a>)</td></tr>
<tr class="memdesc:a5bc5a0452855c2d30d125261783b55cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a file into a <a class="el" href="classOpenMS_1_1FeatureMap.html" title="A container for features. ">FeatureMap</a>.  <a href="#a5bc5a0452855c2d30d125261783b55cf">More...</a><br/></td></tr>
<tr class="separator:a5bc5a0452855c2d30d125261783b55cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a851b569c3e65a4eeabdd10425f2e6402"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a851b569c3e65a4eeabdd10425f2e6402">getType</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename)</td></tr>
<tr class="memdesc:a851b569c3e65a4eeabdd10425f2e6402"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tries to determine the file type (by name or content)  <a href="#a851b569c3e65a4eeabdd10425f2e6402">More...</a><br/></td></tr>
<tr class="separator:a851b569c3e65a4eeabdd10425f2e6402"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86452aafcfba244e1bdf058e2b3b8475"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a86452aafcfba244e1bdf058e2b3b8475">getTypeByFileName</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename)</td></tr>
<tr class="memdesc:a86452aafcfba244e1bdf058e2b3b8475"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the file type from a file name.  <a href="#a86452aafcfba244e1bdf058e2b3b8475">More...</a><br/></td></tr>
<tr class="separator:a86452aafcfba244e1bdf058e2b3b8475"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6189bfbef8639c71f3ef2dfa55c4fad7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a6189bfbef8639c71f3ef2dfa55c4fad7">getTypeByContent</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename)</td></tr>
<tr class="memdesc:a6189bfbef8639c71f3ef2dfa55c4fad7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the file type of a file by parsing the first few lines.  <a href="#a6189bfbef8639c71f3ef2dfa55c4fad7">More...</a><br/></td></tr>
<tr class="separator:a6189bfbef8639c71f3ef2dfa55c4fad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c93b278d8c65098eab2c5de485b22f0"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a0c93b278d8c65098eab2c5de485b22f0">isSupported</a> (<a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> type)</td></tr>
<tr class="memdesc:a0c93b278d8c65098eab2c5de485b22f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns if the file type is supported in this build of the library.  <a href="#a0c93b278d8c65098eab2c5de485b22f0">More...</a><br/></td></tr>
<tr class="separator:a0c93b278d8c65098eab2c5de485b22f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a8c1cb2878ce0dfad77312c964962ff30"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenMS_1_1String.html">String</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a8c1cb2878ce0dfad77312c964962ff30">computeFileHash_</a> (const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;filename) const </td></tr>
<tr class="memdesc:a8c1cb2878ce0dfad77312c964962ff30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes a SHA-1 hash value for the content of the given file.  <a href="#a8c1cb2878ce0dfad77312c964962ff30">More...</a><br/></td></tr>
<tr class="separator:a8c1cb2878ce0dfad77312c964962ff30"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a654a0b5941d937e303c64bc9e732baec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenMS_1_1FileHandler.html#a654a0b5941d937e303c64bc9e732baec">options_</a></td></tr>
<tr class="separator:a654a0b5941d937e303c64bc9e732baec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Facilitates file handling by file type recognition. </p>
<p>This class provides file type recognition from the file name and from the file content.</p>
<p>It also offer a common interface to load <a class="el" href="classOpenMS_1_1MSExperiment.html" title="Representation of a mass spectrometry experiment. ">MSExperiment</a> data and allows querying for supported file types.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structOpenMS_1_1FileTypes.html" title="Centralizes the file types recognized by FileHandler. ">FileTypes</a> </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8c1cb2878ce0dfad77312c964962ff30"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenMS_1_1String.html">String</a> computeFileHash_ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes a SHA-1 hash value for the content of the given file. </p>
<dl class="section return"><dt>Returns</dt><dd>The SHA-1 hash of the given file. </dd></dl>

</div>
</div>
<a class="anchor" id="a819235ed2844f03df53f4983a7008f28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a>&amp; getOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mutable access to the options for loading/storing. </p>

<p>Referenced by <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a78af6f231fd21f56ca7b167c51bdbb00">TOPPViewBase::metadataFileDialog()</a>.</p>

</div>
</div>
<a class="anchor" id="a5fa0d33e72b9dc6624eeb42c2ca6955a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a>&amp; getOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Non-mutable access to the options for loading/storing. </p>

</div>
</div>
<a class="anchor" id="a851b569c3e65a4eeabdd10425f2e6402"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> getType </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Tries to determine the file type (by name or content) </p>
<p>First the type is determined from the file name. If this fails, the type is determined from the file content.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1FileNotFound.html" title="File not found exception. ">Exception::FileNotFound</a></td><td>is thrown if the file is not present </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a1c92b33d10330879ab9d4bc2bb888d07">TOPPViewBase::addDataFile()</a>, and <a class="el" href="classOpenMS_1_1IDEvaluationBase.html#aa95be3d53de372161a9acfd90a6f7fe1">IDEvaluationBase::loadCurve()</a>.</p>

</div>
</div>
<a class="anchor" id="a6189bfbef8639c71f3ef2dfa55c4fad7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> getTypeByContent </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the file type of a file by parsing the first few lines. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1FileNotFound.html" title="File not found exception. ">Exception::FileNotFound</a></td><td>is thrown if the file is not present </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="classOpenMS_1_1InspectOutfile.html#a94fe62a5040d77b84878d091f0eb8686">InspectOutfile::getExperiment()</a>.</p>

</div>
</div>
<a class="anchor" id="a86452aafcfba244e1bdf058e2b3b8475"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a> getTypeByFileName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the file type from a file name. </p>

</div>
</div>
<a class="anchor" id="a0c93b278d8c65098eab2c5de485b22f0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool isSupported </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns if the file type is supported in this build of the library. </p>

</div>
</div>
<a class="anchor" id="a408091416e0e1f6019abd59bdb6a9269"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool loadExperiment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenMS_1_1MSExperiment.html">MSExperiment</a>&lt; <a class="el" href="namespaceOpenMS.html#a013338b7bdbb5c3b4c78666656070e23">PeakType</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td>
          <td class="paramname"><em>force_type</em> = <code><a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87c">ProgressLogger::LogType</a>&#160;</td>
          <td class="paramname"><em>log</em> = <code><a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87cac157bdf0b85a40d2619cbc8bc1ae5fe2">ProgressLogger::NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>compute_hash</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Loads a file into an <a class="el" href="classOpenMS_1_1MSExperiment.html" title="Representation of a mass spectrometry experiment. ">MSExperiment</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The file name of the file to load. </td></tr>
    <tr><td class="paramname">exp</td><td>The experiment to load the data into. </td></tr>
    <tr><td class="paramname">force_type</td><td>Forces to load the file with that file type. If no type is forced, it is determined from the extention ( or from the content if that fails). </td></tr>
    <tr><td class="paramname">log</td><td>Progress logging mode </td></tr>
    <tr><td class="paramname">compute_hash</td><td>Computes a hash value for the loaded file and stores it in the <a class="el" href="classOpenMS_1_1SourceFile.html" title="Description of a file location, used to store the origin of (meta) data. ">SourceFile</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the file could be loaded, false otherwise</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1FileNotFound.html" title="File not found exception. ">Exception::FileNotFound</a></td><td>is thrown if the file could not be opened </td></tr>
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1ParseError.html" title="Parse Error exception. ">Exception::ParseError</a></td><td>is thrown if an error occurs during parsing </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="classOpenMS_1_1File.html#a6487771c96fec9db032960c91864884e">File::basename()</a>, <a class="el" href="classOpenMS_1_1ChromatogramTools.html#af3ff28dcfb8f80c33a57605672ebb0b1">ChromatogramTools::convertSpectraToChromatograms()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7ad8654d9b2a9c38ece897bfbdd8152214">FileTypes::DTA</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a66c2f5cd90913752f565186657e85d84">FileTypes::DTA2D</a>, <a class="el" href="classOpenMS_1_1MzXMLFile.html#a819235ed2844f03df53f4983a7008f28">MzXMLFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1MzDataFile.html#a819235ed2844f03df53f4983a7008f28">MzDataFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1MzMLFile.html#a819235ed2844f03df53f4983a7008f28">MzMLFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1DTA2DFile.html#a819235ed2844f03df53f4983a7008f28">DTA2DFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1ExperimentalSettings.html#a9b357a65e5ec19027b8fa94379439f8c">ExperimentalSettings::getSourceFiles()</a>, <a class="el" href="classOpenMS_1_1XMassFile.html#a43556a513eaa5395c068a7c9874cc6d1">XMassFile::importExperimentalSettings()</a>, <a class="el" href="classOpenMS_1_1DTAFile.html#a583280bb0e47a5d57b337d6440c96b73">DTAFile::load()</a>, <a class="el" href="classOpenMS_1_1MS2File.html#a98bebe67b8b06a9a67a3654d631355b4">MS2File::load()</a>, <a class="el" href="classOpenMS_1_1MzXMLFile.html#aed378b9a389ec00fa2b559bf7d3b710b">MzXMLFile::load()</a>, <a class="el" href="classOpenMS_1_1MzDataFile.html#aed378b9a389ec00fa2b559bf7d3b710b">MzDataFile::load()</a>, <a class="el" href="classOpenMS_1_1XMassFile.html#a865164e026ef00fa12377c1d63613613">XMassFile::load()</a>, <a class="el" href="classOpenMS_1_1MzMLFile.html#aed378b9a389ec00fa2b559bf7d3b710b">MzMLFile::load()</a>, <a class="el" href="classOpenMS_1_1MascotGenericFile.html#a98bebe67b8b06a9a67a3654d631355b4">MascotGenericFile::load()</a>, <a class="el" href="classOpenMS_1_1DTA2DFile.html#aed378b9a389ec00fa2b559bf7d3b710b">DTA2DFile::load()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a29bb13323f25136faf82e418da451b26">FileTypes::MGF</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7ac59ebe001fb1923baf25b050436a5f15">FileTypes::MS2</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7ae5b2d8f7eb59b2fc050e6bc3c1cba802">FileTypes::MZDATA</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7ab5518cc16bd1f60ebbb47e681a56b75f">FileTypes::MZML</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7af8a53519bd415aacd429c4239bbfd66e">FileTypes::MZXML</a>, <a class="el" href="classOpenMS_1_1File.html#a43bdcb2e5cb18da64e25b2467c8fdcaa">File::path()</a>, <a class="el" href="classOpenMS_1_1MSExperiment.html#ad20897c5c8bd47f5d4005989bead0e55">MSExperiment&lt; PeakT, ChromatogramPeakT &gt;::reset()</a>, <a class="el" href="classOpenMS_1_1MSExperiment.html#ac2bc824d6ff2633ec34793c9e918d479">MSExperiment&lt; PeakT, ChromatogramPeakT &gt;::resize()</a>, <a class="el" href="classOpenMS_1_1SourceFile.html#affa32793fdd4f1526a6c34c17626a60a">SourceFile::setChecksum()</a>, <a class="el" href="classOpenMS_1_1SourceFile.html#a2d47bfad02d5ce05dcfab38bc1b21400">SourceFile::setFileType()</a>, <a class="el" href="classOpenMS_1_1ProgressLogger.html#acc3538c5284777d8702ccaefeb61e74c">ProgressLogger::setLogType()</a>, <a class="el" href="classOpenMS_1_1SourceFile.html#af0a7eddbacf20c4f4045b671df6b0fe7">SourceFile::setNameOfFile()</a>, <a class="el" href="classOpenMS_1_1SourceFile.html#a2edd9a092842480801a9738a3a514fb3">SourceFile::setPathToFile()</a>, <a class="el" href="classOpenMS_1_1SourceFile.html#a6440df7f4dbfc4c3370e2b6781bc74e5a27028cc8b5d6f0a1cb3030c180019abc">SourceFile::SHA1</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a854df315fb804a3fba0232334a7f1d0f">FileTypes::typeToMZML()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a>, and <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a87b48e9729223183349bdfb171076285">FileTypes::XMASS</a>.</p>

<p>Referenced by <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a1c92b33d10330879ab9d4bc2bb888d07">TOPPViewBase::addDataFile()</a>, <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a26fb52355d1e3f483d9e9cf9d1cf6e25">TOPPViewBase::fileChanged_()</a>, <a class="el" href="classOpenMS_1_1InspectOutfile.html#a94fe62a5040d77b84878d091f0eb8686">InspectOutfile::getExperiment()</a>, and <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a78af6f231fd21f56ca7b167c51bdbb00">TOPPViewBase::metadataFileDialog()</a>.</p>

</div>
</div>
<a class="anchor" id="a5bc5a0452855c2d30d125261783b55cf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool loadFeatures </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenMS_1_1FeatureMap.html">FeatureMap</a>&lt; FeatureType &gt; &amp;&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7">FileTypes::Type</a>&#160;</td>
          <td class="paramname"><em>force_type</em> = <code><a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Loads a file into a <a class="el" href="classOpenMS_1_1FeatureMap.html" title="A container for features. ">FeatureMap</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>the file name of the file to load. </td></tr>
    <tr><td class="paramname">map</td><td>The <a class="el" href="classOpenMS_1_1FeatureMap.html" title="A container for features. ">FeatureMap</a> to load the data into. </td></tr>
    <tr><td class="paramname">force_type</td><td>Forces to load the file with that file type. If no type is forced, it is determined from the extention (or from the content if that fails).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the file could be loaded, false otherwise</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1FileNotFound.html" title="File not found exception. ">Exception::FileNotFound</a></td><td>is thrown if the file could not be opened </td></tr>
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1ParseError.html" title="Parse Error exception. ">Exception::ParseError</a></td><td>is thrown if an error occurs during parsing </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a753b825a63c99787d10e05f7d65a87a6">FileTypes::FEATUREXML</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a55c4004ffd908d6e6ec96028e90916d0">FileTypes::KROENIK</a>, <a class="el" href="classOpenMS_1_1MsInspectFile.html#aa4e73ca60efa3ca29e203f46b5187c6c">MsInspectFile::load()</a>, <a class="el" href="classOpenMS_1_1SpecArrayFile.html#aa4e73ca60efa3ca29e203f46b5187c6c">SpecArrayFile::load()</a>, <a class="el" href="classOpenMS_1_1FeatureXMLFile.html#a7315500f55fb5cae883f0b1f2024c5b7">FeatureXMLFile::load()</a>, <a class="el" href="classOpenMS_1_1KroenikFile.html#aa4e73ca60efa3ca29e203f46b5187c6c">KroenikFile::load()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a87ac627b0f0c019e05a735e1a00b861d">FileTypes::PEPLIST</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a9ceeac5c1982a8aeeb7518cb4a488935">FileTypes::TSV</a>, and <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a6ce26a62afab55d7606ad4e92428b30c">FileTypes::UNKNOWN</a>.</p>

<p>Referenced by <a class="el" href="classOpenMS_1_1TOPPViewBase.html#a26fb52355d1e3f483d9e9cf9d1cf6e25">TOPPViewBase::fileChanged_()</a>.</p>

</div>
</div>
<a class="anchor" id="a4a8354ef45f8a0eac5a5038b3a025f37"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void storeExperiment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1String.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classOpenMS_1_1MSExperiment.html">MSExperiment</a>&lt; <a class="el" href="namespaceOpenMS.html#a013338b7bdbb5c3b4c78666656070e23">PeakType</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87c">ProgressLogger::LogType</a>&#160;</td>
          <td class="paramname"><em>log</em> = <code><a class="el" href="classOpenMS_1_1ProgressLogger.html#af67907baa897e9fb84df0cb89795b87cac157bdf0b85a40d2619cbc8bc1ae5fe2">ProgressLogger::NONE</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stores an <a class="el" href="classOpenMS_1_1MSExperiment.html" title="Representation of a mass spectrometry experiment. ">MSExperiment</a> to a file. </p>
<p>The file type to store the data in is determined by the file name. Supported formats for storing are mzML, mzXML, mzData and DTA2D. If the file format cannot be determined from the file name, the mzML format is used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The name of the file to store the data in. </td></tr>
    <tr><td class="paramname">exp</td><td>The experiment to store. </td></tr>
    <tr><td class="paramname">log</td><td>Progress logging mode</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classOpenMS_1_1Exception_1_1UnableToCreateFile.html" title="Unable to create file exception. ">Exception::UnableToCreateFile</a></td><td>is thrown if the file could not be written </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="classOpenMS_1_1ChromatogramTools.html#a180cb4974eaf3d4dea0de5326b132951">ChromatogramTools::convertChromatogramsToSpectra()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7a66c2f5cd90913752f565186657e85d84">FileTypes::DTA2D</a>, <a class="el" href="classOpenMS_1_1MSExperiment.html#a02fccfed86a20f8bd0f6b98c23fadb2e">MSExperiment&lt; PeakT, ChromatogramPeakT &gt;::getChromatograms()</a>, <a class="el" href="classOpenMS_1_1MzXMLFile.html#a819235ed2844f03df53f4983a7008f28">MzXMLFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1MzDataFile.html#a819235ed2844f03df53f4983a7008f28">MzDataFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1MzMLFile.html#a819235ed2844f03df53f4983a7008f28">MzMLFile::getOptions()</a>, <a class="el" href="classOpenMS_1_1DTA2DFile.html#a819235ed2844f03df53f4983a7008f28">DTA2DFile::getOptions()</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7ae5b2d8f7eb59b2fc050e6bc3c1cba802">FileTypes::MZDATA</a>, <a class="el" href="structOpenMS_1_1FileTypes.html#a1d1cfd8ffb84e947f82999c682b666a7af8a53519bd415aacd429c4239bbfd66e">FileTypes::MZXML</a>, <a class="el" href="classOpenMS_1_1ProgressLogger.html#acc3538c5284777d8702ccaefeb61e74c">ProgressLogger::setLogType()</a>, <a class="el" href="classOpenMS_1_1MzXMLFile.html#adb795d215478320be7c6130ff7ddf853">MzXMLFile::store()</a>, <a class="el" href="classOpenMS_1_1MzDataFile.html#adb795d215478320be7c6130ff7ddf853">MzDataFile::store()</a>, <a class="el" href="classOpenMS_1_1MzMLFile.html#adb795d215478320be7c6130ff7ddf853">MzMLFile::store()</a>, and <a class="el" href="classOpenMS_1_1DTA2DFile.html#adb795d215478320be7c6130ff7ddf853">DTA2DFile::store()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a654a0b5941d937e303c64bc9e732baec"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOpenMS_1_1PeakFileOptions.html">PeakFileOptions</a> options_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<HR style="height:1px; border:none; border-top:1px solid #c0c0c0;">
<TABLE width="100%" border="0">
<TR>
<TD><font color="#c0c0c0">OpenMS / TOPP release 1.11.1</font></TD>
<TD align="right"><font color="#c0c0c0">Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5</font></TD>
</TR>
</TABLE>
</BODY>
</HTML>