ProteoWizard
SpectrumTable.hpp
Go to the documentation of this file.
1 //
2 // $Id$
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 _SPECTRUMTABLE_HPP_
25 #define _SPECTRUMTABLE_HPP_
26 
27 
29 #include "MSDataAnalyzer.hpp"
30 #include "MSDataCache.hpp"
31 #include "TabularConfig.hpp"
32 
33 namespace pwiz {
34 namespace analysis {
35 
36 
37 /// writes table of spectrum metadata to a file
39 {
40  public:
41 
43  {
44  Config(const std::string& args = "");
45  };
46 
47 
48  SpectrumTable(const MSDataCache& cache, const Config& config);
49 
50  /// \name MSDataAnalyzer interface
51  //@{
52  virtual UpdateRequest updateRequested(const DataInfo& dataInfo,
53  const SpectrumIdentity& spectrumIdentity) const;
54 
55  virtual void close(const DataInfo& dataInfo);
56  //@}
57 
58  private:
60  const Config config_;
61 };
62 
63 
64 template<>
66 {
67  static const char* id() {return "spectrum_table";}
68  static const char* description() {return "write spectrum metadata as read from scan headers, in a table format";}
69  static const char* argsFormat() {return "[" TABULARCONFIG_DELIMITER_OPTIONS_STR "]";}
70  static std::vector<std::string> argsUsage()
71  {
72  return std::vector<std::string>(1, TABULARCONFIG_DELIMITER_USAGE_STR);
73  }
74 };
75 
76 
77 } // namespace analysis
78 } // namespace pwiz
79 
80 
81 #endif // _SPECTRUMTABLE_HPP_
82 
MSDataAnalyzer.hpp
pwiz::analysis::analyzer_strings
This auxilliary class should be specialized for MSDataAnalyzers whose instantiation is controlled by ...
Definition: MSDataAnalyzer.hpp:116
pwiz::msdata::SpectrumIdentity
Identifying information for a spectrum.
Definition: MSData.hpp:471
MSDataCache.hpp
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::analysis::TabularConfig
Definition: TabularConfig.hpp:39
TABULARCONFIG_DELIMITER_USAGE_STR
#define TABULARCONFIG_DELIMITER_USAGE_STR
Definition: TabularConfig.hpp:31
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::analysis::analyzer_strings< SpectrumTable >::argsFormat
static const char * argsFormat()
Definition: SpectrumTable.hpp:69
pwiz::analysis::analyzer_strings< SpectrumTable >::description
static const char * description()
Definition: SpectrumTable.hpp:68
pwiz::analysis::SpectrumTable::SpectrumTable
SpectrumTable(const MSDataCache &cache, const Config &config)
TabularConfig.hpp
pwiz::analysis::SpectrumTable::config_
const Config config_
Definition: SpectrumTable.hpp:60
Export.hpp
pwiz::analysis::SpectrumTable::close
virtual void close(const DataInfo &dataInfo)
end analysis of the data
pwiz::analysis::analyzer_strings< SpectrumTable >::argsUsage
static std::vector< std::string > argsUsage()
Definition: SpectrumTable.hpp:70
pwiz::analysis::SpectrumTable
writes table of spectrum metadata to a file
Definition: SpectrumTable.hpp:39
pwiz::analysis::SpectrumTable::cache_
const MSDataCache & cache_
Definition: SpectrumTable.hpp:59
pwiz::analysis::MSDataCache
simple memory cache for common MSData info
Definition: MSDataCache.hpp:77
pwiz::analysis::SpectrumTable::Config
Definition: SpectrumTable.hpp:43
pwiz::analysis::SpectrumTable::Config::Config
Config(const std::string &args="")
TABULARCONFIG_DELIMITER_OPTIONS_STR
#define TABULARCONFIG_DELIMITER_OPTIONS_STR
Definition: TabularConfig.hpp:30
pwiz::analysis::SpectrumTable::updateRequested
virtual UpdateRequest updateRequested(const DataInfo &dataInfo, const SpectrumIdentity &spectrumIdentity) const
ask analyzer if it wants an update
pwiz::analysis::MSDataAnalyzer
Interface for MSData analyzers.
Definition: MSDataAnalyzer.hpp:61
pwiz::analysis::MSDataAnalyzer::DataInfo
information about the data to be analyzed
Definition: MSDataAnalyzer.hpp:66
pwiz::analysis::analyzer_strings< SpectrumTable >::id
static const char * id()
Definition: SpectrumTable.hpp:67