(執筆完了時削除 --> 執筆責任者: 洲波泥 太郎, 執筆締め切り: 2024/xx/xx)
Apptainer/SingularityCE をインストールする。 ホスト機器が新しい OS であれば、パッケージからでも良い。 あるいは go をインストールして source ファイルからコンパイル。
ワークディレクトリに移動する。 $ mkdir nestdaq $ cd /home/user/nestdaq (例えば)
コンテナイメージを持ってくる。 $ wget http://onlgw.kek.jp/~sendai/almalinux9-nestdaq.2024-01-22.sif 最新版はファイル名が変更されていることがあります。リンクが切れている場合、Mattermost で情報を得てください。
サンプルデータファイルを持ってくる。 $ http://www-online.kek.jp/~igarashi/nestdaq/run000408_00_stf.dat.gz (旧ヘッダ) $ http://www-online.kek.jp/~igarashi/nestdaq/run000410.dat.gz (旧ヘッダ) $ http://www-online.kek.jp/~igarashi/nestdaq/run001132_trancate.dat.gz (新ヘッダ) ファイルは展開しておく。 gunzip run001132_trancate.dat.gz 等。 とりあえず新ヘッダのものを使ってください。 Apptaioner を起動 apptainer shell almalinux9-opt-nestdaq.sif
環境変数を設定する。 export NESTDAQ=/opt/nestdaq export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH=$NESTDAQ/bin:$PATH export SCREENDIR=$HOME/.screen
git からユーザープログラムを持ってくる。
git clone https://github.com/spadi-alliance/nestdaq-user-impl
ユーザープログラムをコンパイルする。
Apptainer> cd nestdaq-user-impl
compile.sh を確認して適切に書き換える。 CMAKE_PREFIX_PATH を NestDAQ をインストールしたディレクトリにする。 Apptainer 環境では /opt/nestdaq にする。
Apptainer> sh compile.sh Apptainer> cd build Apptainer> make install
redis と daq-webctl を起動
Apptainer> redis-server $NESTDAQ/etc/redis.conf --loadmodule $NESTDAQ/lib/redistimeseries.so Apptainer> daq-webctl >& /dev/null &
サンプルのトポロジーファイルを取ってくる。
Apptainer> wget http://www-online.kek.jp/~igarashi/nestdaq/topo_player.sh
topology を redis に登録
Apptainer> sh topo_player.sh
ブラウザを daq-webctl に繋ぐ ブラウザの URL カラムに http://localhost:8080 あるいは http://ipaddress:8080 Web UI の Run number New value のところで 適当な run number を入れて Send を押す。
プログラムの起動 スタートアップスクリプトをコピーしてくる。
Apptaioner> cp /opt/nestdaq/run/start_device.sh .
スタートアップスクリプト start_device.sh の実行ファイルディレクトリをワークディレクトリの下の適切なディレクトリに変更する。
BINDIR=/home/user/nestdaq/nestdaq-user-impl/bin 等
プログラムを実行する。(とりあえずは別々の端末で。 screen は SCREENDIR を設定すれば使えます。tmux も使用できます。)
Apptainer> ./start_device.sh TFBFilePlayer --in-file run000411.dat Apptainer> ./start_device.sh fltcoin Apptainer> ./start_device.sh tfdump
実行 する。 [Init Device And Connection], [Init Task], [Run] とボタンを順番に押す。 停止 する。 [Stop], [Reset Task], [Reset Device] とボタンを順番に押す。 プログラムを終了する。 [End] ボタンを押す。
全部終了する。 daq-webctl と redis-server に KILL signal を送る。
$ killall redis-server $ killall daq-webctl
2024/xx/xx 洲波泥 太郎 (SPADI大学), 脱九 花子 (SPADI大学)
2024/xx/xx 脱九 花子 (SPADI大学)