Transversity/Online Replay

From Hall A Wiki
Revision as of 10:50, 10 February 2009 by Ellie (Talk | contribs) (How to setup a new Golden Root File)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
You may also looking for replay documentation for previous experiments

This is documenation for online replay of transversity

Shift Worker HowTo

Easiest Way

Replay procedures are:

  • logon to adaq@adaql<4-7>(DO NOT replay on adal1, adal2 & adaql3 which are running DAQ)
  • call command "goonlana"
  • call command "analyzer"
  • run function "do_all(<run number>)", which will run all the replays and shows the onlineGUI after the replay.

Less automatic replay

Same procedure for loading analyzer.

After analyzer is loaded successfully, one can call

>replay_det_BB(<run number>)

for BigBite replay or

>replay_det_L(<run number>)

for left HRS detector replay.

>replay_phys(<run number>)

for physics replay (not usable during commisioning).

It's also possible to specify the run# and event number in parameters. For ex.

>replay_det_BB(1568,1000)

will replay first 1k events of run#1568.

It's also possible to analysis from an arbitary event

 >replay_det_BB(1568,1000,5000);

will replay events #5000 to #6000 for run 1568

The last step is to open onlineGUI to check the replay results. You can either call

> show_simple(run number)

or open a specific plot by calling following commands in Analyzer

>online("sdetectorL",<run number>)       for L-HRS replay,
>online("sdetectorBB",<run number>)      for BigBite replay,
>online("sphysics",<run number>)         for physics relay. (not usable during commisioning)

Expert Info

Why all online plots are empty !!??

Don't panic, it usually means the data is not properly replayed. The top 2 possible reason / solusion are:

  1. data checker and shift worker are replaying the same run
    • Try to go to front room / back room and make sure no one is replaying same run you are working on
    • The replay script will ask for overwritten confirmation; think before enter yes
  2. analyzer code is corrupted due to previous replay exception.
    1. Quit analyzer
    2. restart it
    3. do_all(run#) again (The script might ask for whether to overwrite the old root file, enter "yes")

HowTo Quick Check Root File Replayed by Shift Worker

After shift worker finish replay, just Call

show_all(run number)

which is equivalent to

online("detectorBB",runN);
online("detectorL",runN);
online("richL",runN); '''Not In for Now. Will be included when it's ready''' 
online("pionrejL",runN);
online("physics",runN);
online("scalar",runN);

HowTo do a super quick test

  1. login as adaq and goonlana
  2. call analyzer
  3. load the detector you need and call ReplayCore().

HowTo Build your own test Directory

  1. copy /adaqfs/home/adaq/e06010/onlana/ to your private directory.
  2. for the file you want to play test on, but do not want to publish the modification to everyone
    • break the symbolic link
    • cp the file from ./src
    • modify and replay

As an example, I want to play test on replay_det_L.odef, then I should:

[adaq@adaql7 ~]$ goonlana 
[adaq@adaql7 onlana]$ cd ..
[adaq@adaql7 e06010]$ cp -r onlana ~/transversity/jinhuang/onlana_test
[adaq@adaql7 e06010]$ cd ~/transversity/jinhuang/onlana_test
[adaq@adaql7 onlana_test]$ rm replay_det_L.odef 
rm: remove symbolic link `replay_det_L.odef'? y
[adaq@adaql7 onlana_test]$ ll *.odef
lrwxrwxrwx 1 adaq a-online    49 Nov  9 21:44 replay_BB.odef -> /adaqfs/home/bbsoftw/e06010/onlana/replay_BB.odef
lrwxrwxrwx 1 adaq a-online    22 Nov  9 21:44 replay_det_BB.odef -> src/replay_det_BB.odef
-rw-r--r-- 1 adaq a-online 15821 Nov  9 22:50 replay_det_L.odef
lrwxrwxrwx 1 adaq a-online    51 Nov  9 21:44 replay_test.odef -> /adaqfs/home/bbsoftw/e06010/onlana/replay_test.odef
----------------------------------------------------------------------
''Optional Below : Private Rootfile Folder, see next howto''
[adaq@adaql7 onlana_test]$ rm ROOTfiles 
rm: remove symbolic link `ROOTfiles'? y
[adaq@adaql7 onlana_test]$ mkdir ROOTfiles   

Notice:

  • DO NOT modify the main replay directory for test
  • DO NOT do replay in bbsoftw replay directory, which is for store the source file

HowTo Build your own replay Directory, which will NOT interfere Root files of shift worker

It's recommend that you do full/test replay in you own folder.

It's simple to build one folder that do NOT interfere with Root file of shift worker's : just remove the link of ROOTfiles in your own replay directory, and mkdir ROOTfiles. All the scripts in your folder will automatically update when main replay updates.

Following is an example of building a private replay director at ~/transversity/jinhuang/onlana_test,

[adaq@adaql7 ~]$ goonlana 
[adaq@adaql7 onlana]$ cd ..
[adaq@adaql7 e06010]$ cp -r onlana ~/transversity/jinhuang/onlana_test
[adaq@adaql7 e06010]$ cd ~/transversity/jinhuang/onlana_test
[adaq@adaql7 onlana_test]$ rm ROOTfiles 
rm: remove symbolic link `ROOTfiles'? y
[adaq@adaql7 onlana_test]$ mkdir ROOTfiles   


HowTo analysis from middle of a run

It's also possible to analysis from an arbitary event

 >replay_det_BB(1568,1000,5000);

will replay events #5000 to #6000 for run 1568

Why the there is no online plots after I replay the whole run

A highly possible reason is because of root file split. When the file size get larger than 1.5G, and the plots generated will be in the last root file piece, which will not be recognized by the online display code.

You can combine multiple root file using hadd tools:

>hadd <dest. rootfile> <rootfile piece 1> <rootfile piece 2> <rootfile piece 3> ...

HowTo setup a new Golden Root File

  1. ssh bbsoftw@adaql4
  2. goonlana
  3. analyzer
  4. do_all(<run number>)
  5. check all plots carefully
  6. exit analyzer
  7. set_golden <run number>

Physics Replay

Please see physics replay discusion page

Software Structure

"expert account" strategy

There are two accounts on adaqlx machines, which are involved with replay:

  • bbsoftw : The "expert" account, which maintain all the source files.
  • adaq  : Shift Workers will perform online replay in this account. However, key file are read only.

The scheme keep key files from been mistakenly modified during replay or tests.

File Location

The databases directory are:

bbsoftw@adaqlx:~/DB

which is also soft linked to

adaq@adaql3:$DB_DIR

Source of replay scripts used in adaq@adaqlx are located in:

bbsoftw@adaqlx:~/e06010/onlana

one can get to it by calling goreplay or goonlana macro as bbsoftw. There are 5 types of files in this directory:

  • Replay Core scripts (ReplayCore.C def.h rootlogon.C)
  • link to software libraries (*.so)
  • definition files (*.odef *.cdef)
  • online display configuration files (*.cfg)
  • other supportive scripts

Key files in above directory are soft linked to shift worker replay directory

adaq@adaqlx:~/e06010/onlana

Useful Links