75 bool accept(
const std::string& filename,
76 const std::string& head)
const 78 return (identify(filename,head).length() != 0);
86 virtual std::string identify(
const std::string& filename,
87 const std::string& head)
const = 0;
90 virtual void read(
const std::string& filename,
91 const std::string& head,
97 virtual void read(
const std::string& filename,
98 const std::string& head,
99 std::vector<MSDataPtr>& results,
103 virtual void readIds(
const std::string& filename,
104 const std::string& head,
105 std::vector<std::string>& dataIds,
109 virtual const char* getType()
const = 0;
119 :
std::runtime_error((
"[ReaderFail] " + error).c_str()),
123 virtual const std::string&
error()
const {
return error_;}
140 public std::vector<ReaderPtr>
145 virtual std::string identify(
const std::string& filename)
const;
148 virtual std::string identify(
const std::string& filename,
149 const std::string& head)
const;
152 virtual void read(
const std::string& filename,
158 virtual void read(
const std::string& filename,
159 const std::string& head,
166 virtual void read(
const std::string& filename,
167 std::vector<MSDataPtr>& results,
172 virtual void read(
const std::string& filename,
173 const std::string& head,
174 std::vector<MSDataPtr>& results,
179 virtual void readIds(
const std::string& filename,
180 std::vector<std::string>& results,
185 virtual void readIds(
const std::string& filename,
186 const std::string& head,
187 std::vector<std::string>& results,
203 template <
typename reader_type>
206 for (iterator it=begin(); it!=end(); ++it)
208 reader_type* p =
dynamic_cast<reader_type*
>(it->get());
216 template <
typename reader_type>
217 const reader_type*
get()
const 219 return const_cast<ReaderList*
>(
this)->get<reader_type>();
222 virtual const char*
getType()
const {
return "ReaderList";}
240 #endif // _READER_HPP_ ReaderFail(const std::string &error)
bool ignoreZeroIntensityPoints
when true, allows certain vendor readers to produce profile data without zero intensity samples flank...
PWIZ_API_DECL double & operator+=(double &d, const MZTolerance &tolerance)
virtual const char * getType() const
returns a unique string identifying the reader type
Reader container (composite pattern).
bool adjustUnknownTimeZonesToHostTimeZone
when true, if a reader does not know what time zone was used to record a time, it will assume the tim...
boost::shared_ptr< Reader > ReaderPtr
bool acceptZeroLengthSpectra
when true, allows for skipping 0 length checks (and thus skip re-reading data for Sciex) ...
PWIZ_API_DECL CVID identifyFileFormat(const ReaderPtr &reader, const std::string &filepath)
tries to identify a filepath using the provided Reader or ReaderList; returns the CVID file format of...
interface for file readers
virtual const std::string & error() const
bool srmAsSpectra
when true, sets certain vendor readers to produce SRM transitions as spectra instead of chromatograms...
bool simAsSpectra
when true, sets certain vendor readers to produce SIM transitions as spectra instead of chromatograms...
bool accept(const std::string &filename, const std::string &head) const
return true iff Reader recognizes the file as one it should handle
PWIZ_API_DECL void read(std::istream &is, CV &cv)
PWIZ_API_DECL ReaderList operator+(const ReaderPtr &lhs, const ReaderPtr &rhs)
returns a list containing the lhs and rhs as readers
bool combineIonMobilitySpectra
when true, all drift bins/scans in a frame/block are written in combined form instead of as individua...
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
bool unknownInstrumentIsError
when true, if a reader cannot identify an instrument, an exception will be thrown asking users to rep...