ProteoWizard
Classes | Public Member Functions | List of all members
pwiz::msdata::Reader Class Referenceabstract

interface for file readers More...

#include <Reader.hpp>

Inheritance diagram for pwiz::msdata::Reader:
pwiz::msdata::Reader_ABI pwiz::msdata::Reader_ABI_T2D pwiz::msdata::Reader_Agilent pwiz::msdata::Reader_Bruker pwiz::msdata::Reader_BTDX pwiz::msdata::Reader_MGF pwiz::msdata::Reader_MSn pwiz::msdata::Reader_mz5 pwiz::msdata::Reader_mzML pwiz::msdata::Reader_mzXML pwiz::msdata::Reader_Shimadzu pwiz::msdata::Reader_Thermo pwiz::msdata::Reader_UIMF pwiz::msdata::Reader_Waters pwiz::msdata::ReaderList

Classes

struct  Config
 Reader configuration. More...
 

Public Member Functions

bool accept (const std::string &filename, const std::string &head) const
 return true iff Reader recognizes the file as one it should handle More...
 
virtual std::string identify (const std::string &filename, const std::string &head) const =0
 return file type iff Reader recognizes the file, else empty; More...
 
virtual void read (const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const =0
 fill in the MSData structure from the first (or only) sample More...
 
virtual void read (const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const =0
 fill in a vector of MSData structures; provides support for multi-run input files More...
 
virtual void readIds (const std::string &filename, const std::string &head, std::vector< std::string > &dataIds, const Config &config=Config()) const
 fill in a vector of MSData.Id values; provides support for multi-run input files More...
 
virtual const char * getType () const =0
 returns a unique string identifying the reader type More...
 
virtual ~Reader ()
 

Detailed Description

interface for file readers

Definition at line 37 of file Reader.hpp.

Constructor & Destructor Documentation

§ ~Reader()

virtual pwiz::msdata::Reader::~Reader ( )
inlinevirtual

Definition at line 106 of file Reader.hpp.

106 {}

Member Function Documentation

§ accept()

bool pwiz::msdata::Reader::accept ( const std::string &  filename,
const std::string &  head 
) const
inline

return true iff Reader recognizes the file as one it should handle

that's not to say one it CAN handle, necessarily, as in Thermo on linux, see comment for identify() below

Definition at line 70 of file Reader.hpp.

References pwiz::identdata::IO::read().

Referenced by testAccept(), and testRead().

72  {
73  return (identify(filename,head).length() != 0);
74  }
virtual std::string identify(const std::string &filename, const std::string &head) const =0
return file type iff Reader recognizes the file, else empty;

§ identify()

virtual std::string pwiz::msdata::Reader::identify ( const std::string &  filename,
const std::string &  head 
) const
pure virtual

return file type iff Reader recognizes the file, else empty;

note: for formats requiring a 3rd party DLL identify() should return non-empty if it recognized the format, even though reading may fail if the 3rd party DLL isn't actually present Reader may filter based on filename and/or head of the file

Implemented in pwiz::msdata::ReaderList, pwiz::msdata::Reader_mz5, pwiz::msdata::Reader_BTDX, pwiz::msdata::Reader_MSn, pwiz::msdata::Reader_MGF, pwiz::msdata::Reader_mzXML, pwiz::msdata::Reader_ABI, pwiz::msdata::Reader_ABI_T2D, pwiz::msdata::Reader_Waters, pwiz::msdata::Reader_mzML, pwiz::msdata::Reader_Agilent, pwiz::msdata::Reader_Bruker, pwiz::msdata::Reader_Shimadzu, pwiz::msdata::Reader_Thermo, and pwiz::msdata::Reader_UIMF.

§ read() [1/2]

virtual void pwiz::msdata::Reader::read ( const std::string &  filename,
const std::string &  head,
MSData result,
int  runIndex = 0,
const Config config = Config() 
) const
pure virtual

§ read() [2/2]

virtual void pwiz::msdata::Reader::read ( const std::string &  filename,
const std::string &  head,
std::vector< MSDataPtr > &  results,
const Config config = Config() 
) const
pure virtual

§ readIds()

virtual void pwiz::msdata::Reader::readIds ( const std::string &  filename,
const std::string &  head,
std::vector< std::string > &  dataIds,
const Config config = Config() 
) const
virtual

fill in a vector of MSData.Id values; provides support for multi-run input files

Reimplemented in pwiz::msdata::ReaderList, and pwiz::msdata::Reader_ABI.

§ getType()

virtual const char* pwiz::msdata::Reader::getType ( ) const
pure virtual

The documentation for this class was generated from the following file: