Autosave
r3213 | ffr | 2011-06-20 09:41:41 +1000 (Mon, 20 Jun 2011) | 1 line
This commit is contained in:
committed by
Douglas Clowes
parent
ea79b86986
commit
9c93861ae7
@@ -10,6 +10,7 @@ sicsdatafactory new nxscript_data
|
||||
::utility::mkVar eend Text user end_time true entry false true
|
||||
::utility::mkVar timestamp int user time_stamp true entry false true
|
||||
::utility::mkVar data_run_number int user run_number true instrument false true
|
||||
::utility::mkVar autosaveIndex int user autosaveIndex true instrument false true
|
||||
::utility::mkVar save_count int user save_count true experiment true true
|
||||
::utility::mkVar currpoint int user currpoint true experiment true true
|
||||
::utility::mkVar nexus_datatype text user DataType true data false true
|
||||
@@ -346,6 +347,7 @@ proc ::nexus::newfile_collection {args} {
|
||||
}
|
||||
save_count 0
|
||||
currpoint 0
|
||||
autosaveIndex 0
|
||||
file_status $file_states(U)
|
||||
if {$param(-filetype) == "clear"} {
|
||||
::hdb::set_save / false
|
||||
@@ -366,6 +368,7 @@ proc ::nexus::newfile_collection {args} {
|
||||
}
|
||||
::nexus::process_filetype_policy $param(-filetype)
|
||||
nexus_datatype $param(-filetype)
|
||||
file_status "NEWFILE"
|
||||
}
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
@@ -423,12 +426,15 @@ proc ::nexus::newfile_collection {args} {
|
||||
#
|
||||
# A new file will be created if the new file state has been set to true, or
|
||||
# if the current data type doesn't match the current file type.
|
||||
proc ::nexus::save {{point 0}} {
|
||||
proc ::nexus::save {{point 0} {callType "normalsave"}} {
|
||||
if [ catch {
|
||||
::nexus::save_collection -index $point
|
||||
} message ] {
|
||||
return -code error "([info level 0]) $message"
|
||||
}
|
||||
}
|
||||
if {$callType == "normalsave"} {
|
||||
autosaveIndex [expr [SplitReply [data_run_number]] + 1]
|
||||
}
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user