Example #1
0
VESPERSCCDDetector::VESPERSCCDDetector(const QString &name, const QString &description, QObject *parent)
    : AMDetector(name, description, parent)
{
    units_ = "Counts";

    allControls_ = new AMControlSet(this);

    connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onControlsConnected(bool)));
    connect(allControls_, SIGNAL(controlSetTimedOut()), this, SLOT(onControlsTimedOut()));
    connect(&elapsedTimer_, SIGNAL(timeout()), this, SLOT(onElapsedTimeChanged()));
}
Example #2
0
CLSPGTDetector::CLSPGTDetector(const QString &name, const QString &baseName, AMBeamlineActionItem *toggleOnAction, AMBeamlineActionItem *toggleOffAction, AMOldDetector::ReadMethod readMethod, QObject *parent) :
	CLSPGTDetectorInfo(name, name, parent), AMOldDetector(name, readMethod)
{
	baseName_ = baseName;
	toggleOnAction_ = toggleOnAction;
	toggleOffAction_ = toggleOffAction;
	allControls_ = new AMControlSet();
	poweredOn_ = false;

	dataWaveformControl_ = new AMReadOnlyWaveformBinningPVControl(name+"Spectrum", baseName+":GetChannels", 0, 1024, this);
	dataWaveformControl_->setDescription("SDD Spectrum");
	dataWaveformControl_->setContextKnownDescription("Spectrum");
	hvControl_ = new AMPVControl(name+"HV", baseName+":Bias:VoltActual:fbk", baseName+":Bias:Volt", QString(), this, 0.5);
	hvControl_->setDescription("SDD High Voltage");
	hvControl_->setContextKnownDescription("Voltage");
	integrationTimeControl_ = new AMPVControl(name+"IntegrationTime", "BL1611-ID-1:AddOns:PGTDwellTime", "BL1611-ID-1:AddOns:PGTDwellTime", "", this, 0.1);
	integrationTimeControl_->setDescription("SDD Integration Time");
	integrationTimeControl_->setContextKnownDescription("Integration Time");
	integrationModeControl_ = new AMPVControl(name+"IntegrationMode", "BL1611-ID-1:AddOns:PGTDwellMode", "BL1611-ID-1:AddOns:PGTDwellMode", "", this, 0.1);
	integrationModeControl_->setDescription("SDD Integration Mode");
	integrationModeControl_->setContextKnownDescription("Integration Mode");
	dwellTriggerControl_ = new AMPVControl(name+"DwellTrigger", "BL1611-ID-1:AddOns:PGTDwellTrigger", "BL1611-ID-1:AddOns:PGTDwellTrigger", "", this, 0.1);
	dwellTriggerControl_->setDescription("SDD Dwell Trigger");
	dwellTriggerControl_->setContextKnownDescription("Dwell Trigger");

	AMReadOnlyPVControl *tmpControl = qobject_cast<AMReadOnlyPVControl*>(dataWaveformControl_);
	spectrumDataSource_ = new AM1DProcessVariableDataSource(tmpControl->readPV(), "Spectrum", this);

	allControls_->addControl(dataWaveformControl_);
	allControls_->addControl(hvControl_);
	allControls_->addControl(integrationTimeControl_);
	allControls_->addControl(integrationModeControl_);
	allControls_->addControl(dwellTriggerControl_);

	connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onControlsConnected(bool)));
	connect(allControls_, SIGNAL(controlSetTimedOut()), this, SLOT(onControlsTimedOut()));
	connect(signalSource(), SIGNAL(connected(bool)), this, SLOT(onSettingsControlValuesChanged()));
	connect(signalSource(), SIGNAL(connected(bool)), this, SIGNAL(connected(bool)));
	connect(dataWaveformControl_, SIGNAL(valueChanged(double)), this, SLOT(onReadingsControlValuesChanged()));
	connect(tmpControl, SIGNAL(valueChanged(double)), this, SIGNAL(totalCountsChanged(double)));
	connect(hvControl_, SIGNAL(valueChanged(double)), this, SLOT(onSettingsControlValuesChanged()));
	connect(integrationTimeControl_, SIGNAL(valueChanged(double)), this, SLOT(onSettingsControlValuesChanged()));
	connect(integrationModeControl_, SIGNAL(valueChanged(double)), this, SLOT(onSettingsControlValuesChanged()));
	connect(dwellTriggerControl_, SIGNAL(valueChanged(double)), this, SLOT(onDwellTriggerChanged(double)));

	if(isConnected()){
		onReadingsControlValuesChanged();
		onSettingsControlValuesChanged();
	}
}
Example #3
0
CLSPGTDetectorV2::CLSPGTDetectorV2(const QString &name, const QString &description, const QString &baseName, QObject *parent) :
	AMDetector(name, description, parent)
{
	baseName_ = baseName;
	units_ = "Counts";

	allControls_ = new AMControlSet(this);
	statusControl_ = new AMReadOnlyPVControl(name%"Status", baseName%":GetAcquire", this);
	integrationTimeControl_ = new AMPVControl(name%"IntegrationTime", "BL1611-ID-1:AddOns:PGTDwellTime", "BL1611-ID-1:AddOns:PGTDwellTime", "", this, 0.001);
	integrationTimeControl_->setDescription("SDD Integration Time");
	integrationTimeControl_->setContextKnownDescription("Integration Time");
	integrationModeControl_ = new AMPVControl(name%"IntegrationMode", "BL1611-ID-1:AddOns:PGTDwellMode", "BL1611-ID-1:AddOns:PGTDwellMode", "", this, 0.1);
	integrationModeControl_->setDescription("SDD Integration Mode");
	integrationModeControl_->setContextKnownDescription("Integration Mode");
	startAcquisitionControl_ = new AMPVControl(name%"StartAcquisition", "BL1611-ID-1:AddOns:PGTDwellTrigger", "BL1611-ID-1:AddOns:PGTDwellTrigger", "", this, 0.1);
	startAcquisitionControl_->setDescription("SDD Start Acquisition");
	startAcquisitionControl_->setContextKnownDescription("Start Acquisition");
	spectrumControl_ = new AMReadOnlyPVControl(name%"Spectrum", baseName%":GetChannels", this);
	spectrumControl_->setDescription("SDD Spectrum");
	spectrumControl_->setContextKnownDescription("Spectrum");
	binnedSpectrumControl_ = new AMReadOnlyWaveformBinningPVControl(name%"BinnedSpectrum", baseName%":GetChannels", 0, 1024, this);
	clearControl_ = new AMPVControl(name%"Clear", baseName%":ClearSpectrum.PROC", baseName%":ClearSpectrum.PROC", QString(), this, 0.1);
	powerControl_ = new AMPVControl(name%"PowerOn", baseName%":Power:fbk", baseName%":Power", QString(), this, 0.1);
	voltageControl_ = new AMPVControl(name%"HV", baseName+":Bias:VoltActual:fbk", baseName+":Bias:Volt", QString(), this, 0.5);
	voltageControl_->setDescription("SDD High Voltage");
	voltageControl_->setContextKnownDescription("Voltage");

	allControls_->addControl(statusControl_);
	allControls_->addControl(integrationTimeControl_);
	allControls_->addControl(integrationModeControl_);
	allControls_->addControl(startAcquisitionControl_);
	allControls_->addControl(spectrumControl_);
	allControls_->addControl(binnedSpectrumControl_);
	allControls_->addControl(clearControl_);
	allControls_->addControl(powerControl_);
	allControls_->addControl(voltageControl_);

	connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onControlsConnected(bool)));
	connect(allControls_, SIGNAL(controlSetTimedOut()), this, SLOT(onControlsTimedOut()));

	connect(integrationTimeControl_, SIGNAL(valueChanged(double)), this, SIGNAL(acquisitionTimeChanged(double)));
	connect(integrationModeControl_, SIGNAL(valueChanged(double)), this, SIGNAL(acquisitionModeChanged()));
	connect(statusControl_, SIGNAL(valueChanged(double)), this, SLOT(onStatusControlChanged(double)));

	AMReadOnlyPVControl *tmpControl = qobject_cast<AMReadOnlyPVControl*>(spectrumControl_);
	spectrumDataSource_ = new AM1DProcessVariableDataSource(tmpControl->readPV(), "Spectrum", this);
}
Example #4
0
CLSQE65000Detector::CLSQE65000Detector(const QString &name, const QString &description, const QString &baseName, QObject *parent) :
	AMDetector(name, description, parent)
{
	baseName_ = baseName;
	units_ = "Counts";

	data_ = new double[1024];
	for(int x = 0; x < 1024; x++)
		data_[x] = 0;

	allControls_ = new AMControlSet(this);

	spectrumControl_ = new AMReadOnlyPVControl(name%"Spectrum", baseName%":DarkCorrectedSpectra", this);
	spectrumControl_->setDescription("QE 65000 Spectrum");
	spectrumControl_->setContextKnownDescription("Spectrum");
	binnedSpectrumControl_ = new AMReadOnlyWaveformBinningPVControl(name%"BinnedSpectrum", baseName%":DarkCorrectedSpectra", 0, 1024, this);
	((AMReadOnlyWaveformBinningPVControl*)binnedSpectrumControl_)->setAttemptDouble(true);
	integrationTimeControl_ = new AMPVControl(name%"IntegrationTime", baseName%":IntegrationTime:Value", baseName%":IntegrationTime:Value", "", this, 0.1);
	integrationTimeControl_->setDescription("QE 65000 Integration Time");
	integrationTimeControl_->setContextKnownDescription("Integration Time");

	startAcquisitionControl_ = new AMPVControl(name%"StartAcquisition", baseName%":Acquire", baseName%":Acquire", "", this, 0.1);
	startAcquisitionControl_->setDescription("QE 65000 Start Acquisition");
	startAcquisitionControl_->setContextKnownDescription("Start Acquisition");
	statusControl_ = new AMReadOnlyPVControl(name+"DwellStatus", baseName+":Acquiring", this);
	statusControl_->setDescription("QE 65000 Status");
	statusControl_->setContextKnownDescription("Status");

	allControls_->addControl(spectrumControl_);
	allControls_->addControl(binnedSpectrumControl_);
	allControls_->addControl(integrationTimeControl_);
	allControls_->addControl(startAcquisitionControl_);
	allControls_->addControl(statusControl_);

	connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onControlsConnected(bool)));
	connect(allControls_, SIGNAL(controlSetTimedOut()), this, SLOT(onControlsTimedOut()));

	connect(spectrumControl_, SIGNAL(valueChanged(double)), this, SLOT(onSpectrumControlChanged(double)));
	connect(integrationTimeControl_, SIGNAL(valueChanged(double)), this, SIGNAL(acquisitionTimeChanged(double)));
	connect(statusControl_, SIGNAL(valueChanged(double)), this, SLOT(onStatusControlChanged(double)));

	AMReadOnlyPVControl *tmpControl = qobject_cast<AMReadOnlyPVControl*>(spectrumControl_);
	spectrumDataSource_ = new AM1DProcessVariableDataSource(tmpControl->readPV(), "Spectrum", this);
}
CLSOceanOptics65000Detector::CLSOceanOptics65000Detector(const QString &name, const QString &baseName, AMOldDetector::ReadMethod readMethod, QObject *parent) :
    CLSOceanOptics65000DetectorInfo(name, name, parent), AMOldDetector(name, readMethod)
{
    baseName_ = baseName;
    allControls_ = new AMControlSet();

    dataWaveformControl_ = new AMReadOnlyWaveformBinningPVControl(name+"Spectrum", baseName+":DarkCorrectedSpectra", 0, 1024, this);
    dataWaveformControl_->setDescription("OceanOptics 65000 Spectrum");
    dataWaveformControl_->setContextKnownDescription("Spectrum");
    integrationTimeControl_ = new AMPVControl(name+"IntegrationTime", baseName+":IntegrationTime:Value", baseName+":IntegrationTime:Value", "", this, 0.1);
    integrationTimeControl_->setDescription("OceanOptics 65000 Integration Time");
    integrationTimeControl_->setContextKnownDescription("Integration Time");

    dwellTriggerControl_ = new AMPVControl(name+"DwellTrigger", baseName+":Acquire", baseName+":Acquire", "", this, 0.1);
    dwellTriggerControl_->setDescription("OceanOptics 65000 Dwell Trigger");
    dwellTriggerControl_->setContextKnownDescription("Dwell Trigger");
    dwellStateControl_ = new AMReadOnlyPVControl(name+"DwellStatus", baseName+":Acquiring", this);
    dwellStateControl_->setDescription("OceanOptics 65000 Dwell Status");
    dwellStateControl_->setContextKnownDescription("Dwell Status");

    allControls_->addControl(dataWaveformControl_);
    allControls_->addControl(integrationTimeControl_);
    allControls_->addControl(dwellTriggerControl_);
    allControls_->addControl(dwellStateControl_);

    AMReadOnlyWaveformBinningPVControl *tmpControl = qobject_cast<AMReadOnlyWaveformBinningPVControl*>(dataWaveformControl_);
    tmpControl->setAttemptDouble(true);
    spectrumDataSource_ = new AM1DProcessVariableDataSource(tmpControl->readPV(), "Spectrum", this);

    connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onControlsConnected(bool)));
    connect(allControls_, SIGNAL(controlSetTimedOut()), this, SLOT(onControlsTimedOut()));
    connect(signalSource(), SIGNAL(connected(bool)), this, SLOT(onSettingsControlValuesChanged()));
    connect(signalSource(), SIGNAL(connected(bool)), this, SIGNAL(connected(bool)));
    connect(dataWaveformControl_, SIGNAL(valueChanged(double)), this, SLOT(onReadingsControlValuesChanged()));
    connect(integrationTimeControl_, SIGNAL(valueChanged(double)), this, SLOT(onSettingsControlValuesChanged()));
    connect(dwellStateControl_, SIGNAL(valueChanged(double)), this, SLOT(onStatusChanged(double)));
    connect(tmpControl, SIGNAL(valueChanged(double)), this, SIGNAL(totalCountsChanged(double)));
}