Difference between revisions of "Transversity/Online Replay"

From Hall A Wiki
Jump to: navigation, search
(Shift Worker HowTo)
(How to setup a new Golden Root File)
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
''You may also looking for [[replay(disambiguation)|replay documentation for previous experiments]]''
+
<div style="
 +
    float: right;
 +
    margin-left: 10px;
 +
    border: 1px solid #aaa;
 +
    background-color: #f9f9f9;
 +
    margin: 0 auto 1em auto;
 +
    padding: .2em;
 +
">Quick Links:
 +
* [http://hallaweb.jlab.org/experiment/transversity/rundb/db_halla_wei/ Run Data Base]
 +
* [http://hallaweb.jlab.org/root/index.html Hall A Analyzer]
 +
* [http://www.jlab.org/~jinhuang/BigBiteDoc/ Bigbite Software Library]
 +
* [http://hallaweb.jlab.org/experiment/transversity/ Experiment Transversity]
 +
* [http://www.jlab.org/~adaq/halog/html/logdir.html Hall A Log]
 +
</div>''You may also looking for [[replay(disambiguation)|replay documentation for previous experiments]]''
  
 
This is documenation for online replay of [[transversity]]
 
This is documenation for online replay of [[transversity]]
  
 
== Shift Worker HowTo ==
 
== Shift Worker HowTo ==
 +
 +
=== Easiest Way ===
  
 
Replay procedures are:
 
Replay procedures are:
  
logon to adaq@adaql<3-7>(DO NOT do it on adal1&adal2 which are taking the data), call command "goonlana", then start "analyzer".
+
* 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  
 
After analyzer is loaded successfully, one can call  
  >replay_BB(runno)
+
  >replay_det_BB(<run number>)
for BigBite replay or
+
for BigBite replay or  
  >replay_phys(runnno)
+
>replay_det_L(<run number>)
for physics replay.
+
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.  
 
It's also possible to specify the run# and event number in parameters. For ex.  
  >replay_BB(1568,1000)
+
  >replay_det_BB(1568,1000)
 
will replay first 1k events of run#1568.
 
will replay first 1k events of run#1568.
  
Then open onlineGUI to check the replay results:
+
It's also possible to analysis from an arbitary event
>online("BB",runno)       for BigBite replay,
+
  >replay_det_BB(1568,1000,5000);
>online("Left",runno)      for L-HRS replay,
+
will replay events #5000 to #6000 for run 1568
>online("physics",runno)  for physics relay.
+
  
Or, '''one can do all the above together''' by:
+
The last step is to open onlineGUI to check the replay results. You can either call
  >'''do_all(runno)'''
+
> show_simple(run number)
which will run all the replays and shows the onlineGUI after the replay.
+
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 ==
 
== Expert Info ==
  
=== Howto Build your own quick test ===
+
 
 +
=== 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:
 +
# 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''
 +
# analyzer code is corrupted due to previous replay exception.
 +
## Quit analyzer
 +
## restart it
 +
## 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
 +
<pre>show_all(run number)</pre>
 +
which is equivalent to
 +
<pre>
 +
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);
 +
</pre>
 +
 
 +
=== HowTo do a super quick test ===
 +
 
 +
# login as adaq and goonlana
 +
# call analyzer
 +
# load the detector you need and call [[ReplayCore()]].
 +
 
 +
=== HowTo Build your own test Directory ===
  
 
# copy /adaqfs/home/adaq/e06010/onlana/ to your private directory.
 
# copy /adaqfs/home/adaq/e06010/onlana/ to your private directory.
# for the file you want to play test on, break the symbolic link and modify it.
+
# 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:
 +
<pre>
 +
[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 
 +
</pre>
  
 +
Notice:
 
* ''DO NOT modify the main replay directory for test''
 
* ''DO NOT modify the main replay directory for test''
 
* ''DO NOT do replay in bbsoftw replay directory, which is for store the source file''
 
* ''DO NOT do replay in bbsoftw replay directory, which is for store the source file''
* super quick test :
+
 
# login as adaq and goonlana
+
=== HowTo Build your own replay Directory, which will '''NOT''' interfere Root files of shift worker ===
# call analyzer
+
 
# load the detector you need and call [[ReplayCore()]]
+
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,
 +
<pre>
 +
[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 
 +
</pre>
 +
 
 +
 
 +
=== 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 ===
 +
 
 +
# ssh bbsoftw@adaql4
 +
# goonlana
 +
# analyzer
 +
# do_all(<run number>)
 +
# check all plots carefully
 +
# exit analyzer
 +
# set_golden <run number>
  
 
=== [[Transversity/Physics Replay|Physics Replay]] ===
 
=== [[Transversity/Physics Replay|Physics Replay]] ===
Line 75: Line 191:
 
Key files in above directory are soft linked to shift worker replay directory
 
Key files in above directory are soft linked to shift worker replay directory
 
  adaq@adaqlx:~/e06010/onlana
 
  adaq@adaqlx:~/e06010/onlana
 +
 +
== Useful Links ==
 +
* [http://hallaweb.jlab.org/experiment/transversity/rundb/db_halla_wei/ Run Data Base]
 +
* [http://hallaweb.jlab.org/root/index.html Hall A Analyzer]
 +
* [http://www.jlab.org/~jinhuang/BigBiteDoc/ Bigbite Software Library]
 +
* [http://hallaweb.jlab.org/experiment/transversity/ Experiment Transversity]
 +
* [http://www.jlab.org/~adaq/halog/html/logdir.html Hall A Log]

Latest revision as of 10:50, 10 February 2009

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