Starting alibava

2.1. Setting up the environment

alibava-gui assumes that your computer has the package udev™. When installing alibava-gui as a super user, a new group will be created named alibava. Also a new udev rule will be added granting read/write permissions to the members of that group. In order to grant any user with read/write permissions on the USB bus you will have to make him/her a member of the alibava group. This must be made as super user by typing the following

/usr/sbin/usermod -G alibava {your user name}

For that to work the installation should be made as super user. If you installed alibava-gui withour root privilegues, then you will have to create the alibava group and install the udev rules manually as root by typing

/usr/sbin/groupadd -f alibava

followed by the execution the script install-udev.sh. The script can be found on the top folder of the distribution bundle.

To check that the installation has been done properly, plug in an Alibava card on your USB hub and check that there is a file called /dev/alibava0. If this is so the udev rules are properly installed and the members of the alibava group will be able to read from and write to the device. Also, alibava-gui will automatically detect in which port the Alibava card is connected. If alibava-gui is not able to figure out that, it will quit unless you force the program to try to open another device at the command line (see Section 2.2 ― How to launch the program).

2.1.1. Old alibava-gui versions

In alibava-gui version older than 0.1.6-3 the program was not able to detect the Alibava card and no udev rules were provided. In that case one was forced to do things manually. In order to allow alibava-gui to read from and write to the device there were a number of steps to follow which are explained below.

When the Alibava card is plugged in the computer, the driver decides which port to use and alibava-gui did not have any means of discovering which one it was in an automatic way.

After plugging in the card, one should type

dmesg

and look for the port that the driver has selected. The name is usually /dev/ttyUSBn where n is 0 most of the times. Another problem encountered quite often is that a normal user does not have read/write permissions. To solve that you should type

change_priv n

where n is the number you found for /dev/ttyUSBn. If it is 0, you do not need to specify it.

change_priv needs super user permissions. That means that you should install alibava as super user. This will make the program run with superuser attributes even if you launch it from within your account.

2.2. How to launch the program

Once this is done, one launches the alibava application by typing

alibava-gui [options] [config_file]

where config_file a file where all the settings have been saved. The options can be

Table 1alibava-gui options
--gui Shown the main GUI. This is the default
--no-gui The program runs without a GUI
--emulator Simulates (Emulates) the data. Useful to get familiar with the application
--nevts=n Set n as the maximum number of events in the run
--sample=n Number of events to acquire in the motherboard before transmitting the data to the PC
--dev=/dev/ttyUSBn Set /dev/ttyUSBn as the port to communicate with the motherboard in case n is not the usual 0
--out=out_file_name Sets the path and name of the output data file
--pedestal Acquire a Pedestal run when in no-gui mode
--source Acquire a RadSource run when in non-gui mode. Other required settings should be provided through a configuration file.
--calib Acquire a Calibration run when in non-gui mode. Other required settings should be provided through a configuration file.
--laser Acquire a Laser run when in non-gui mode. Other required settings should be provided through a configuration file.
--activate-plugin Activates the plugin if defined in the configuration file.

In general, when running in GUI mode, all the options listed above can be set in the various dilaogs. One could, for instance give some of the options at the start of alibava-gui to have those values by default at the beginning. When running in non GUI mode options need to be provided to change the default values. Note also that some of the options in the table above assume that there is some more information in a configuration file provided at the command line. Most of the times the default values of the program will not procuded the expected effect. This is particularly true for the scan parameters needed when making calibration runs.