SICS-695 Save a named link for scan variables and other objects if required.
If a SICS object has a "linkname" attribute then that name will be used when making links in the data file.
This commit is contained in:
committed by
Ferdi Franceschini
parent
5df895cc76
commit
58e35efba3
@@ -151,7 +151,11 @@ proc ::nexus::link {args} {
|
||||
::hdb::set_save / true
|
||||
::hdb::set_save $::histogram_memory::HP_HMM false
|
||||
set ::counter::HP_BM [getatt monitor_counts hdb_path]
|
||||
hsetprop $::counter::HP_BM link data_set
|
||||
if [sicslist exists monitor_counts linkname] {
|
||||
hsetprop $::counter::HP_BM link data_set [getatt monitor_counts linkname]
|
||||
} else {
|
||||
hsetprop $::counter::HP_BM link data_set
|
||||
}
|
||||
hsetprop $::counter::HP_BM @signal 1
|
||||
set nvars [SplitReply [bmonscan noscanvar]]
|
||||
if {$nvars == 0} {
|
||||
@@ -160,7 +164,11 @@ proc ::nexus::link {args} {
|
||||
for { set i 0 } { $i < $nvars } { incr i } {
|
||||
set axis_name [lindex [split [lindex [split [bmonscan getvarpar $i]] 0] "."] 1]
|
||||
set node_name [SplitReply [sicslist $axis_name hdb_path]]
|
||||
hsetprop $node_name link data_set
|
||||
if [sicslist exists $axis_name linkname] {
|
||||
hsetprop $node_name link data_set [getatt $axis_name linkname]
|
||||
} else {
|
||||
hsetprop $node_name link data_set
|
||||
}
|
||||
lappend axes_list $axis_name
|
||||
}
|
||||
set axes [join $axes_list ":"]
|
||||
@@ -173,10 +181,18 @@ proc ::nexus::link {args} {
|
||||
::histogram_memory::set_axes $filetype
|
||||
}
|
||||
foreach sobj [sicslist link data_set] {
|
||||
hsetprop [getatt $sobj hdb_path] link data_set
|
||||
if [sicslist exists $sobj linkname] {
|
||||
hsetprop [getatt $sobj hdb_path] link data_set [getatt $sobj linkname]
|
||||
} else {
|
||||
hsetprop [getatt $sobj hdb_path] link data_set
|
||||
}
|
||||
}
|
||||
foreach sobj [sicslist link parameters_group] {
|
||||
hsetprop [getatt $sobj hdb_path] link parameters_group
|
||||
if [sicslist exists $sobj linkname] {
|
||||
hsetprop [getatt $sobj hdb_path] link parameters_group [getatt $sobj linkname]
|
||||
} else {
|
||||
hsetprop [getatt $sobj hdb_path] link parameters_group
|
||||
}
|
||||
}
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
|
||||
Reference in New Issue
Block a user