69.7. Running VMUSBReadout

VMUSBReadout is installed as: $DAQROOT/bin/VMUSBReadout.

Several command options control the way VMUSBReadout operates:

-serialno

Specifies the serial number of the VMUSB the program will use. See --enumerate below. If not provided, the first VMUSB located will be used. If you only have one VMUSB connected to your system, this is suitable.

--ring

Specifies the ring buffer in which event data will be put by the program. By default this is the same as the username you are logged in on.

--daqconfig

Specifies the filename that contains the data acquisition configuration script. This defaults to ~/config/daqconfig.tcl

--ctlconfig

Specifies the filename that contains the slow controls configuration script. This defaults to ~/config/controlconfig.tcl. Note that this file is required even if it is just an empty file.

--port

Specifies the port on which the slow controls server listens for connections. This defaults to 27000.

The value of the --port options must either be an integer port number or the special string managed. If managed is used, the program interacts with the NSCL port manager server to allocate and advertise a port. The port is advertised under the name VMUSBReadout:connection. connection specifies the connection to the VM-USB. If the VM-USB is attached directly either the Serial number string is used or, if the VM-USB serial number was not selected at program startup, the string FirstController is used.

--enumerate

Requests that the software list the serial numbers of the VMUSB devices currently attached to the system and exit. Note that the serial 'numbers' are actually strings of the form VMnnnn where nnnn is a number. One of these strings can be handed to the --serialno to select the VMUSB to use.

Sample output:


/usr/opt/daq/10.1/bin/VMUSBReadout --enumerate
VM-USB scriptable readout version V5.0
[0] : VM0134

                        

This output says the system is attached to a single VMUSB whose serial number string is VM0134

--sourceid

If a --timestamplib option is present, events will have a full body header and the integer value of this switch determines the value of the source id.

--timestamplib

The value of this option is a path to a shared object library. If present, the library must have a C compatible entry point named getTimestamp. If not supplied all events will have abbreviated body headers and no timestamps will be present.

The library is dynamically loaded into the readout program and getTimestamp is called for each event. getTimestamp receives a single null pointer parameter, which points to the event and is supposed to return a uint64_t value that is that event's timestamp.

If the library has a further entry named onBeginRun, taking no parametesr and having no return value, this funtion is called when the run starts.