Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Starting the Server 

Info
titleET Software

The server cannot startup without connecting to an ET ring. If you are testing the tools outside of the counting house where this is not provided, then follow the instructions

below

towards the end of this documentation for installing and running the ET software, along with a data producer, starting at "Installing ET Software". 

TODO: Provide internal link to these instructions.

The connection parameters for your local ET ring need to be specified in an initial server config file like this:

...

These settings provide the hostname where the ET ring is running, the port it is using for accepting connections, and the name of the buffer file. These need to exactly match either the settings on the actual running ET ring in Hall B or one started on your machine or the server will fail to startup. Currently, these cannot be changed once the server is started, so you should make sure they are correct before starting up the server.

Once you have confirmed that the ET ring is running and your configuration is valid, you Once you have confirmed that the ET ring is running, you may launch the server as a background process using a command such as:

Code Block
languagebash
themeMidnight
hps-recon-server --host localhost --port 22222 -w $PWD/stations -c my.cfg &

...

The -w switch gives the directory where station data such as log files will be written out. By default, this is the directory where the server was started.

Finally, the -c option gives the location of the server's initial configuration file, which most importantly contains the parameters for connecting to the ET system (see above).

Instead of writing its printed output to your terminal, the server will create a log file at logs/server.log,which you can tail to check the server's log messages using a command like tail -f logs/server.log in order to see the server logs from its handling of client requestsThe server will write its log output to logs/server.log instead of the terminal.

Client Console

If you run the client without any command options, it will opens the interactive online reconstruction console which can be used to configure, create, start/stop and remove stations that run the HPS physics event reconstruction on data from the ET ring.Now you may open the interactive console for sending command requests to the server:

Code Block
languagebash
themeMidnight
hps-recon-client --host localhost


Info
titleConsole
Whenever you see online>

...

in a code block, you should run the command

...

in the online reconstruction console

...

rather than your system shell

...

.

Type help into the console to show the documentation for the client command line interface:

Code Block
languagebash
themeMidnight
online>helponline> help

This is the output of the above command:

Code Block
languagebash
themeMidnight
GENERAL

    help - print general information
    help [cmd] - print information for specific command
    exit - quit the console

SETTINGS

    port [port] - set the server port
    host [host]- set the server hostname
    file [filename] - write server output to a file
    append [true|false] - true to append to output file or false to overwrite
    terminal - redirect server output back to the terminal

COMMANDS

    config - Set new server configuration properties
    create - Create a new station
    list - List station information in JSON format
    log - Tail log file of station (hit any key to stop tailing)
    remove - Remove a station that is inactive
    save - Save the current set of plots to a ROOT or AIDA file
    set - Set a configuration property
    shutdown - Shutdown the server
    start - Start a station that is inactive
    status - Show server and station status
    stop - Stop a station

You can set the connection settings to the server using the port and host commands, though the defaults should usually work fine.

If the server was started with a custom port, or it is running with on a particular hostnameremote host, this these can be specified like:

Code Block
themeMidnight
online> port 1234522222
online> host myactualhostnamelocalhost

By default, output from the server read by the client is printed to the console, but it can be saved to a log file using commands such as:

...

Configuration of the online reconstruction stations can be set using the set command:

Code Block
themeMidnight
# lcsim detector name for conditions
online>set lcsim.detector HPS-PhysicsRun2016-Pass2

# run number for conditions
online>set lcsim.run 7798

# lcsim steering resource
online>set lcsim.steering /org/hps/steering/recon/PhysicsRun2016OnlineRecon.lcsim

The steering file should contain a Driver that extends the RemoteAidaDriver, in order to provide station plot data to the serverabove will configure the stations to run on 2016 data.

A single station with the above configuration can now be created using a command like:

Code Block
themeMidnight
online>create 1

The argument is the number of stations you want the server to create, which can potentially scale reliably to around the number of cores on your machine.

Code Block
themeMidnight
online>create 8

You will need to test how many stations you can run simultaneously, given the specific configuration being used and the number of plots being created/updatedthe number of plots being created/updated at once. The system should roughly scale to the number of cores on your machine, depending on its overall load.

Stations that have been created but not started are in the inactive state. Stations which are inactive have no running system process and no registration entries in the plot aggregation engine that adds plots from different stations, so their plots will not be shown in the remote combined plot tree.

Inactive stations can be started using a command likesuch as:

Code Block
themeMidnight
online>start

...

Once a station is started, it will process events from the ET ring or sit in wait mode waiting for more data to appearor sit in wait mode waiting for more data to appear. In order to process data, you would now start the DAQ or the EVIO file producer (covered below).

The status of the stations and the ET ring can be checked using:

Code Block
themeMidnight
online>status

Log The log data from individual stations can be streamed from each station using its station ID as an argumentback to the client using a command such as:

Code Block
themeMidnight
online>log 1

When streaming log data from one of the stations you can To exit from the log streaming mode, simply hit any key on the your keyboard to exit.


Stop all jobs:

Code Block
themeMidnight
online>stop

...