Easy manual for running

How to run

First thing first, setup a correct FELIX machine independently. [see Link]

On a swROD machines:

  1. ssh to um-felix1-swrod/um-felix2-swrod with nswdaq account(ask us for password). system no. 1 is (sTGC-VS) in now in B180 with the smaller rack, no. 2 is in big rack in 180(sTGC-180).
    ssh nswdaq@um-felix1-swrodNOSPAMPLEASE.cern.ch
  2. cd /afs/cern.ch/user/n/nswdaq/public/db/sTGC_NSW_OKS_Test_DB
    1. Currently the git is not being updated. Will update it when our goal are being finalized.
  3. Setup the env
    source setup_oks.sh # setup environment
  4. If necessary, kill the old partition with
    ./kill_part.sh
  5. To see the options, run;
    ./run_part.sh
    1. If you see conflicts for a igui.pid file , just remove it. You should have the correct permission to do it. Otherwise, use root account. Ask us for password.
  6. When partition GUI opens, do initialization, then config(should include ROX(readout), TTC, configuration). Between runs, need to unconfig and config again to start a new run.
    1. There will be some ROX-related error, it shouldn't affect the operation. It's some error at ROX developer's end.

OKS database: you want to change or understand something?

  • OKS database tells TDaq partition about how you can setup the services. Here you can find information of TTC pattern, configuraiton file location, directory where data goes to, log files ... all the things you might be most interested in.
  • Partition: muons/partitions.
    • The Partition id is the partition name. And you can disable any element in the partition, only. LogRoot and WorkingDirectory saves the log file of each segment, and partition itself. Remember, the log for each segments resides in the server hosting the segment. for ROX, it's um-felix*-swrod, for ttc and config, it's um-felix*-spc.
  • Segments: in muons/segments, you can see sTGC-<XXX> segments, you can modify that xml file
  • For configuration:
    • Look for "dbConnection" for json file location and do modificaiton there, or use the GUI to save to that location(config version)
    • The default configuration file location is in
  • For TTC:
    • Look for "PatGen_filename" for the dat format file for LTP pattern!
  • For swROD:
    • This xml has ROX in the name. Most importantly, you need to add InputChannel to RODInput contained in RODModule. The input channel should contain the elink information in "id" in decimal, for all the elinks you want to subscribe to.
  • Other things like modifying xml, you can modify it locally, and then commit to the git. Or use the oks-database editor or dbe to do it.
  • Some tutorial here: NSW DAQ Workshop

Decoding binary data?

  1. [this is becoming obsolete] try this ~rowang/FELIX/swROD_decoder_Michael/nswcat1 for current format
  2. Use the code below. The nsw_process is an alias to the full command.
    source /afs/cern.ch/user/r/rowang/FELIX/swROD_NTuple/setup.sh # including setting root env, gcc env, making alias. you can take a look at this file.

    nsw_process <binary>.data

    You can use
    which nsw_process
    to check the original command and then use -h for the help.

    As of 14.08.2019, the help looks like:

    $ /afs/cern.ch/user/n/nswdaq/public/proc/installed/x86_64-centos7-gcc8-opt/bin/nsw_process -h

    Allowed options:

    NSW Data Processing Options:

    -h [ --help ] print help message

    -n [ --nevents ] arg number of events to process

    -i [ --input ] arg input byte-stream file to process

    -o [ --outdir ] arg output directory to place any output

    -s [ --suffix ] arg add a suffix to any output files

    -l [ --list-processors ] list valid processor types

    --partial allow for reading partial/incomplete input

    byte-stream files

    Simple ROOT processing:

    --rootsimple run the simple ROOT processing

Correct Root environment we use is:
  1. source /cvmfs/sft.cern.ch/lcg/releases/LCG_95/ROOT/6.16.00/x86_64-centos7-gcc8-opt/bin/thisroot.sh

Analyzing data?

Make histogram from minitree: check out here: https://gitlab.cern.ch/patmasid/felixdata_minitreeanalysis

An existing one is compiled and can be used like this:

/afs/cern.ch/user/p/patmasid/public/swROD_analysis/installed/x86_64-centos7-gcc8-opt/bin/analHit <something>_simple.root /afs/cern.ch/user/p/patmasid/public/swROD_analysis/felixdata_minitreeanalysis/data/ElinkFebFiberMapping/4Elinks_EachFEB11/ElinkFebFiberMapping_v1_1.txt <output>.root

For pad trigger pattern test. If all fibers are connected to the GBTx 1, use this instead (here the histogram naming is with fiber number):

/afs/cern.ch/user/p/patmasid/public/swROD_analysis_2/installed/x86_64-centos7-gcc8-opt/bin/analHit <something>_simple.root /afs/cern.ch/user/p/patmasid/public/swROD_analysis/felixdata_minitreeanalysis_2/data/ElinkFebFiberMapping/4Elinks_EachFEB11/ElinkFebFiberMapping_v1_3.txt <output>.root <fiber#1,fiber#2>

The fiber number can be separated by comma ",".

Calibration of parameters

At current stage, we can record data after setting different parameters. It is incorporated into the GUI. Here we have example script, too.

Please look at TTC for some reference as well.

cd /afs/cern.ch/user/r/rowang/FELIX/NSWConfiguration_workspace

source setup.sh

/afs/cern.ch/work/r/rowang/public/FELIX/NSWConfiguration_workspace/NSWTTCConfig/scripts/iterate_take_data.sh

In case of error

How to close existing partition cleanly?

  1. Always use "Exit partition" in the GUI.
  2. Kill pmg servers: do the following command on sbc and swrod machines, and kill with -9
    ps aux | grep pmgserver

    kill -9 <pid of pmgserver>

  3. ./kill_part.sh for your corresponding parts
  4. Ask me for more advice!
When OPCserver cannot start, GBTXconfig also fails?
  • restart FELIX and SBC(gives clock for FELIX)
For production machine, it can be a bit tricky, but the following seems to solve most issues:
  1. delete ipc_init.txt
  2. sudo hostname um-felix2-swrod-supermicro.cern.ch ( This machine need .cern.ch

Behaviors

TTC

After config, it will send L0L1, so if you want to config board yourself, do it between INITIALIZE and CONFIG.

Things from BGO will be sending after initialization. Like Test Pulse from LTP BGO2

Useful Infos

Checkout below for some info.

Most-commonly used FELIX commands

/afs/cern.ch/work/r/rowang/public/FELIX/command_demos/felix.txt

Most-commonly used swrod related stuff

/afs/cern.ch/work/r/rowang/public/FELIX/command_demos/swrod.txt

-- RongkunWang - 2019-05-13

Edit | Attach | Watch | Print version | History: r28 < r27 < r26 < r25 < r24 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r28 - 2019-10-26 - TamasBalazs
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback