CFEL - ASG Software Suite
2.5.0
CASS
|
class for reading frms6 files More...
#include <frms6_reader.h>
Public Member Functions | |
Frms6Reader () | |
constructor More... | |
bool | operator() (std::ifstream &file, CASSEvent &event) |
read the frms6 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 | |
hllDataTypes::Frms6FileHeader | _fileHead |
the frms6 file header More... | |
hllDataTypes::FrameHeader | _frameHead |
header that comes before every frame More... | |
std::vector< hllDataTypes::pixel > | _hllFrameBuffer |
a buffer to not allocate the read buffer for each event 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 frms6 files
Definition at line 32 of file frms6_reader.h.
Frms6Reader::Frms6Reader | ( | ) |
constructor
Definition at line 23 of file frms6_reader.cpp.
|
virtual |
load the settings of the reader
Implements cass::FileReader.
Definition at line 27 of file frms6_reader.cpp.
|
virtual |
read the frms6 file contents put them into cassevent
file | the file that contains the data to be put into the cassevent |
event | the CASSEvent where the data will be put into |
read frame header and calculate the frame data size from the contained info. Set the eventid according to the id in the info Then read the frame from the stream into the frame buffer.
get the detector associated with the frame info id from the event
set the information of the frame to the detector
convert hll frame format to cass frame format
Implements cass::FileReader.
Definition at line 36 of file frms6_reader.cpp.
References _fileHead, _frameHead, _hllFrameBuffer, cass::pixeldetector::Device::dets(), cass::CASSEvent::devices(), cass::hllDataTypes::HLL2CASS(), cass::CASSEvent::id(), cass::pixeldetector::Detector::id(), cass::CASSEvent::PixelDetectors, and cass::hllDataTypes::Frms6FileHeader::the_width.
|
virtual |
read the file header
file | the filestream to the header information of the file |
Reimplemented from cass::FileReader.
Definition at line 31 of file frms6_reader.cpp.
References _fileHead.
|
private |
the frms6 file header
Definition at line 58 of file frms6_reader.h.
Referenced by operator()(), and readHeaderInfo().
|
private |
header that comes before every frame
Definition at line 61 of file frms6_reader.h.
Referenced by operator()().
|
private |
a buffer to not allocate the read buffer for each event
Definition at line 64 of file frms6_reader.h.
Referenced by operator()().