Component Manual for the Xray-Tracing Package McXtrace, version 3.8.6

9.1  The Progress_bar McXtrace Component

Release: McXtrace 1.0

A simulation progress bar

Identification

Description

An indicator of the progress of the simulation, monitoring the Init, Trace with the achieved percentage, and the Finally section. Intermediate savings (e.g. triggered by USR2 signal) are also shown. This component should be positioned at the very begining of the instrument The profile option will save the intensity and number of events for each component It may be used to evaluate the simulation efficiency.

Example: Progress_bar(percent=10,flag_save=1) AT (0,0,0)

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

profile

str

file name to save the simulation profile in. If set to ””, it is set to the name of the instrument.

”NULL”

percent

0-100

percentage interval between updates. Default is 10%.

10

flag_save

0—1

flag to enable intermediate saving for all monitors

0

minutes

min

time in minutes between updates (Overrides percent flag).

0

Links

Dynamic information output

The component Progress_bar is a special version of an Arm and has no effect on the x-ray. Only one instance of progress bar is allowed - usually it is the very first component of a beamline simulation.

If percent\(>0\) (default is \(10\%\)) the porgress bar prints an update when approximately percent % of the total number of rays have been simulated. If minutes\(>0\) (overrides percen) this update happens approx. every minutes min. If flag_save\(\ne 0\), the update process also includes saving the status of all monitors to disk. This is useful if something is likely to interrupt the progress of long simulations ot avoid loss of data. profile may be set to save the simulation profile to a filename other than the name of the instrument (the default).