ProteoWizard
Main Page
Namespaces
Classes
Files
File List
File Members
pwiz
analysis
passive
SpectrumBinaryData.hpp
Go to the documentation of this file.
1
//
2
// $Id: SpectrumBinaryData.hpp 1191 2009-08-14 19:33:05Z chambm $
3
//
4
//
5
// Original author: Darren Kessner <darren@proteowizard.org>
6
//
7
// Copyright 2008 Spielberg Family Center for Applied Proteomics
8
// Cedars-Sinai Medical Center, Los Angeles, California 90048
9
//
10
// Licensed under the Apache License, Version 2.0 (the "License");
11
// you may not use this file except in compliance with the License.
12
// You may obtain a copy of the License at
13
//
14
// http://www.apache.org/licenses/LICENSE-2.0
15
//
16
// Unless required by applicable law or agreed to in writing, software
17
// distributed under the License is distributed on an "AS IS" BASIS,
18
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
// See the License for the specific language governing permissions and
20
// limitations under the License.
21
//
22
23
24
#ifndef _SPECTRUMBINARYDATA_HPP_
25
#define _SPECTRUMBINARYDATA_HPP_
26
27
28
#include "
pwiz/utility/misc/Export.hpp
"
29
#include "
MSDataAnalyzer.hpp
"
30
#include "
MSDataCache.hpp
"
31
32
33
namespace
pwiz {
34
namespace
analysis {
35
36
37
/// writes table of spectrum metadata to a file
38
class
PWIZ_API_DECL
SpectrumBinaryData
:
public
MSDataAnalyzer
39
{
40
public
:
41
42
struct
PWIZ_API_DECL
Config
43
{
44
size_t
begin
;
45
size_t
end
;
46
bool
interpretAsScanNumbers
;
47
size_t
precision
;
48
49
Config
(
const
std::string& args =
""
);
50
};
51
52
SpectrumBinaryData
(
const
MSDataCache
& cache,
const
Config
& config);
53
54
/// \name MSDataAnalyzer interface
55
//@{
56
virtual
UpdateRequest updateRequested(
const
DataInfo
& dataInfo,
57
const
SpectrumIdentity
& spectrumIdentity)
const
;
58
59
virtual
void
update(
const
DataInfo
& dataInfo,
60
const
Spectrum
& spectrum);
61
//@}
62
63
private
:
64
const
MSDataCache
&
cache_
;
65
const
Config
config_
;
66
};
67
68
69
template
<>
70
struct
analyzer_strings
<
SpectrumBinaryData
>
71
{
72
static
const
char
*
id
() {
return
"binary"
;}
73
static
const
char
*
description
() {
return
"write binary data for spectra i through j"
;}
74
static
const
char
*
argsFormat
() {
return
"i[-][j] [sn] [precision=d]"
;}
75
76
static
std::vector<std::string>
argsUsage
()
77
{
78
std::vector<std::string> result;
79
result.push_back(
"sn: interpret as scan number, not index"
);
80
result.push_back(
"precision=d: write d decimal places"
);
81
return
result;
82
}
83
};
84
85
86
}
// namespace analysis
87
}
// namespace pwiz
88
89
90
#endif // _SPECTRUMBINARYDATA_HPP_
91
Generated on Mon Nov 26 2012 18:05:47 for ProteoWizard by
1.8.1.1