Go to the documentation of this file.
84 bool accept(
const std::string& filename,
85 const std::string& head)
const
87 return (identify(filename,head).length() != 0);
95 virtual std::string
identify(
const std::string& filename,
96 const std::string& head)
const = 0;
99 virtual void read(
const std::string& filename,
100 const std::string& head,
106 virtual void read(
const std::string& filename,
107 const std::string& head,
108 std::vector<MSDataPtr>& results,
112 virtual void readIds(
const std::string& filename,
113 const std::string& head,
114 std::vector<std::string>& dataIds,
128 : std::runtime_error((
"[ReaderFail] " + error).c_str()),
132 virtual const std::string&
error()
const {
return error_;}
149 public std::vector<ReaderPtr>
154 virtual std::string
identify(
const std::string& filename)
const;
157 virtual std::string
identify(
const std::string& filename,
158 const std::string& head)
const;
161 virtual void read(
const std::string& filename,
167 virtual void read(
const std::string& filename,
168 const std::string& head,
175 virtual void read(
const std::string& filename,
176 std::vector<MSDataPtr>& results,
181 virtual void read(
const std::string& filename,
182 const std::string& head,
183 std::vector<MSDataPtr>& results,
188 virtual void readIds(
const std::string& filename,
189 std::vector<std::string>& results,
194 virtual void readIds(
const std::string& filename,
195 const std::string& head,
196 std::vector<std::string>& results,
212 template <
typename reader_type>
215 for (iterator it=begin(); it!=end(); ++it)
217 reader_type* p =
dynamic_cast<reader_type*
>(it->get());
225 template <
typename reader_type>
226 const reader_type*
get()
const
228 return const_cast<ReaderList*
>(
this)->get<reader_type>();
231 virtual const char*
getType()
const {
return "ReaderList";}
249 #endif // _READER_HPP_
reader_type * get()
returns pointer to Reader of the specified type
bool srmAsSpectra
when true, sets certain vendor readers to produce SRM transitions as spectra instead of chromatograms
bool combineIonMobilitySpectra
when true, all drift bins/scans in a frame/block are written in combined form instead of as individua...
virtual std::string identify(const std::string &filename, const std::string &head) const =0
return file type iff Reader recognizes the file, else empty;
bool adjustUnknownTimeZonesToHostTimeZone
when true, if a reader does not know what time zone was used to record a time, it will assume the tim...
pwiz::util::IterationListenerRegistry * iterationListenerRegistry
progress listener for when initializing a file takes a long time, or the reader has to run a long pro...
virtual void readIds(const std::string &filename, const std::string &head, std::vector< std::string > &results, const Config &config=Config()) const
delegates to first child that identifies; provides support for multi-run input files
interface for file readers
virtual std::string identify(const std::string &filename, const std::string &head) const
returns child name iff some child identifies, else empty string
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 ReaderList operator+(const ReaderPtr &lhs, const ReaderPtr &rhs)
returns a list containing the lhs and rhs as readers
bool ignoreZeroIntensityPoints
when true, allows certain vendor readers to produce profile data without zero intensity samples flank...
virtual void readIds(const std::string &filename, std::vector< std::string > &results, const Config &config=Config()) const
delegates to first child that identifies; provides support for multi-run input files
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
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
PWIZ_API_DECL double & operator+=(double &d, const MZTolerance &tolerance)
virtual const std::string & error() const
virtual void read(const std::string &filename, MSData &result, int runIndex=0, const Config &config=Config()) const
delegates to first child that identifies
boost::shared_ptr< Reader > ReaderPtr
virtual const char * getType() const
returns a unique string identifying the reader type
virtual std::string identify(const std::string &filename) const
returns child name iff some child identifies, else empty string
ReaderFail(const std::string &error)
bool simAsSpectra
when true, sets certain vendor readers to produce SIM transitions as spectra instead of chromatograms
bool acceptZeroLengthSpectra
when true, allows for skipping 0 length checks (and thus skip re-reading data for Sciex)
Reader container (composite pattern).
bool unknownInstrumentIsError
when true, if a reader cannot identify an instrument, an exception will be thrown asking users to rep...
handles registration of IterationListeners and broadcast of update messages
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
virtual void read(const std::string &filename, std::vector< MSDataPtr > &results, const Config &config=Config()) const
delegates to first child that identifies; provides support for multi-run input files
Config(const Config &rhs)
virtual const char * getType() const =0
returns a unique string identifying the reader type
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
delegates to first child that identifies; provides support for multi-run input files
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
delegates to first child that identifies
const reader_type * get() const
returns const pointer to Reader of the specified type
int preferOnlyMsLevel
when nonzero, if reader can enumerate only spectra of ms level, it will (currently only supported by ...
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...