ProteoWizard
Main Page
Namespaces
Classes
Files
File List
File Members
pwiz
analysis
passive
RegionTIC.hpp
Go to the documentation of this file.
1
//
2
// $Id: RegionTIC.hpp 4168 2012-12-04 23:19:57Z pcbrefugee $
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 _REGIONTIC_HPP_
25
#define _REGIONTIC_HPP_
26
27
28
#include "
pwiz/utility/misc/Export.hpp
"
29
#include "
MSDataAnalyzer.hpp
"
30
#include "
MSDataCache.hpp
"
31
#include "
RegionAnalyzer.hpp
"
32
#include "
TabularConfig.hpp
"
33
34
35
namespace
pwiz {
36
namespace
analysis {
37
38
39
/// writes data samples from a single rectangular region
40
class
PWIZ_API_DECL
RegionTIC
:
public
MSDataAnalyzer
41
{
42
public
:
43
44
struct
PWIZ_API_DECL
Config
:
TabularConfig
45
{
46
std::pair<double,double>
mzRange
;
47
Config
(
const
std::string& args);
48
49
bool
operator==
(
const
Config
&rhs)
50
{
51
return
mzRange == rhs.
mzRange
&&
52
delim_equal(rhs);
53
}
54
};
55
56
RegionTIC
(
const
MSDataCache
& cache,
const
Config& config);
57
58
/// \name MSDataAnalyzer interface
59
//@{
60
virtual
void
open(
const
DataInfo& dataInfo);
61
62
virtual
UpdateRequest updateRequested(
const
DataInfo& dataInfo,
63
const
SpectrumIdentity
& spectrumIdentity)
const
;
64
65
virtual
void
update(
const
DataInfo& dataInfo,
66
const
Spectrum
& spectrum);
67
68
virtual
void
close(
const
DataInfo& dataInfo);
69
//@}
70
71
private
:
72
const
MSDataCache
&
cache_
;
73
boost::shared_ptr<RegionAnalyzer>
regionAnalyzer_
;
74
Config
config_
;
75
};
76
77
78
template
<>
79
struct
analyzer_strings
<
RegionTIC
>
80
{
81
static
const
char
*
id
() {
return
"tic"
;}
82
static
const
char
*
description
() {
return
"write total ion counts for an m/z range"
;}
83
#define TIC_MZRANGE_ARG "mz"
84
static
const
char
*
argsFormat
() {
return
"["
TIC_MZRANGE_ARG
"=<mzLow>[,<mzHigh>]] ["
TABULARCONFIG_DELIMITER_OPTIONS_STR
"]"
;}
85
static
std::vector<std::string>
argsUsage
()
86
{
87
std::vector<std::string> usage;
88
usage.push_back(
TIC_MZRANGE_ARG
": set mz range"
);
89
usage.push_back(
TABULARCONFIG_DELIMITER_USAGE_STR
);
90
return
usage;
91
}
92
};
93
94
95
}
// namespace analysis
96
}
// namespace pwiz
97
98
99
#endif // _REGIONTIC_HPP_
100
Generated on Thu Aug 29 2013 14:45:31 for ProteoWizard by
1.8.4