CFEL - ASG Software Suite
2.5.0
CASS
|
Will parse a file containing commercial ccd images. More...
#include <raw_sss_parser.h>
Public Member Functions | |
RAWSSSParser (const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock) | |
constructor More... | |
void | run () |
parse the raw.sss file More... | |
virtual const std::string | type () |
![]() | |
FileParser (const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock) | |
constructor More... | |
virtual | ~FileParser () |
virtual destructor More... | |
![]() | |
PausableThread (control_t control=_run, QObject *parent=0) | |
constructor More... | |
virtual | ~PausableThread () |
destructor More... | |
void | run () |
run the thread More... | |
virtual void | runthis ()=0 |
contains the code to run in the thread More... | |
void | pause (bool block=false) |
pause the thread More... | |
void | waitUntilPaused () |
waits until thread is paused More... | |
void | resume () |
resume the thread More... | |
status_t | status () const |
return the current status of the thread More... | |
bool | shouldQuit () const |
query whether this thread is told to quit More... | |
void | rethrowException () const |
rethrow the thrown exception More... | |
exception_t | exceptionThrown () const |
![]() | |
QThread (QObject *parent=0) | |
currentThread () | |
HANDLE QThread::currentThreadId() | |
exec () | |
exit (int returnCode=0) | |
finished () | |
idealThreadCount () | |
isFinished () | |
isRunning () | |
msleep (unsigned long msecs) | |
priority () | |
quit () | |
run () | |
setPriority (Priority priority) | |
setStackSize (uint stackSize) | |
setTerminationEnabled (bool enabled=true) | |
sleep (unsigned long secs) | |
stackSize () | |
start (Priority priority=InheritPriority) | |
started () | |
terminate () | |
terminated () | |
usleep (unsigned long usecs) | |
wait (unsigned long time=ULONG_MAX) | |
yieldCurrentThread () | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< FileParser > | shared_pointer |
typedef the shared pointer of this More... | |
![]() | |
enum | status_t { running, paused, notstarted } |
enum describing the internal status of the thread More... | |
enum | control_t { _run, _quit, _pause } |
enum describing the control status of the thread More... | |
enum | exception_t { NO_EXCEPTION, INVALID_ARGUMENT_EXCEPTION, RUNTIME_ERROR_EXCEPTION, OUT_OF_RANGE_EXCEPTION, LOGIC_ERROR_EXCEPTION, STANDART_EXCEPTION, UNKNOWN_EXCEPTION } |
enum describing which exception was thrown More... | |
![]() | |
virtual void | end () |
tell the thread to quit More... | |
![]() | |
static shared_pointer | instance (const std::string type, const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock) |
create an instance of the requested type More... | |
![]() | |
void | savePos (const std::streampos &eventStartPos, const uint64_t eventId) |
put current file position in the eventmap More... | |
![]() | |
void | pausePoint () |
point where the thread will be paused More... | |
![]() | |
filereaderpointerpair_t | _readerpointerpair |
the file pointer More... | |
event2positionreaders_t & | _event2posreader |
reference to the map containing the beginnings of the event More... | |
QReadWriteLock & | _lock |
Lock that protects the map. More... | |
![]() | |
QMutex | _pauseMutex |
mutex to wait on until thread is paused More... | |
QWaitCondition | _pauseCondition |
wait condition to wait on until thread is resumed More... | |
QWaitCondition | _waitUntilPausedCondition |
wait condition to wait unitl thread is paused More... | |
status_t | _status |
the internal status of the thread More... | |
control_t | _control |
the internal control status of the thread More... | |
size_t | _pausecount |
a counter how many threads have pause this thread More... | |
exception_t | _exception_thrown |
flag to show that general exception was thrown More... | |
std::invalid_argument | _invarg_excep |
the invalid arguemnt exception thrown More... | |
std::runtime_error | _runt_excep |
the invalid arguemnt exception thrown More... | |
std::out_of_range | _outrange_excep |
the invalid arguemnt exception thrown More... | |
std::logic_error | _logic_excep |
the invalid arguemnt exception thrown More... | |
Will parse a file containing commercial ccd images.
Definition at line 21 of file raw_sss_parser.h.
|
inline |
constructor
readerpointerpair | the filereader the will read the event from files |
event2posreader | reference to container that maps events to the position in file, reader pair vector |
lock | reference to the protector of the eventlist map |
Definition at line 31 of file raw_sss_parser.h.
void RAWSSSParser::run | ( | ) |
parse the raw.sss file
read the header information and then the individual frames timestamp. Save the position where the timestamp is found then skip the frame data to read the next frames timestamp. Do this until the number of frames reported in the header have been read. Check if we are at the end of the file, if not throw an error.
the file header information
Definition at line 26 of file raw_sss_parser.cpp.
References cass::sssFile::Header::height, cass::sssFile::Header::nFrames, and cass::sssFile::Header::width.
|
inlinevirtual |
Reimplemented from cass::FileParser.
Definition at line 48 of file raw_sss_parser.h.