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

class for reading lma files More...

#include <lma_reader.h>

+ Inheritance diagram for cass::ACQIRIS::LmaReader:
+ Collaboration diagram for cass::ACQIRIS::LmaReader:

Public Member Functions

 LmaReader ()
 constructor More...
 
bool operator() (std::ifstream &file, CASSEvent &event)
 read the lma 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

ACQIRIS::Instrument _instrument
 acqiris device where we store the file header information More...
 
uint32_t _usedChannelBitmask
 bitmask describing which channels are active in the instrument 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 lma files

read an event in lma file format from a given position in a file stream and put the contents in the cassvent after conversion.

Author
Lutz Foucar

Definition at line 32 of file lma_reader.h.

Constructor & Destructor Documentation

LmaReader::LmaReader ( )

constructor

Definition at line 25 of file lma_reader.cpp.

Member Function Documentation

void LmaReader::loadSettings ( )
virtual

load the settings of the reader

Implements cass::FileReader.

Definition at line 29 of file lma_reader.cpp.

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

read the lma 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

extract the right instrument from the cassevent

copy the header information to the instrument

read the event information data from the file

since we zero substracted the wavefrom in the lma file, we need to create the right wavefrom again. This is done by going through the wavefrom sinpplets called pulses and put them at the right position in the wavefrom of the channel.

read the puls properties from file

Implements cass::FileReader.

Definition at line 69 of file lma_reader.cpp.

References _instrument, _usedChannelBitmask, cass::CASSEvent::Acqiris, cass::CASSEvent::devices(), cass::ACQIRIS::Channel::horpos(), and cass::CASSEvent::id().

void LmaReader::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 33 of file lma_reader.cpp.

References _instrument, _usedChannelBitmask, cass::Log::add(), cass::ACQIRIS::Instrument::channels(), cass::lmaHeader::Channel::offset_mV, cass::ACQIRIS::Channel::sampleInterval(), cass::toString(), and cass::Log::VERBOSEINFO.

Member Data Documentation

ACQIRIS::Instrument cass::ACQIRIS::LmaReader::_instrument
private

acqiris device where we store the file header information

Definition at line 58 of file lma_reader.h.

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

uint32_t cass::ACQIRIS::LmaReader::_usedChannelBitmask
private

bitmask describing which channels are active in the instrument

Definition at line 61 of file lma_reader.h.

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


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