00001 // -------------------------------------------------------------------------- 00002 // OpenMS -- Open-Source Mass Spectrometry 00003 // -------------------------------------------------------------------------- 00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, 00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012. 00006 // 00007 // This software is released under a three-clause BSD license: 00008 // * Redistributions of source code must retain the above copyright 00009 // notice, this list of conditions and the following disclaimer. 00010 // * Redistributions in binary form must reproduce the above copyright 00011 // notice, this list of conditions and the following disclaimer in the 00012 // documentation and/or other materials provided with the distribution. 00013 // * Neither the name of any author or any participating institution 00014 // may be used to endorse or promote products derived from this software 00015 // without specific prior written permission. 00016 // For a full list of authors, refer to the file AUTHORS. 00017 // -------------------------------------------------------------------------- 00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING 00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 // 00030 // -------------------------------------------------------------------------- 00031 // $Maintainer: Hannes Roest, Witold Wolski $ 00032 // $Authors: Darren Kessner, Hannes Roest, Witold Wolski$ 00033 // -------------------------------------------------------------------------- 00034 00035 #ifndef OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H 00036 #define OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H 00037 00038 #include <string> 00039 #include <vector> 00040 #include <boost/shared_ptr.hpp> 00041 00042 #include <OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/OpenSwathAlgoConfig.h> 00043 00044 namespace OpenSwath 00045 { 00068 00069 struct BinaryDataArray 00070 { 00072 //DataProcessingPtr dataProcessingPtr; 00073 00075 std::vector<double> data; 00076 }; 00077 OPENSWATHALGO_DLLAPI typedef boost::shared_ptr<BinaryDataArray> BinaryDataArrayPtr; 00078 00080 struct ChromatogramMeta 00081 { 00083 std::size_t index; 00085 std::string id; 00086 ChromatogramMeta() : 00087 index() 00088 { 00089 } 00090 00091 }; 00092 OPENSWATHALGO_DLLAPI typedef boost::shared_ptr<ChromatogramMeta> ChromatogramMetaPtr; 00093 00095 struct Chromatogram 00096 { 00098 std::size_t defaultArrayLength; 00099 00101 //DataProcessingPtr dataProcessingPtr; 00103 //Precursor precursor; 00105 //Product product; 00106 00108 std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs; 00109 00110 Chromatogram() : 00111 defaultArrayLength(2), 00112 binaryDataArrayPtrs(defaultArrayLength) 00113 { 00114 initvec(); 00115 } 00116 00117 private: 00118 00119 void initvec() 00120 { 00121 for (std::size_t i = 0; i < defaultArrayLength; ++i) 00122 { 00123 BinaryDataArrayPtr empty(new BinaryDataArray); 00124 binaryDataArrayPtrs[i] = empty; 00125 } 00126 } 00127 00128 public: 00130 BinaryDataArrayPtr getTimeArray() 00131 { 00132 return binaryDataArrayPtrs[0]; 00133 } 00134 00136 BinaryDataArrayPtr getIntensityArray() 00137 { 00138 return binaryDataArrayPtrs[1]; 00139 } 00140 00141 }; 00142 OPENSWATHALGO_DLLAPI typedef boost::shared_ptr<Chromatogram> ChromatogramPtr; 00143 00145 struct SpectrumMeta 00146 { 00148 size_t index; 00149 00151 std::string id; 00152 00153 double RT; 00154 00155 int ms_level; 00156 00157 SpectrumMeta() : 00158 index(0) 00159 { 00160 } 00161 00162 }; 00163 00165 struct Spectrum 00166 { 00168 std::size_t defaultArrayLength; 00169 00171 private: 00172 std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs; 00173 public: 00174 Spectrum() : 00175 defaultArrayLength(2), 00176 binaryDataArrayPtrs(defaultArrayLength) 00177 { 00178 initvec(); 00179 } 00180 00181 private: 00182 00183 void initvec() 00184 { 00185 for (std::size_t i = 0; i < defaultArrayLength; ++i) 00186 { 00187 BinaryDataArrayPtr empty(new BinaryDataArray); 00188 binaryDataArrayPtrs[i] = empty; 00189 } 00190 } 00191 00192 public: 00193 00195 BinaryDataArrayPtr getMZArray() const 00196 { 00197 return binaryDataArrayPtrs[0]; 00198 } 00199 00200 void setMZArray(BinaryDataArrayPtr data) 00201 { 00202 binaryDataArrayPtrs[0] = data; 00203 } 00204 00206 BinaryDataArrayPtr getIntensityArray() const 00207 { 00208 return binaryDataArrayPtrs[1]; 00209 } 00210 00212 void setIntensityArray(BinaryDataArrayPtr data) 00213 { 00214 binaryDataArrayPtrs[1] = data; 00215 } 00216 00217 }; 00218 OPENSWATHALGO_DLLAPI typedef boost::shared_ptr<Spectrum> SpectrumPtr; 00219 } //end Namespace OpenSwath 00220 00221 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:38 using doxygen 1.7.1 |