Skip to content
Snippets Groups Projects

Resolve "Add the proposal session name"

Merged Wout De Nolf requested to merge 52-add-the-proposal-session-name into master
Files
2
@@ -109,9 +109,9 @@ class MetaExperiment (tango.LatestDeviceImpl):
self.proxy = tango.DeviceProxy(self.get_name())
# mimic write_hardware without side effects
db = tango.Util.instance().get_database()
attr_map = db.get_device_attribute_property(self.get_name(),['proposal','session','sample','dataRoot'])
self.attr_proposalName_read = attr_map['proposal'].get('__value',[''])[0]
self.attr_proposalSession_read = attr_map['session'].get('__value',[''])[0]
attr_map = db.get_device_attribute_property(self.get_name(),['proposalName','proposalSession','sample','dataRoot'])
self.attr_proposalName_read = attr_map['proposalName'].get('__value',[''])[0]
self.attr_proposalSession_read = attr_map['proposalSession'].get('__value',[''])[0]
self.attr_sample_read = attr_map['sample'].get('__value',[''])[0]
self.attr_dataRoot_read = attr_map['dataRoot'].get('__value',[''])[0]
if self.attr_proposalName_read:
@@ -141,15 +141,15 @@ class MetaExperiment (tango.LatestDeviceImpl):
# MetaExperiment read/write attribute methods
#--------------------------------------------------------------------------
def read_proposal(self, attr):
self.debug_stream("In read_proposal()")
def read_proposalName(self, attr):
self.debug_stream("In read_proposalName()")
#----- PROTECTED REGION ID(MetaExperiment.proposal_read) ENABLED START -----#
attr.set_value(self.attr_proposalName_read)
#----- PROTECTED REGION END -----# // MetaExperiment.proposal_read
def write_proposal(self, attr):
self.debug_stream("In write_proposal()")
def write_proposalName(self, attr):
self.debug_stream("In write_proposalName()")
data = attr.get_write_value()
#----- PROTECTED REGION ID(MetaExperiment.proposal_write) ENABLED START -----#
# new proposal (investigation) registration, if not empty
@@ -162,19 +162,19 @@ class MetaExperiment (tango.LatestDeviceImpl):
self.UpdateState()
#----- PROTECTED REGION END -----# // MetaExperiment.proposal_write
def read_session(self, attr):
self.debug_stream("In read_session()")
#----- PROTECTED REGION ID(MetaExperiment.read_session) ENABLED START -----#
def read_proposalSession(self, attr):
self.debug_stream("In read_proposalSession()")
#----- PROTECTED REGION ID(MetaExperiment.read_proposalSession) ENABLED START -----#
attr.set_value(self.attr_proposalSession_read)
#----- PROTECTED REGION END -----# // MetaExperiment.session_read
def write_session(self, attr):
self.debug_stream("In write_session()")
def write_proposalSession(self, attr):
self.debug_stream("In write_proposalSession()")
data = attr.get_write_value()
#----- PROTECTED REGION ID(MetaExperiment.session_write) ENABLED START -----#
self.attr_proposalSession_read = data
self.push_change_event("ProposalSession", self.attr_ProposalSession_read)
self.push_change_event("ProposalSession", self.attr_proposalSession_read)
self.proxy.write_attribute("sample", "please enter")
self.proxy.write_attribute("dataRoot", "/data/visitor/")
self.UpdateState()
@@ -334,14 +334,14 @@ class MetaExperimentClass(tango.DeviceClass):
# Attribute definitions
attr_list = {
'proposal':
'proposalName':
[[tango.DevString,
tango.SCALAR,
tango.READ_WRITE],
{
'Memorized':"true_without_hard_applied"
} ],
'session':
'proposalSession':
[[tango.DevString,
tango.SCALAR,
tango.READ_WRITE],
Loading