# FOCUS Data Storage

FOCUS writes data into portable binary NeXus files. The scheme implemented involves opening a new file for any run and updating this file at predefined intervalls during counting operations. All this is commonly handled automatically by the count command. However, data file writing can be initiated and configured manually from the command line through the following commands:

storefocus start
  Write a new data file
storefocus update
  Updates the current data file.
storefocus intervall
  prints the current update intervall to use during counting. Units is minutes.
storefocus intervall newval
  Sets the update intervall to newval minutes.
killfile
  This command will overwrite the last data file written and thus effectively erase it. Therefore this command requires manager privilege.

FOCUS has three detector banks which may not all be active at all times. Thus a way is needed to tell SICS about the configuration of the day. This is also done through ths storefocus command. There are three parameters, upper, middle and lower which can be either on (value greater 0) or off (value less then or equal to 0). The value can be inquired with storefocus par. For example storefocus middle prints the flag for the middle detector bank. With storefocus par val a new value for the parameter is set. For example storefocus lower 1 switches the lower detector bank on. These commands are usually used in the configuration file and require manager privilege.