Пример #1
0
SGMXASScanConfiguration::SGMXASScanConfiguration(QObject *parent) : AMXASScanConfiguration(parent) , SGMScanConfiguration()
{
	xasRegions()->setEnergyControl(SGMBeamline::sgm()->energy());
	//regions_->setDefaultTimeControl(SGMBeamline::sgm()->scalerIntegrationTime());
	//regions_->setDefaultTimeControl(SGMBeamline::sgm()->picoammeterDwellTime());
	regions_->setDefaultTimeControl(SGMBeamline::sgm()->masterDwell());

	regions_->setSensibleRange(200, 2000);
	regions_->setDefaultUnits(" eV");
	regions_->setDefaultTimeUnits(" s");
	fluxResolutionSet_ = SGMBeamline::sgm()->fluxResolutionSet();
	trackingSet_ = SGMBeamline::sgm()->trackingSet();

	xasDetectors_ = SGMBeamline::sgm()->XASDetectors();
	connect(SGMBeamline::sgm(), SIGNAL(detectorAvailabilityChanged(AMOldDetector*,bool)), this, SLOT(detectorAvailabilityChanged(AMOldDetector*,bool)));

	allDetectors_ = new AMOldDetectorSet(this);

	for(int x = 0; x < SGMBeamline::sgm()->feedbackDetectors()->count(); x++)
		allDetectors_->addDetector(SGMBeamline::sgm()->feedbackDetectors()->detectorAt(x), true);

	for(int x = 0; x < xasDetectors_->count(); x++)
		allDetectors_->addDetector(xasDetectors_->detectorAt(x), xasDetectors_->isDefaultAt(x));

	xasDetectorsCfg_ = xasDetectors_->toInfoSet();

	// default channels removed. Need to come up with new replacement system to create default analysis blocks instead.

	emit exitSlitGapChanged(exitSlitGap_);
	emit gratingChanged(grating_);
	emit trackingGroupChanged(trackingGroup_);
}
Пример #2
0
void SGMXASScanConfiguration2013View::setTrackingSet(AMControlSet *trackingSet){
	trackingSet_ = trackingSet;
	if(!trackingSetView_){
		trackingSetView_ = new AMControlSetView(trackingSet_, true);
		bottomGL_->addWidget(trackingSetView_, 0, 2);

		connect(trackingSetView_, SIGNAL(configValuesChanged(AMControlInfoList)), configuration_->dbObject(), SLOT(setTrackingGroup(AMControlInfoList)));
		connect(configuration_->dbObject(), SIGNAL(trackingGroupChanged()), this, SLOT(onTrackingGroupChanged()));
	}
}
Пример #3
0
bool SGMXASScanConfiguration::setExitSlitTracking(bool exitSlitTracking){
	bool oldExitSlit = exitSlitTracking_;
	bool rVal = SGMScanConfiguration::setExitSlitTracking(exitSlitTracking);
	if(rVal && oldExitSlit != exitSlitTracking_){
		emit undulatorTrackingChanged(exitSlitTracking_);
		emit trackingGroupChanged(trackingGroup_);
		setModified(true);
		emit configurationChanged();
	}
	return rVal;
}
Пример #4
0
bool SGMXASScanConfiguration::setMonoTracking(bool monoTracking){
	bool oldMono = monoTracking_;
	bool rVal = SGMScanConfiguration::setMonoTracking(monoTracking);
	if(rVal && oldMono != monoTracking_){
		emit undulatorTrackingChanged(monoTracking_);
		emit trackingGroupChanged(trackingGroup_);
		setModified(true);
		emit configurationChanged();
	}
	return rVal;
}
SGMXASScanConfiguration2013::SGMXASScanConfiguration2013(const SGMXASScanConfiguration2013 &original) :
	AMStepScanConfiguration(original), SGMScanConfiguration2013(original)
{
	detectorConfigurations_ = original.detectorConfigurations();
	setTrackingGroup(original.trackingGroup());
	setFluxResolutionGroup(original.fluxResolutionGroup());
	connect(SGMBeamline::sgm()->exitSlitGap(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->grating(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->harmonic(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->undulatorTracking(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->monoTracking(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->exitSlitTracking(), SIGNAL(valueChanged(double)), this,SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(exitSlitGapChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(gratingChanged(SGMBeamlineInfo::sgmGrating)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(harmonicChanged(SGMBeamlineInfo::sgmHarmonic)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(trackingGroupChanged()), this, SLOT(checkIfMatchesBeamline()));

}
SGMXASScanConfiguration2013::SGMXASScanConfiguration2013(QObject *parent) :
	AMStepScanConfiguration(parent), SGMScanConfiguration2013()
{
	AMScanAxisRegion *region = new AMScanAxisRegion;
	AMScanAxis *axis = new AMScanAxis(AMScanAxis::StepAxis, region);
	appendScanAxis(axis);

	connect(SGMBeamline::sgm()->exitSlitGap(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->grating(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->harmonic(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->undulatorTracking(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->monoTracking(), SIGNAL(valueChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(SGMBeamline::sgm()->exitSlitTracking(), SIGNAL(valueChanged(double)), this,SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(exitSlitGapChanged(double)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(gratingChanged(SGMBeamlineInfo::sgmGrating)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(harmonicChanged(SGMBeamlineInfo::sgmHarmonic)), this, SLOT(checkIfMatchesBeamline()));
	connect(this->dbObject(), SIGNAL(trackingGroupChanged()), this, SLOT(checkIfMatchesBeamline()));
}
Пример #7
0
bool SGMXASScanConfiguration::setTrackingGroup(AMControlInfoList trackingList){
	bool oldUndulator = undulatorTracking_;
	bool oldMono = monoTracking_;
	bool oldExitSlit = exitSlitTracking_;

	bool rVal = SGMScanConfiguration::setTrackingGroup(trackingList);
	if(rVal){
		emit trackingGroupChanged(trackingList);
		if(oldUndulator != undulatorTracking_)
			emit undulatorTrackingChanged(undulatorTracking_);
		if(oldMono != monoTracking_)
			emit monoTrackingChanged(monoTracking_);
		if(oldExitSlit != exitSlitTracking_)
			emit exitSlitTrackingChanged(exitSlitTracking_);
		setModified(true);
		emit configurationChanged();
	}
	return rVal;
}