Psyllid  v1.12.4
Project 8 Data Acquisisition Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
stream_wrapper Class Reference

Wrapper class for a monarch3::M3Stream object. More...

#include <monarch3_wrap.hh>

Public Member Functions

 stream_wrapper (monarch3::Monarch3 &, unsigned a_stream_no, monarch_wrapper *a_monarch_wrapper)
 
 stream_wrapper (stream_wrapper &&a_orig)
 
 ~stream_wrapper ()
 
stream_wrapperoperator= (stream_wrapper &&a_orig)
 
bool is_valid () const
 
monarch3::M3Record * get_stream_record ()
 Get the pointer to the stream record. More...
 
monarch3::M3Record * get_channel_record (unsigned a_chan_no)
 Get the pointer to a particular channel record. More...
 
bool write_record (monarch3::RecordIdType a_rec_id, monarch3::TimeType a_rec_time, const void *a_rec_block, uint64_t a_bytes, bool a_is_new_acq)
 Write the record contents to the file. More...
 

Private Member Functions

 stream_wrapper (const stream_wrapper &)=delete
 
stream_wrapperoperator= (const stream_wrapper &)=delete
 

Private Attributes

monarch_wrapperf_monarch_wrapper
 
monarch3::M3Stream * f_stream
 
bool f_is_valid
 
double f_record_size_mb
 

Friends

class monarch_wrapper
 

Detailed Description

Wrapper class for a monarch3::M3Stream object.

Author
N. S. Oblath

Provides the ability to write records in a thread-safe synchronized way.

Thread synchronization strategy:

Definition at line 314 of file monarch3_wrap.hh.

Constructor & Destructor Documentation

◆ stream_wrapper() [1/3]

stream_wrapper ( monarch3::Monarch3 &  a_monarch,
unsigned  a_stream_no,
monarch_wrapper a_monarch_wrapper 
)

Definition at line 718 of file monarch3_wrap.cc.

◆ stream_wrapper() [2/3]

Definition at line 730 of file monarch3_wrap.cc.

◆ ~stream_wrapper()

Definition at line 740 of file monarch3_wrap.cc.

◆ stream_wrapper() [3/3]

stream_wrapper ( const stream_wrapper )
privatedelete

Member Function Documentation

◆ get_channel_record()

monarch3::M3Record * get_channel_record ( unsigned  a_chan_no)
inline

Get the pointer to a particular channel record.

Definition at line 469 of file monarch3_wrap.hh.

◆ get_stream_record()

monarch3::M3Record * get_stream_record ( )
inline

Get the pointer to the stream record.

Definition at line 464 of file monarch3_wrap.hh.

◆ is_valid()

bool is_valid ( ) const
inline

Definition at line 459 of file monarch3_wrap.hh.

◆ operator=() [1/2]

stream_wrapper & operator= ( stream_wrapper &&  a_orig)

Definition at line 743 of file monarch3_wrap.cc.

◆ operator=() [2/2]

stream_wrapper& operator= ( const stream_wrapper )
privatedelete

◆ write_record()

bool write_record ( monarch3::RecordIdType  a_rec_id,
monarch3::TimeType  a_rec_time,
const void *  a_rec_block,
uint64_t  a_bytes,
bool  a_is_new_acq 
)

Write the record contents to the file.

Definition at line 754 of file monarch3_wrap.cc.

Friends And Related Function Documentation

◆ monarch_wrapper

friend class monarch_wrapper
friend

Definition at line 337 of file monarch3_wrap.hh.

Member Data Documentation

◆ f_is_valid

bool f_is_valid
private

Definition at line 342 of file monarch3_wrap.hh.

◆ f_monarch_wrapper

monarch_wrapper* f_monarch_wrapper
private

Definition at line 339 of file monarch3_wrap.hh.

◆ f_record_size_mb

double f_record_size_mb
private

Definition at line 344 of file monarch3_wrap.hh.

◆ f_stream

monarch3::M3Stream* f_stream
private

Definition at line 341 of file monarch3_wrap.hh.


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