diff --git a/mcstas-comps/union/Union_abs_logger_1D_space.comp b/mcstas-comps/union/Union_abs_logger_1D_space.comp index cd1cb0ff4..34b975f5b 100644 --- a/mcstas-comps/union/Union_abs_logger_1D_space.comp +++ b/mcstas-comps/union/Union_abs_logger_1D_space.comp @@ -67,6 +67,7 @@ * order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -81,7 +82,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space SETTING PARAMETERS(string target_geometry="NULL", yheight, n=100, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -519,10 +520,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value, - this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max, - this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0], - &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename); + if (!nowritefile) { + DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value, + this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max, + this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0], + &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_event.comp b/mcstas-comps/union/Union_abs_logger_1D_space_event.comp index 5fdd6587c..758e6d50f 100644 --- a/mcstas-comps/union/Union_abs_logger_1D_space_event.comp +++ b/mcstas-comps/union/Union_abs_logger_1D_space_event.comp @@ -77,6 +77,7 @@ * order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -90,7 +91,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space_event SETTING PARAMETERS(string target_geometry="NULL", yheight, int n, int fake_event=0, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -615,7 +616,9 @@ TRACE SAVE %{ - Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars)); + if (!nowritefile) { + Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars)); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp index b321f4c2d..0a70dac09 100644 --- a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp +++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp @@ -70,6 +70,7 @@ * order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space_tof SETTING PARAMETERS(string target_geometry="NULL", yheight, n=0.2, time_min=0, time_max=1, time_bins=100, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -580,10 +581,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, - this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, - this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, - *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, + this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, + this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, + *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp index 4469011a5..23caf39d6 100644 --- a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp +++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp @@ -101,6 +101,7 @@ * order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -119,7 +120,7 @@ SETTING PARAMETERS(string target_geometry="NULL", lambda_m_min=-1, lambda_m_max=-1, lambda_m_bins=-1, lambda_t_min=-1, lambda_t_max=-1, lambda_t_bins=-1, relative_measured=0, relative_min=0.5, relative_max=1.5, relative_bins=100, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -784,10 +785,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, - this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, - this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, - *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, + this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, + this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, + *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_1D_time.comp b/mcstas-comps/union/Union_abs_logger_1D_time.comp index 4023fe0cf..5fac10a8a 100644 --- a/mcstas-comps/union/Union_abs_logger_1D_time.comp +++ b/mcstas-comps/union/Union_abs_logger_1D_time.comp @@ -71,6 +71,7 @@ * init: [string] name of Union_init component (typically "init", default) * time_min: [s] Minimum time to log * time_max: [s] Maximum time to log +* nowritefile: [1] If set, logger will skip writing to disk * * OUTPUT PARAMETERS: * @@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_time DEFINITION PARAMETERS () SETTING PARAMETERS(string target_geometry="NULL", time_min=0, time_max, n=100, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) OUTPUT PARAMETERS () /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -503,10 +504,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value, - this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max, - this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0], - &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename); + if (!nowritefile) { + DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value, + this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max, + this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0], + &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_2D_space.comp b/mcstas-comps/union/Union_abs_logger_2D_space.comp index 69c24cf64..50d62142f 100644 --- a/mcstas-comps/union/Union_abs_logger_2D_space.comp +++ b/mcstas-comps/union/Union_abs_logger_2D_space.comp @@ -77,6 +77,7 @@ * order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -92,7 +93,7 @@ DEFINE COMPONENT Union_abs_logger_2D_space SETTING PARAMETERS(string target_geometry="NULL", string D_direction_1="x", D1_min=-0.2, D1_max=5, n1=0.2, string D_direction_2="z", D2_min=-0.2, D2_max=5, n2=0.2, - string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -641,10 +642,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, - this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, - this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, - *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2, + this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max, + this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N, + *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_event.comp b/mcstas-comps/union/Union_abs_logger_event.comp index 3d325c0f2..36b4b28b6 100644 --- a/mcstas-comps/union/Union_abs_logger_event.comp +++ b/mcstas-comps/union/Union_abs_logger_event.comp @@ -73,6 +73,7 @@ * ybins: [1] Number of bins along y in logging volume * zbns: [1] Number of bins along z in logging volume * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -87,7 +88,7 @@ DEFINE COMPONENT Union_abs_logger_event SETTING PARAMETERS(string target_geometry="NULL", string filename="NULL", xwidth=0, xbins=0, yheight=0, ybins=0, zdepth=0, zbins=0, - order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init") + order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -693,7 +694,9 @@ TRACE SAVE %{ - Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars); + if (!nowritefile) { + Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars); + } %} FINALLY diff --git a/mcstas-comps/union/Union_abs_logger_nD.comp b/mcstas-comps/union/Union_abs_logger_nD.comp index d765f1e0f..85f2623e9 100644 --- a/mcstas-comps/union/Union_abs_logger_nD.comp +++ b/mcstas-comps/union/Union_abs_logger_nD.comp @@ -102,7 +102,7 @@ * username9: [str] Name assigned to User9 * restore_neutron: [0|1] Not functional for Union version * geometry: [str] Name of an OFF file to specify a complex geometry detector -* nowritefile: [1] Not functional for Union version +* nowritefile: [1] If set, logger will skip writing to disk * nexus_bins: [1] NeXus mode only: store component BIN information
(-1 disable, 0 enable for list mode monitor, 1 enable for any montor) * * OUTPUT PARAMETERS: diff --git a/mcstas-comps/union/Union_logger_1D.comp b/mcstas-comps/union/Union_logger_1D.comp index d2a0eccf9..e859b8893 100644 --- a/mcstas-comps/union/Union_logger_1D.comp +++ b/mcstas-comps/union/Union_logger_1D.comp @@ -58,6 +58,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -70,7 +71,7 @@ DEFINE COMPONENT Union_logger_1D -SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init") +SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -588,10 +589,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value, - this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins, - &this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0], - this_storage.Detector_1D.Filename); + if (!nowritefile) { + DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value, + this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins, + &this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0], + this_storage.Detector_1D.Filename); + } %} diff --git a/mcstas-comps/union/Union_logger_2DQ.comp b/mcstas-comps/union/Union_logger_2DQ.comp index 5fbb7104b..dfbd3bcac 100644 --- a/mcstas-comps/union/Union_logger_2DQ.comp +++ b/mcstas-comps/union/Union_logger_2DQ.comp @@ -60,6 +60,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, uwsing the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -76,7 +77,7 @@ SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", string Q_direction_1="x", Q1_min=-5,Q1_max=5, n1=90, string Q_direction_2="z", Q2_min=-5,Q2_max=5, n2=90, string filename="NULL", order_total=0, order_volume=0, - order_volume_process=0,logger_conditional_extend_index=-1, string init="init") + order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -669,10 +670,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, - this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, - this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, - *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, + this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, + this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, + *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_logger_2D_kf.comp b/mcstas-comps/union/Union_logger_2D_kf.comp index 1255d5db5..fd8e21413 100644 --- a/mcstas-comps/union/Union_logger_2D_kf.comp +++ b/mcstas-comps/union/Union_logger_2D_kf.comp @@ -61,6 +61,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -73,7 +74,7 @@ DEFINE COMPONENT Union_logger_2D_kf -SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init") +SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -671,10 +672,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, - this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, - this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, - *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, + this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, + this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, + *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_logger_2D_kf_time.comp b/mcstas-comps/union/Union_logger_2D_kf_time.comp index 2e13a9d53..30c029236 100644 --- a/mcstas-comps/union/Union_logger_2D_kf_time.comp +++ b/mcstas-comps/union/Union_logger_2D_kf_time.comp @@ -65,6 +65,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -77,7 +78,7 @@ DEFINE COMPONENT Union_logger_2D_kf_time -SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, time_min=0, time_max=1,string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init") +SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, time_min=0, time_max=1,string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -744,14 +745,16 @@ SAVE %{ // Write to disk - for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { - sprintf (number_string, "%d", loop_index); - sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); + if (!nowritefile) { + for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { + sprintf (number_string, "%d", loop_index); + sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); - DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, - this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, - this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], - &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, + this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, + this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], + &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + } } %} diff --git a/mcstas-comps/union/Union_logger_2D_space.comp b/mcstas-comps/union/Union_logger_2D_space.comp index b6e6353ae..5ca1c7d43 100644 --- a/mcstas-comps/union/Union_logger_2D_space.comp +++ b/mcstas-comps/union/Union_logger_2D_space.comp @@ -62,6 +62,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -77,7 +78,7 @@ DEFINE COMPONENT Union_logger_2D_space SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", string D_direction_1="x", D1_min=-5, D1_max=5, n1=90, string D_direction_2="z", D2_min=-5, D2_max=5, n2=90, - string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init") + string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -704,10 +705,12 @@ TRACE SAVE %{ // Write to disk - DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, - this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, - this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, - *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + if (!nowritefile) { + DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2, + this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max, + this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p, + *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename); + } %} FINALLY diff --git a/mcstas-comps/union/Union_logger_2D_space_time.comp b/mcstas-comps/union/Union_logger_2D_space_time.comp index 30186e912..dde39c985 100644 --- a/mcstas-comps/union/Union_logger_2D_space_time.comp +++ b/mcstas-comps/union/Union_logger_2D_space_time.comp @@ -65,6 +65,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] Name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -77,7 +78,7 @@ DEFINE COMPONENT Union_logger_2D_space_time -SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-5,D1_max=5,D2_min=-5,D2_max=5,time_min=0,time_max=1,string D_direction_1="x", string D_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init") +SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-5,D1_max=5,D2_min=-5,D2_max=5,time_min=0,time_max=1,string D_direction_1="x", string D_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -767,14 +768,16 @@ SAVE %{ // Write to disk - for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { - sprintf (number_string, "%d", loop_index); - sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); + if (!nowritefile) { + for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { + sprintf (number_string, "%d", loop_index); + sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); - DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, - this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, - this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], - &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, + this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, + this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], + &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + } } %} diff --git a/mcstas-comps/union/Union_logger_3D_space.comp b/mcstas-comps/union/Union_logger_3D_space.comp index cc6980e42..96b5e6821 100644 --- a/mcstas-comps/union/Union_logger_3D_space.comp +++ b/mcstas-comps/union/Union_logger_3D_space.comp @@ -67,6 +67,7 @@ * order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process * logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n * init: [string] name of Union_init component (typically "init", default) +* nowritefile: [1] If set, logger will skip writing to disk * * CALCULATED PARAMETERS: * @@ -79,7 +80,7 @@ DEFINE COMPONENT Union_logger_3D_space -SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-1,D1_max=1,D2_min=-1,D2_max=1,D3_min=-1,D3_max=1,string D_direction_1="x", string D_direction_2="z", string D_direction_3="z",string filename="NULL", n1=90, n2=90, n3=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init") +SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-1,D1_max=1,D2_min=-1,D2_max=1,D3_min=-1,D3_max=1,string D_direction_1="x", string D_direction_2="z", string D_direction_3="z",string filename="NULL", n1=90, n2=90, n3=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0) /* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */ @@ -828,14 +829,16 @@ SAVE %{ // Write to disk - for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { - sprintf (number_string, "%d", loop_index); - sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); + if (!nowritefile) { + for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) { + sprintf (number_string, "%d", loop_index); + sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string); - DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, - this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, - this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], - &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2, + this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max, + this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0], + &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename); + } } %}