CFEL - ASG Software Suite
2.5.0
CASS
|
base class for all file readers More...
#include <file_reader.h>
Public Types | |
typedef std::tr1::shared_ptr< FileReader > | shared_pointer |
typedef the shared pointer of this More... | |
Public Member Functions | |
virtual | ~FileReader () |
virtual destructor More... | |
virtual bool | operator() (std::ifstream &file, CASSEvent &event)=0 |
read the file contents More... | |
virtual void | loadSettings ()=0 |
load the settings of the reader More... | |
virtual void | readHeaderInfo (std::ifstream &) |
read the file header More... | |
void | filename (const std::string &filename) |
set the filename of the instance More... | |
const std::string & | filename () const |
retrieve the filename that this instance is working on More... | |
std::string | type () const |
return the type of file that this is for More... | |
Static Public Member Functions | |
static shared_pointer | instance (const std::string &filename) |
create an instance of the requested type More... | |
Protected Member Functions | |
FileReader () | |
only inheritants can create this More... | |
FileReader (const std::string &type) | |
set the readers type More... | |
Protected Attributes | |
std::string | _filename |
the name of the file that we read the values from More... | |
std::string | _type |
the reader type as string More... | |
base class for all file readers
Definition at line 24 of file file_reader.h.
typedef std::tr1::shared_ptr<FileReader> cass::FileReader::shared_pointer |
typedef the shared pointer of this
Definition at line 28 of file file_reader.h.
|
inlinevirtual |
virtual destructor
Definition at line 31 of file file_reader.h.
|
inlineprotected |
only inheritants can create this
Definition at line 83 of file file_reader.h.
|
inlineprotected |
set the readers type
type | The type of the reader |
Definition at line 89 of file file_reader.h.
|
inline |
set the filename of the instance
filename | the filename of the file that this reader is working on |
Definition at line 67 of file file_reader.h.
References _filename, and filename().
Referenced by filename().
|
inline |
retrieve the filename that this instance is working on
Definition at line 73 of file file_reader.h.
References _filename.
|
static |
create an instance of the requested type
The type is determined from the filename
filename | the filename of the file that this reader is working on |
set the filename
Definition at line 29 of file file_reader.cpp.
References QString::fromStdString(), info, and QFileInfo::suffix().
Referenced by cass::MultiFileInput::runthis().
|
pure virtual |
load the settings of the reader
Implemented in cass::TxtReader, cass::pixeldetector::Frms6Reader, cass::ACQIRIS::LmaReader, cass::XtcReader, and cass::pixeldetector::RAWSSSReader.
|
pure virtual |
read the file contents
should read the file contents and convert them so that they can be put into the cassevent
file | the file that contains the data to be put into the cassevent |
event | the CASSEvent where the data will be put into |
Implemented in cass::TxtReader, cass::pixeldetector::Frms6Reader, cass::ACQIRIS::LmaReader, cass::XtcReader, and cass::pixeldetector::RAWSSSReader.
|
inlinevirtual |
read the file header
file | the filestream to the header information of the file |
Reimplemented in cass::TxtReader, cass::XtcReader, cass::pixeldetector::Frms6Reader, cass::ACQIRIS::LmaReader, and cass::pixeldetector::RAWSSSReader.
Definition at line 61 of file file_reader.h.
Referenced by cass::TxtParser::runthis().
|
inline |
return the type of file that this is for
Definition at line 79 of file file_reader.h.
References _type.
|
protected |
the name of the file that we read the values from
Definition at line 92 of file file_reader.h.
Referenced by filename(), cass::TxtReader::loadSettings(), cass::pixeldetector::RAWSSSReader::operator()(), cass::TxtReader::operator()(), cass::pixeldetector::RAWSSSReader::readHeaderInfo(), and cass::TxtReader::readHeaderInfo().
|
protected |