qavrg 0.0.28
|
#include <qavrgacquisitionparms.h>
Definition at line 12 of file qavrgacquisitionparms.h.
Definition at line 102 of file qavrgacquisitionparms.h.
{ AcquireDone = 0, AcquireData, AcquireDark, AcquireReference, AcquireOnce, AcquireScope };
QavrgAcquisitionParms::QavrgAcquisitionParms | ( | QObject * | parent | ) |
Definition at line 7 of file qavrgacquisitionparms.cpp.
: QObject(parent), m_SettingsSaver(new QcepSettingsSaver(this)), m_NChannels(m_SettingsSaver, this, "channels", 4, "Number of Channels"), m_NSamples(m_SettingsSaver, this, "samples", 900000, "Number of Samples per Channel"), m_IntegrationTime(m_SettingsSaver, this, "integrationTime", 4, "Integration Time"), m_ScopeIntegrationTime(m_SettingsSaver, this, "scopeIntegrationTime", 1, "Integration Time in Scope Mode"), m_AcquireIntegrationTime(m_SettingsSaver, this, "acquireIntegrationTime", 1, "Acquisition Integration Time"), m_NRepeats(m_SettingsSaver, this, "repeats", 1, "Number of Repeats"), m_DarkNRepeats(m_SettingsSaver, this, "darkRepeats", 1, "Number of Dark Repeats"), m_ReferenceNRepeats(m_SettingsSaver, this, "referenceRepeats", 1, "Number of Reference Repeats"), m_BucketsPerOrbit(m_SettingsSaver, this,"bucketsPerOrbit",1296, "Buckets per Orbit"), m_SamplesPerOrbit(m_SettingsSaver, this,"samplesPerOrbit",3683.5, "Samples per Orbit"), m_FillPatternMode(m_SettingsSaver, this,"fillPatternMode",0, "Fill Pattern Mode"), m_CustomFilledBucketsPerOrbit(m_SettingsSaver, this, "customFilledBucketsPerOrbit", 24, "Filled Buckets per Orbit (custom)"), m_TriggerLevel(m_SettingsSaver, this,"triggerLevel",1.0, "Trigger Level"), m_TriggerSlope(m_SettingsSaver, this,"triggerSlope",0, "Trigger Slope"), m_TriggerSource(m_SettingsSaver, this,"triggerSource",0, "Trigger Source"), m_OutputDirectory(m_SettingsSaver, this,"outputDirectory",".","Output Directory"), m_FileName(m_SettingsSaver, this,"fileName","saveddata", "File Name"), m_FilePath(m_SettingsSaver, this,"filePath","saveddata", "File Path"), m_ScanNumber(m_SettingsSaver, this,"scanNumber",1, "Scan Number"), m_SimulationMode(m_SettingsSaver, this,"simulationMode",0, "Simulation Mode"), // m_Instrument(m_SettingsSaver, this, "instrument", 0), // m_Concurrent(m_SettingsSaver, this,"concurrent",3), m_Status(QcepSettingsSaverWPtr(), this,"status",AcquireDone, "Acquisition Status"), m_LaserRepRate(m_SettingsSaver, this,"laserRepRate",1000, "Laser Rep Rate") // m_Mutex(QMutex::Recursive), { }
int QavrgAcquisitionParms::decr_NQueuedResults | ( | ) |
Definition at line 167 of file qavrgacquisitionparms.cpp.
References m_NQueuedResults.
{ int res = m_NQueuedResults.fetchAndAddOrdered(-1); // printf("QavrgAcquisitionParms::decr_NQueuedResults = %d\n", res); return res; }
QavrgFitter * QavrgAcquisitionParms::fitter | ( | int | chan | ) |
Definition at line 38 of file qavrgacquisitionparms.cpp.
References m_Fitters, and m_FittersMutex.
Referenced by QavrgAcquisitionSimulated::calculateSimulatedAcquisition(), QavrgAcquisition::configureAverager(), QavrgAcquisitionData::get_DarkData(), QavrgAcquisitionData::get_FitData(), QavrgAcquisitionData::get_RawData(), QavrgAcquisitionData::get_ReferenceData(), QavrgAcquisitionData::loadDarkData(), QavrgAcquisitionData::loadReferenceData(), QavrgAcquisition::readoutAcquisition(), QavrgAcquisition::readResult(), QavrgAcquisition::readResultAverage(), QavrgAcquisition::readResultBunchAverage(), QavrgAcquisition::resultSize(), QavrgAcquisition::saveAcquisitionResult(), QavrgAcquisitionData::saveDarkData(), QavrgAcquisition::saveData(), QavrgAcquisitionData::saveReferenceData(), QavrgAcquisitionData::setDarkData(), QavrgAcquisitionData::setReferenceData(), QavrgAcquisition::startNewScan(), and QavrgWindow::updateGraph().
{ QMutexLocker lock(&m_FittersMutex); return m_Fitters.value(chan); }
QavrgAcquisitionParms::AcquisitionMode QavrgAcquisitionParms::get_AcquisitionMode | ( | ) | const |
Definition at line 144 of file qavrgacquisitionparms.cpp.
References m_AcqModeMutex, and m_AcquisitionMode.
Referenced by QavrgAcquisitionSimulated::calculateSimulatedAcquisition(), and QavrgAcquisition::readoutAcquisition().
{ QMutexLocker lock(&m_AcqModeMutex); return m_AcquisitionMode; }
double QavrgAcquisitionParms::get_BucketSeparation | ( | ) | const |
Definition at line 45 of file qavrgacquisitionparms.cpp.
{
return get_SamplesPerOrbit()/get_BucketsPerOrbit();
}
bool QavrgAcquisitionParms::get_CustomFillPattern | ( | int | bucket | ) | const [slot] |
Definition at line 119 of file qavrgacquisitionparms.cpp.
References m_CustomFillPattern, and m_FillPatternMutex.
{ QMutexLocker lock(&m_FillPatternMutex); return m_CustomFillPattern.value(bin); }
QcepBoolVector QavrgAcquisitionParms::get_CustomFillPattern | ( | ) | const |
Definition at line 112 of file qavrgacquisitionparms.cpp.
References m_CustomFillPattern, and m_FillPatternMutex.
Referenced by QavrgAcquisition::fillPatternChanged().
{ QMutexLocker lock(&m_FillPatternMutex); return m_CustomFillPattern; }
QVector< int > QavrgAcquisitionParms::get_FilledBuckets | ( | ) | const |
Definition at line 62 of file qavrgacquisitionparms.cpp.
References m_FillPattern, and m_FillPatternMutex.
{ QMutexLocker lock(&m_FillPatternMutex); QVector<int> res; int sz = m_FillPattern.size(); for (int i=0; i<sz; i++) { if (m_FillPattern.value(i)) { res.append(i); } } return res; }
int QavrgAcquisitionParms::get_FilledBucketsPerOrbit | ( | ) | const |
Definition at line 78 of file qavrgacquisitionparms.cpp.
References m_FillPattern, and m_FillPatternMutex.
Referenced by QavrgAcquisition::bucketNumber(), and QavrgAcquisition::orbitNumber().
{ QMutexLocker lock(&m_FillPatternMutex); int res=0; int sz = m_FillPattern.size(); for (int i=0; i<sz; i++) { if (m_FillPattern.value(i)) { res++; } } return res; }
QcepBoolVector QavrgAcquisitionParms::get_FillPattern | ( | ) | const |
Definition at line 55 of file qavrgacquisitionparms.cpp.
References m_FillPattern, and m_FillPatternMutex.
{ QMutexLocker lock(&m_FillPatternMutex); return m_FillPattern; }
int QavrgAcquisitionParms::incr_NQueuedResults | ( | ) |
Definition at line 158 of file qavrgacquisitionparms.cpp.
References m_NQueuedResults.
Referenced by QavrgAcquisitionSimulated::calculateSimulatedAcquisition(), and QavrgAcquisition::readoutAcquisition().
{ int res = m_NQueuedResults.fetchAndAddOrdered(1); // printf("QavrgAcquisitionParms::incr_NQueuedResults = %d\n", res); return res; }
void QavrgAcquisitionParms::printMessage | ( | QString | msg, |
QDateTime | ts = QDateTime::currentDateTime() |
||
) | [signal] |
void QavrgAcquisitionParms::properties | ( | ) | const [slot] |
Definition at line 176 of file qavrgacquisitionparms.cpp.
{ printf("Static Properties:\n"); const QMetaObject *meta = &staticMetaObject; int count = meta->propertyCount(); int offset= meta->propertyOffset(); for (int i=offset; i<count; i++) { QMetaProperty metaprop = meta->property(i); printf("%d : %s = %s\n", i, metaprop.name(), qPrintable(metaprop.read(this).toString())); } printf("Dynamic Properties:\n"); int i=0; foreach(QByteArray nm, dynamicPropertyNames()) { printf("%d : %s = %s\n", i, nm.data(), qPrintable(property(nm.data()).toString())); } }
void QavrgAcquisitionParms::readSettings | ( | QSettings * | settings | ) |
Definition at line 199 of file qavrgacquisitionparms.cpp.
References m_Fitters.
{ // QMutexLocker lock(&m_Mutex); QcepProperty::readSettings(this, &staticMetaObject, "acquisition", settings); foreach (QavrgFitter* f, m_Fitters) { f -> readSettings(settings); } }
virtual QcepSettingsSaverWPtr QavrgAcquisitionParms::saver | ( | ) | const [pure virtual] |
Implemented in QavrgAcquisition.
void QavrgAcquisitionParms::set_AcquisitionMode | ( | QavrgAcquisitionParms::AcquisitionMode | mode | ) |
Definition at line 151 of file qavrgacquisitionparms.cpp.
References m_AcqModeMutex, and m_AcquisitionMode.
Referenced by QavrgAcquisition::configureAverager(), and QavrgAcquisitionSimulated::simulatedConfigureAverager().
{ QMutexLocker lock(&m_AcqModeMutex); m_AcquisitionMode = mode; }
void QavrgAcquisitionParms::set_BucketSeparation | ( | const double | sep | ) |
Definition at line 50 of file qavrgacquisitionparms.cpp.
{ set_SamplesPerOrbit(sep*get_BucketsPerOrbit()); }
void QavrgAcquisitionParms::set_CustomFillPattern | ( | int | bucket, |
bool | value | ||
) | [slot] |
Definition at line 133 of file qavrgacquisitionparms.cpp.
References m_CustomFillPattern, and m_FillPatternMutex.
{ QMutexLocker lock(&m_FillPatternMutex); if (bin >= m_CustomFillPattern.size()) { m_CustomFillPattern.resize(bin+1); } m_CustomFillPattern[bin] = val; }
void QavrgAcquisitionParms::set_CustomFillPattern | ( | const QcepBoolVector | patt | ) |
Definition at line 126 of file qavrgacquisitionparms.cpp.
References m_CustomFillPattern, and m_FillPatternMutex.
{ QMutexLocker lock(&m_FillPatternMutex); m_CustomFillPattern = patt; }
void QavrgAcquisitionParms::set_FillPattern | ( | const QcepBoolVector | patt | ) |
Definition at line 94 of file qavrgacquisitionparms.cpp.
References m_FillPattern, and m_FillPatternMutex.
Referenced by QavrgAcquisition::fillPatternChanged().
{ QMutexLocker lock(&m_FillPatternMutex); // printf("set fill pattern = "); // int sz = patt.size(); // // for(int i=0; i<sz; i++) { // if (patt.value(i)) { // printf("%d ", i); // } // } // // printf(";\n"); m_FillPattern = patt; }
void QavrgAcquisitionParms::warningMessage | ( | QString | msg | ) | [signal] |
Referenced by QavrgAcquisition::loadData(), and QavrgAcquisition::saveData().
void QavrgAcquisitionParms::writeSettings | ( | QSettings * | settings | ) |
Definition at line 210 of file qavrgacquisitionparms.cpp.
References m_Fitters.
{ // QMutexLocker lock(&m_Mutex); QcepProperty::writeSettings(this, &staticMetaObject, "acquisition", settings); foreach (QavrgFitter* f, m_Fitters) { f -> writeSettings(settings); } }
QMutex QavrgAcquisitionParms::m_AcqModeMutex [mutable, private] |
Definition at line 131 of file qavrgacquisitionparms.h.
Referenced by get_AcquisitionMode(), and set_AcquisitionMode().
Definition at line 135 of file qavrgacquisitionparms.h.
Referenced by get_AcquisitionMode(), and set_AcquisitionMode().
QcepBoolVector QavrgAcquisitionParms::m_CustomFillPattern [private] |
Definition at line 134 of file qavrgacquisitionparms.h.
Referenced by get_CustomFillPattern(), and set_CustomFillPattern().
QcepBoolVector QavrgAcquisitionParms::m_FillPattern [private] |
Definition at line 133 of file qavrgacquisitionparms.h.
Referenced by get_FilledBuckets(), get_FilledBucketsPerOrbit(), get_FillPattern(), and set_FillPattern().
QMutex QavrgAcquisitionParms::m_FillPatternMutex [mutable, private] |
Definition at line 132 of file qavrgacquisitionparms.h.
Referenced by get_CustomFillPattern(), get_FilledBuckets(), get_FilledBucketsPerOrbit(), get_FillPattern(), set_CustomFillPattern(), and set_FillPattern().
QVector< QavrgFitter* > QavrgAcquisitionParms::m_Fitters [protected] |
Definition at line 127 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisition::findDevices(), fitter(), readSettings(), writeSettings(), and QavrgAcquisition::~QavrgAcquisition().
QMutex QavrgAcquisitionParms::m_FittersMutex [mutable, protected] |
Definition at line 126 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisition::findDevices(), and fitter().
QAtomicInt QavrgAcquisitionParms::m_NQueuedResults [private] |
Definition at line 136 of file qavrgacquisitionparms.h.
Referenced by decr_NQueuedResults(), and incr_NQueuedResults().
QcepSettingsSaverPtr QavrgAcquisitionParms::m_SettingsSaver [private] |
Definition at line 17 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::acquireIntegrationTime [read, write] |
Definition at line 35 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::bucketSeparation [read, write] |
Definition at line 20 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::bucketsPerOrbit [read, write] |
Definition at line 44 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::channels [read, write] |
Definition at line 26 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::customFilledBucketsPerOrbit [read, write] |
Definition at line 50 of file qavrgacquisitionparms.h.
QcepBoolVector QavrgAcquisitionParms::customFillPattern [read, write] |
Definition at line 23 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::darkRepeats [read, write] |
Definition at line 39 of file qavrgacquisitionparms.h.
QString QavrgAcquisitionParms::fileName [read, write] |
Definition at line 63 of file qavrgacquisitionparms.h.
QString QavrgAcquisitionParms::filePath [read, write] |
Definition at line 66 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisition::newSaveFile().
QcepIntVector QavrgAcquisitionParms::filledBuckets [read] |
Definition at line 22 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::filledBucketsPerOrbit [read] |
Definition at line 24 of file qavrgacquisitionparms.h.
QcepBoolVector QavrgAcquisitionParms::fillPattern [read, write] |
Definition at line 21 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisition::fillPatternChanged().
int QavrgAcquisitionParms::fillPatternMode [read, write] |
Definition at line 48 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::integrationTime [read, write] |
Definition at line 31 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::laserRepRate [read, write] |
Definition at line 84 of file qavrgacquisitionparms.h.
QString QavrgAcquisitionParms::outputDirectory [read, write] |
Definition at line 60 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::referenceRepeats [read, write] |
Definition at line 41 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::repeats [read, write] |
Definition at line 37 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::samples [read, write] |
Definition at line 28 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::samplesPerOrbit [read, write] |
Definition at line 46 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisitionSimulated::calculateSimulatedAcquisition().
int QavrgAcquisitionParms::scanNumber [read, write] |
Definition at line 69 of file qavrgacquisitionparms.h.
double QavrgAcquisitionParms::scopeIntegrationTime [read, write] |
Definition at line 33 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::simulationMode [read, write] |
Definition at line 72 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::status [read, write] |
Definition at line 81 of file qavrgacquisitionparms.h.
Referenced by QavrgAcquisition::findDevices(), and QavrgAcquisition::waitAcquisition().
double QavrgAcquisitionParms::triggerLevel [read, write] |
Definition at line 53 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::triggerSlope [read, write] |
Definition at line 55 of file qavrgacquisitionparms.h.
int QavrgAcquisitionParms::triggerSource [read, write] |
Definition at line 57 of file qavrgacquisitionparms.h.