CFEL - ASG Software Suite
2.5.0
CASS
|
class for reading xtc files More...
#include <xtc_reader.h>
Public Member Functions | |
XtcReader () | |
constructor More... | |
bool | operator() (std::ifstream &file, CASSEvent &event) |
read the xtc file contents put them into cassevent More... | |
void | loadSettings () |
load the settings of the reader More... | |
void | readHeaderInfo (std::ifstream &file) |
read the file header More... | |
![]() | |
virtual | ~FileReader () |
virtual destructor 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... | |
Private Attributes | |
FormatConverter & | _convert |
a reference to the format converter functor More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< FileReader > | shared_pointer |
typedef the shared pointer of this More... | |
![]() | |
static shared_pointer | instance (const std::string &filename) |
create an instance of the requested type More... | |
![]() | |
FileReader () | |
only inheritants can create this More... | |
FileReader (const std::string &type) | |
set the readers type More... | |
![]() | |
std::string | _filename |
the name of the file that we read the values from More... | |
std::string | _type |
the reader type as string More... | |
class for reading xtc files
it uses the format converter to the xtc datagrams to cassevent
Definition at line 29 of file xtc_reader.h.
XtcReader::XtcReader | ( | ) |
constructor
Definition at line 38 of file xtc_reader.cpp.
|
virtual |
load the settings of the reader
Implements cass::FileReader.
Definition at line 43 of file xtc_reader.cpp.
References _convert, and cass::FormatConverter::loadSettings().
|
virtual |
read the xtc file contents put them into cassevent
read datagrams until the return value of the conversion is true, which indicates
file | the file that contains the data to be put into the cassevent |
event | the CASSEvent where the data will be put into |
Implements cass::FileReader.
Definition at line 70 of file xtc_reader.cpp.
References _convert, cass::CASSEvent::datagrambuffer(), readDgramHeaderToBuf(), and readDgramPayloadToBuf().
|
virtual |
read the file header
read datagram by datagram until the first L1 transition appears
file | the filestream to the header information of the file |
Reimplemented from cass::FileReader.
Definition at line 48 of file xtc_reader.cpp.
References _convert, readDgramHeaderToBuf(), and readDgramPayloadToBuf().
|
private |
a reference to the format converter functor
Definition at line 60 of file xtc_reader.h.
Referenced by loadSettings(), operator()(), and readHeaderInfo().