70 bool accept(
const std::string& filename,
71 const std::string& head)
const 73 return (identify(filename,head).length() != 0);
81 virtual std::string identify(
const std::string& filename,
82 const std::string& head)
const = 0;
85 virtual void read(
const std::string& filename,
86 const std::string& head,
92 virtual void read(
const std::string& filename,
93 const std::string& head,
94 std::vector<MSDataPtr>& results,
98 virtual void readIds(
const std::string& filename,
99 const std::string& head,
100 std::vector<std::string>& dataIds,
104 virtual const char* getType()
const = 0;
114 :
std::runtime_error((
"[ReaderFail] " + error).c_str()),
118 virtual const std::string&
error()
const {
return error_;}
135 public std::vector<ReaderPtr>
140 virtual std::string identify(
const std::string& filename)
const;
143 virtual std::string identify(
const std::string& filename,
144 const std::string& head)
const;
147 virtual void read(
const std::string& filename,
153 virtual void read(
const std::string& filename,
154 const std::string& head,
161 virtual void read(
const std::string& filename,
162 std::vector<MSDataPtr>& results,
167 virtual void read(
const std::string& filename,
168 const std::string& head,
169 std::vector<MSDataPtr>& results,
174 virtual void readIds(
const std::string& filename,
175 std::vector<std::string>& results,
180 virtual void readIds(
const std::string& filename,
181 const std::string& head,
182 std::vector<std::string>& results,
198 template <
typename reader_type>
201 for (iterator it=begin(); it!=end(); ++it)
203 reader_type* p =
dynamic_cast<reader_type*
>(it->get());
211 template <
typename reader_type>
212 const reader_type*
get()
const 214 return const_cast<ReaderList*
>(
this)->get<reader_type>();
217 virtual const char*
getType()
const {
return "ReaderList";}
235 #endif // _READER_HPP_ ReaderFail(const std::string &error)
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 ABI) ...
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 simAsSpectra
when true, sets certain vendor readers to produce SIM/SRM transitions as spectra instead of chromatog...
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...