DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::TimeTaggerData Class Reference

Data class for TimeTagger. More...

+ Inheritance diagram for DynExpInstr::TimeTaggerData:

Classes

struct  HBTResultsType
 Type to store results of a g^(2) measurement. More...
 

Public Types

enum  StreamModeType { Counts , Events }
 Type to determine whether the instrument reads out all time-tagged events or summarized count rates. Not a strongly-typed enum to allow using the enumeration in a DynExp::ParamsBase::Param in class DynExpInstr::TimeTaggerParams. More...
 
using SampleStreamType = BasicSampleStream
 Data stream type this data stream instrument operates on. More...
 
- Public Types inherited from DynExpInstr::DataStreamInstrumentData
enum class  UnitType {
  Arbitrary , LogicLevel , Counts , Volt ,
  Ampere , Power_W , Power_dBm
}
 Units which can be used for data stream instruments. More...
 
using ValueType = double
 Data type to represent hardware limits on the sample values to write to the hardware adapter assigned to the related DataStreamInstrument instance. More...
 
- Public Types inherited from DynExp::InstrumentDataBase
using TaskQueueType = std::list< std::unique_ptr< TaskBase > >
 Type of an instrument task queue owning the tasks within. More...
 
using TaskQueueIteratorType = TaskQueueType::const_iterator
 Const iterator type to elements of TaskQueueType. More...
 

Public Member Functions

 TimeTaggerData (size_t BufferSizeInSamples=1)
 Constructs a TimeTaggerData instance. More...
 
 TimeTaggerData (DataStreamBasePtrType &&SampleStream)
 Constructs a TimeTaggerData instance. More...
 
virtual ~TimeTaggerData ()=default
 
auto GetStreamMode () const noexcept
 Getter for StreamMode. More...
 
void SetStreamMode (StreamModeType StreamMode) const noexcept
 Setter for StreamMode. Adjustable by modules. Sets StreamModeChanged to true. More...
 
bool GetStreamModeChanged () const noexcept
 Getter for StreamModeChanged. More...
 
void ResetStreamMode () const noexcept
 Sets StreamModeChanged to true. Callable by modules. More...
 
void ClearStreamModeChanged () noexcept
 Sets StreamModeChanged to false. More...
 
auto & GetHBTResults () const noexcept
 Getter for HBTResults. More...
 
auto & GetHBTResults () noexcept
 Getter for HBTResults. More...
 
- Public Member Functions inherited from DynExpInstr::DataStreamInstrumentData
 DataStreamInstrumentData (DataStreamBasePtrType &&SampleStream)
 Constructs a DataStreamInstrumentData instance. More...
 
virtual ~DataStreamInstrumentData ()=default
 
DataStreamBasePtrType::element_type * GetSampleStream () const noexcept
 Getter for the data stream instrument's sample stream. Logical const-ness: always returns a non-const type to allow modules to directly manipulate the sample stream. More...
 
template<typename T >
auto GetCastSampleStream () const
 Casts the data stream instrument's sample stream to a derived data stream type. More...
 
ValueType GetHardwareMinValue () const noexcept
 Returns HardwareMinValue. More...
 
ValueType GetHardwareMaxValue () const noexcept
 Returns HardwareMaxValue. More...
 
UnitType GetValueUnit () const noexcept
 Returns ValueUnit. More...
 
void SetHardwareMinValue (ValueType Value) noexcept
 Sets HardwareMinValue. More...
 
void SetHardwareMaxValue (ValueType Value) noexcept
 Sets HardwareMaxValue. More...
 
void SetValueUnit (UnitType Unit) noexcept
 Sets ValueUnit. More...
 
- Public Member Functions inherited from DynExp::InstrumentDataBase
 InstrumentDataBase ()
 
virtual ~InstrumentDataBase ()
 
auto GetLastUpdateTime () const
 Getter for LastUpdate. More...
 
auto GetException () const noexcept
 Getter for InstrumentDataBase::InstrumentException. More...
 
void EnqueueTask (std::unique_ptr< TaskBase > &&Task)
 Enqueues a task at the back of an instrument's task queue and notifies the instrument about the new task. More...
 
void EnqueuePriorityTask (std::unique_ptr< TaskBase > &&Task)
 Enqueues a task at the front of an instrument's task queue and notifies the instrument about the new task. More...
 
std::unique_ptr< TaskBasePopTaskFront ()
 Removes a task from the front of an instrument's task queue. More...
 
std::unique_ptr< TaskBasePopTaskBack ()
 Removes a task from the back of an instrument's task queue. More...
 
auto GetTaskFront () noexcept
 Getter for first enqueued task. More...
 
auto GetTaskBack () noexcept
 Getter for last enqueued task. More...
 
size_t GetNumEnqueuedTasks () const noexcept
 Getter for the instrument task queue's length. More...
 
std::unique_ptr< TaskBasePopFinishedTask ()
 Removes a task from the front of an instrument's list of finished tasks. More...
 
size_t GetNumFinishedTasks () const noexcept
 Getter for the length of the instrument's list of finished tasks. More...
 
bool IsQueueClosed () const noexcept
 Determines whether the instrument task queue is closed. More...
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Private Member Functions

void ResetImpl (dispatch_tag< DataStreamInstrumentData >) override final
 
virtual void ResetImpl (dispatch_tag< TimeTaggerData >)
 

Private Attributes

StreamModeType StreamMode
 Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from InstrumentDataBase, descending the inheritance hierarchy. Override in order to reset derived classes. More...
 
bool StreamModeChanged
 Indicates whether StreamMode has to be applied to the phyiscal device. Also refer to StreamMode. Logical const-ness: allow modules to communicate to this instrument by adjusting StreamMode. More...
 
HBTResultsType HBTResults
 Stores the results of a g^(2) measurement. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DynExpInstr::DataStreamInstrumentData
static const char * UnitTypeToStr (const UnitType &Unit)
 Returns a descriptive string of a respective unit to be e.g. used in plots. More...
 
- Public Attributes inherited from DynExp::InstrumentDataBase
InstrumentBaseOnlyType InstrumentBaseOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase. More...
 
InstrumenThreadOnlyType InstrumentThreadOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain(). More...
 
- Protected Member Functions inherited from Util::ISynchronizedPointerLockable
 ISynchronizedPointerLockable ()
 
 ~ISynchronizedPointerLockable ()
 Object should never be destroyed before completely unlocked. More...
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Detailed Description

Data class for TimeTagger.

Definition at line 97 of file TimeTagger.h.

Member Typedef Documentation

◆ SampleStreamType

Data stream type this data stream instrument operates on.

Definition at line 139 of file TimeTagger.h.

Member Enumeration Documentation

◆ StreamModeType

Type to determine whether the instrument reads out all time-tagged events or summarized count rates. Not a strongly-typed enum to allow using the enumeration in a DynExp::ParamsBase::Param in class DynExpInstr::TimeTaggerParams.

Enumerator
Counts 

Read out summarized count rates in Hz.

Events 

Read out the timestamps of all time-tagged events.

Definition at line 134 of file TimeTagger.h.

Constructor & Destructor Documentation

◆ TimeTaggerData() [1/2]

DynExpInstr::TimeTaggerData::TimeTaggerData ( size_t  BufferSizeInSamples = 1)
inline

Constructs a TimeTaggerData instance.

Parameters
BufferSizeInSamplesInitial buffer size of a data stream of type SampleStreamType to create for the related DataStreamInstrument instance to operate on

Definition at line 147 of file TimeTagger.h.

◆ TimeTaggerData() [2/2]

DynExpInstr::TimeTaggerData::TimeTaggerData ( DataStreamBasePtrType &&  SampleStream)
inline

Constructs a TimeTaggerData instance.

Parameters
SampleStreamData stream the related DataStreamInstrument instance operates on. The DataStreamInstrumentData instance takes ownership of the stream.
Exceptions
Util::InvalidArgExceptionis thrown if SampleStream is nullptr.

Definition at line 155 of file TimeTagger.h.

◆ ~TimeTaggerData()

virtual DynExpInstr::TimeTaggerData::~TimeTaggerData ( )
virtualdefault

Member Function Documentation

◆ ClearStreamModeChanged()

void DynExpInstr::TimeTaggerData::ClearStreamModeChanged ( )
inlinenoexcept

Sets StreamModeChanged to false.

Definition at line 165 of file TimeTagger.h.

◆ GetHBTResults() [1/2]

auto& DynExpInstr::TimeTaggerData::GetHBTResults ( ) const
inlinenoexcept

Getter for HBTResults.

Definition at line 167 of file TimeTagger.h.

◆ GetHBTResults() [2/2]

auto& DynExpInstr::TimeTaggerData::GetHBTResults ( )
inlinenoexcept

Getter for HBTResults.

Definition at line 168 of file TimeTagger.h.

◆ GetStreamMode()

auto DynExpInstr::TimeTaggerData::GetStreamMode ( ) const
inlinenoexcept

Getter for StreamMode.

Definition at line 161 of file TimeTagger.h.

◆ GetStreamModeChanged()

bool DynExpInstr::TimeTaggerData::GetStreamModeChanged ( ) const
inlinenoexcept

Getter for StreamModeChanged.

Definition at line 163 of file TimeTagger.h.

◆ ResetImpl() [1/2]

void DynExpInstr::TimeTaggerData::ResetImpl ( dispatch_tag< DataStreamInstrumentData )
finaloverrideprivatevirtual

Reimplemented from DynExpInstr::DataStreamInstrumentData.

Definition at line 47 of file TimeTagger.cpp.

◆ ResetImpl() [2/2]

virtual void DynExpInstr::TimeTaggerData::ResetImpl ( dispatch_tag< TimeTaggerData )
inlineprivatevirtual

Reimplemented in DynExpInstr::QutoolsQuTAGData.

Definition at line 172 of file TimeTagger.h.

◆ ResetStreamMode()

void DynExpInstr::TimeTaggerData::ResetStreamMode ( ) const
inlinenoexcept

Sets StreamModeChanged to true. Callable by modules.

Definition at line 164 of file TimeTagger.h.

◆ SetStreamMode()

void DynExpInstr::TimeTaggerData::SetStreamMode ( StreamModeType  StreamMode) const
noexcept

Setter for StreamMode. Adjustable by modules. Sets StreamModeChanged to true.

Definition at line 41 of file TimeTagger.cpp.

Member Data Documentation

◆ HBTResults

HBTResultsType DynExpInstr::TimeTaggerData::HBTResults
private

Stores the results of a g^(2) measurement.

Definition at line 195 of file TimeTagger.h.

◆ StreamMode

StreamModeType DynExpInstr::TimeTaggerData::StreamMode
mutableprivate

Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from InstrumentDataBase, descending the inheritance hierarchy. Override in order to reset derived classes.

Stream mode of the TimeTagger. Derived instruments are supposed to apply the stream mode to the phyiscal device in their update task derived from TimeTaggerTasks::UpdateTask if StreamModeChanged is true. After that, they should call ClearStreamModeChanged(). Also refer to StreamModeChanged. Logical const-ness: allow modules to communicate to this instrument by adjusting StreamMode.

Definition at line 182 of file TimeTagger.h.

◆ StreamModeChanged

bool DynExpInstr::TimeTaggerData::StreamModeChanged
mutableprivate

Indicates whether StreamMode has to be applied to the phyiscal device. Also refer to StreamMode. Logical const-ness: allow modules to communicate to this instrument by adjusting StreamMode.

Definition at line 190 of file TimeTagger.h.


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