public FinniganRawData() { m_xraw2_class = null; //marr_data_block = null; //marr_temp_data_block = null; mint_last_scan_size = 0; marr_rawfileName = ""; }
public int Open(string raw_file_name) { marr_rawfileName = raw_file_name; MSFileReader_XRawfile temp = new MSFileReader_XRawfileClass(); m_xraw2_class = (IXRawfile3)temp; var err = 0; try { m_xraw2_class.Open(marr_rawfileName); m_xraw2_class.GetErrorCode(ref err); if (err != 0) { throw new Exception("Unable to open XCalibur file: " + marr_rawfileName); } } catch (Exception) { #if DEBUG throw; #endif throw new Exception("Unable to open XCalibur file: " + marr_rawfileName); } // Get the number of spectra m_xraw2_class.SetCurrentController(0, 1); m_xraw2_class.GetNumSpectra(ref mlong_num_spectra); m_xraw2_class.GetFirstSpectrumNumber(ref mlong_spectra_num_first); m_xraw2_class.GetLastSpectrumNumber(ref mlong_spectra_num_last); m_xraw2_class.GetErrorCode(ref err); if (err != 0) { throw new Exception("Unable to get number of spectra from " + marr_rawfileName); //return 1; } return(0); }