CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Private Attributes | List of all members
cass::pixeldetector::Frms6Reader Class Reference

class for reading frms6 files More...

#include <frms6_reader.h>

+ Inheritance diagram for cass::pixeldetector::Frms6Reader:
+ Collaboration diagram for cass::pixeldetector::Frms6Reader:

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...
 
- Public Member Functions inherited from cass::FileReader
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

- Public Types inherited from cass::FileReader
typedef std::tr1::shared_ptr< FileReadershared_pointer
 typedef the shared pointer of this More...
 
- Static Public Member Functions inherited from cass::FileReader
static shared_pointer instance (const std::string &filename)
 create an instance of the requested type More...
 
- Protected Member Functions inherited from cass::FileReader
 FileReader ()
 only inheritants can create this More...
 
 FileReader (const std::string &type)
 set the readers type More...
 
- Protected Attributes inherited from cass::FileReader
std::string _filename
 the name of the file that we read the values from More...
 
std::string _type
 the reader type as string More...
 

Detailed Description

class for reading frms6 files

Author
to be determined

Definition at line 32 of file frms6_reader.h.

Constructor & Destructor Documentation

Frms6Reader::Frms6Reader ( )

constructor

Definition at line 23 of file frms6_reader.cpp.

Member Function Documentation

void Frms6Reader::loadSettings ( )
virtual

load the settings of the reader

Implements cass::FileReader.

Definition at line 27 of file frms6_reader.cpp.

bool Frms6Reader::operator() ( std::ifstream &  file,
CASSEvent event 
)
virtual

read the frms6 file contents put them into cassevent

Returns
true when the workers should work on the filled cassevent, false if not.
Parameters
filethe file that contains the data to be put into the cassevent
eventthe 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

Todo:
: read out somehow?

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.

void Frms6Reader::readHeaderInfo ( std::ifstream &  file)
virtual

read the file header

Parameters
filethe filestream to the header information of the file

Reimplemented from cass::FileReader.

Definition at line 31 of file frms6_reader.cpp.

References _fileHead.

Member Data Documentation

hllDataTypes::Frms6FileHeader cass::pixeldetector::Frms6Reader::_fileHead
private

the frms6 file header

Definition at line 58 of file frms6_reader.h.

Referenced by operator()(), and readHeaderInfo().

hllDataTypes::FrameHeader cass::pixeldetector::Frms6Reader::_frameHead
private

header that comes before every frame

Definition at line 61 of file frms6_reader.h.

Referenced by operator()().

std::vector<hllDataTypes::pixel> cass::pixeldetector::Frms6Reader::_hllFrameBuffer
private

a buffer to not allocate the read buffer for each event

Definition at line 64 of file frms6_reader.h.

Referenced by operator()().


The documentation for this class was generated from the following files: