12 if (InstrData->GetStreamMode() == TimeTaggerData::StreamModeType::Counts)
13 InstrData->HardwareAdapter->ConfigureFilter(InstrData->GetChannel(), DynExpHardware::QutoolsTDCSyms::TDC_FilterType::FILTER_MUTE);
15 InstrData->HardwareAdapter->ConfigureFilter(InstrData->GetChannel());
17 InstrData->ClearStreamModeChanged();
22 auto InstrParams = DynExp::dynamic_Params_cast<QutoolsQuTAG>(Instance.
ParamsGetter());
23 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
25 InstrData->SetChannel(InstrParams->Channel);
27 Instance.
LockObject(InstrParams->HardwareAdapter, InstrData->HardwareAdapter);
29 InstrData->HardwareAdapter->EnableChannel(InstrData->GetChannel());
38 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
40 InstrData->HardwareAdapter->DisableChannel(InstrData->GetChannel());
47 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
49 if (InstrData->GetStreamModeChanged())
58 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
61 if (InstrData->GetStreamMode() == TimeTaggerData::StreamModeType::Counts)
63 auto Counts = InstrData->HardwareAdapter->GetCoincidenceCounts(InstrData->GetChannel() + 1);
68 SampleStream->WriteSamples(InstrData->HardwareAdapter->GetTimestamps(InstrData->GetChannel()));
70 if (InstrData->GetHBTResults().Enabled)
72 InstrData->GetHBTResults().EventCounts = InstrData->HardwareAdapter->GetHBTEventCounts();
73 InstrData->GetHBTResults().IntegrationTime = InstrData->HardwareAdapter->GetHBTIntegrationTime();
74 InstrData->GetHBTResults().ResultVector = InstrData->HardwareAdapter->GetHBTResult();
82 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
84 InstrData->HardwareAdapter->SetTimestampBufferSize(Util::NumToT<DynExpHardware::QutoolsTDCSyms::Int32>(BufferSizeInSamples));
85 InstrData->GetSampleStream()->SetStreamSize(BufferSizeInSamples);
92 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
94 InstrData->HardwareAdapter->ClearTimestamps(InstrData->GetChannel());
101 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
103 InstrData->HardwareAdapter->ConfigureSignalConditioning(InstrData->GetChannel(), DynExpHardware::QutoolsTDCSyms::SCOND_MISC, UseRisingEdge, ThresholdInVolts);
110 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
112 InstrData->HardwareAdapter->SetExposureTime(std::chrono::duration_cast<std::chrono::milliseconds>(ExposureTime));
119 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
121 InstrData->HardwareAdapter->SetCoincidenceWindow(CoincidenceWindow);
128 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
130 InstrData->HardwareAdapter->SetChannelDelay(InstrData->GetChannel(), Delay);
137 auto InstrParams = DynExp::dynamic_Params_cast<QutoolsQuTAG>(Instance.
ParamsGetter());
138 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
140 InstrData->HardwareAdapter->EnableHBT(Enable);
141 InstrData->GetHBTResults().Enabled = Enable;
145 InstrData->HardwareAdapter->ConfigureHBTChannels(InstrData->GetChannel(), InstrParams->CrossCorrChannel);
148 InstrData->HardwareAdapter->ConfigureFilter(InstrData->GetChannel());
149 InstrData->HardwareAdapter->ConfigureFilter(InstrParams->CrossCorrChannel);
152 InstrData->ClearStreamModeChanged();
160 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
162 if (BinWidth / InstrData->HardwareAdapter->GetTimebase() < 1 || BinWidth / InstrData->HardwareAdapter->GetTimebase() > 1e6)
164 if (BinCount < 16 || BinCount > 64000)
167 InstrData->HardwareAdapter->ConfigureHBTParams(BinWidth, Util::NumToT<DynExpHardware::QutoolsTDCSyms::Int32>(BinCount));
174 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(Instance.
InstrumentDataGetter());
176 if (InstrData->GetHBTResults().Enabled)
177 InstrData->HardwareAdapter->ResetHBT();
190 :
TimeTagger(OwnerThreadID, std::move(Params))
196 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(
GetInstrumentData());
198 return InstrData->HardwareAdapter->GetTimebase();
203 auto InstrData = DynExp::dynamic_InstrumentData_cast<QutoolsQuTAG>(
GetInstrumentData());
205 return InstrData->HardwareAdapter->GetBufferSize();
Implements a circular data stream based on Util::circularbuf using samples of type BasicSample.
void WriteSample(const SampleT &Sample)
Writes a single sample to the stream's buffer StreamBuffer.
Refer to DynExp::ParamsBase::dispatch_tag.
Refer to DynExp::ParamsBase::dispatch_tag.
InstrumentDataTypeSyncPtrType GetInstrumentData(const std::chrono::milliseconds Timeout=GetInstrumentDataTimeoutDefault)
Locks the mutex of the instrument data class instance InstrumentData assigned to this InstrumentBase ...
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
const InstrumentBase::InstrumentDataGetterType InstrumentDataGetter
Getter for instrument's data. Refer to InstrumentBase::InstrumentDataGetterType.
Refer to ParamsBase::dispatch_tag.
const Object::ParamsGetterType ParamsGetter
Invoke to obtain the parameters (derived from ParamsBase) of Owner.
void UnlockObject(LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer)
Unlocks an Object instance stored in the LinkedObjectWrapperContainer ObjectWrapperContainer....
void LockObject(const ParamsBase::Param< ObjectLink< ObjectT >> &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< O...
Defines the return type of task functions.
Refer to DynExp::ParamsBase::dispatch_tag.
Thrown when an argument passed to a function exceeds the valid range.
Pointer to lock a class derived from ISynchronizedPointerLockable for synchronizing between threads....
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
std::chrono::duration< double, std::pico > picoseconds
Extends std::chrono by a duration data type for picoseconds.
Accumulates include statements to provide a precompiled header.