Commit 2e29475a authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by blissadm_ID31@bibhelm
Browse files

SPEC config: replace "def" key with "__default__" to minimize name clash

parent 864716d8
......@@ -12,10 +12,10 @@ def sessionsetup '{
def_dir = sprintf("/data/%s/inhouse/exp", string_tolower(SPECBL))
SESSION["def"]["usr_exp_dir"] = ($# > 0) ? "$1" : "/data/visitor"
SESSION["def"]["ihr_exp_dir"] = ($# > 1) ? "$2" : sprintf("%s/IHR", def_dir)
SESSION["def"]["blc_exp_dir"] = ($# > 2) ? "$3" : sprintf("%s/BLC", def_dir)
SESSION["def"]["sample_id"] = ($# > 3) ? "$4" : "Default"
SESSION["__default__"]["usr_exp_dir"] = ($# > 0) ? "$1" : "/data/visitor"
SESSION["__default__"]["ihr_exp_dir"] = ($# > 1) ? "$2" : sprintf("%s/IHR", def_dir)
SESSION["__default__"]["blc_exp_dir"] = ($# > 2) ? "$3" : sprintf("%s/BLC", def_dir)
SESSION["__default__"]["sample_id"] = ($# > 3) ? "$4" : "Default"
if (!BLISS["device"])
blisssetup
......@@ -39,7 +39,7 @@ def session_get_working_dir() '{
exp_id = SESSION[SPEC]["experiment_id"]
exp_type = session_get_experiment_type(exp_id)
dir_key = sprintf("%s_exp_dir", string_tolower(exp_type))
data_dir = sprintf("%s/%s", SESSION["def"][dir_key], exp_id)
data_dir = sprintf("%s/%s", SESSION["__default__"][dir_key], exp_id)
if (exp_type == "USR")
data_dir = sprintf("%s/%s", data_dir, string_tolower(SPECBL))
return sprintf("%s/%s", data_dir, SESSION[SPEC]["sample_id"])
......@@ -140,7 +140,7 @@ def session_get_spec_file_epoch(spec_file) '{
def session_load_default_settings() '{
SESSION[SPEC]["experiment_id"] = "IHR0000"
SESSION[SPEC]["sample_id"] = SESSION["def"]["sample_id"]
SESSION[SPEC]["sample_id"] = SESSION["__default__"]["sample_id"]
SESSION[SPEC]["scan_nb"] = 0
SESSION[SPEC]["hwconfig_hash"] = session_hwconfig_hash()
SESSION[SPEC]["disabled_objs"] = bliss_list_string_init()
......@@ -184,7 +184,7 @@ def newexperiment_func(args) '{
exit
}
same_exp = (exp_id == SESSION[SPEC]["experiment_id"])
samp_id = SESSION[same_exp ? SPEC : "def"]["sample_id"]
samp_id = SESSION[same_exp ? SPEC : "__default__"]["sample_id"]
samp_id = (narg > 1) ? arga[1] : getval("Enter the sample ID", samp_id)
if (!length(samp_id)) {
print "Invalid sample ID"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment