Project

General

Profile

Event viewers » History » Version 26

Corey Adams, 12/20/2017 09:37 AM

1 15 Johnny Ho
{{toc}}
2 15 Johnny Ho
3 6 Jonathan Asaadi
h1. +Instructions on how to use the auto-updating event viewer+
4 5 Jonathan Asaadi
5 20 Jason St. John
Log onto the %{background:lightgreen}@lariatgpvmXX.fnal.gov@% machine (where XX is a number between 01 and 04) as user lariat.
6 5 Jonathan Asaadi
<pre>
7 20 Jason St. John
ssh -X lariat@lariatgpvm01.fnal.gov
8 5 Jonathan Asaadi
</pre>
9 23 Elena Gramellini
10 23 Elena Gramellini
11 20 Jason St. John
If you are not running from the ROC-west control room or the VNC, you may log in as yourself.
12 19 William Badgett
13 5 Jonathan Asaadi
There is a script to setup and run the auto-updating event viewer which can be run 
14 5 Jonathan Asaadi
<pre>
15 5 Jonathan Asaadi
cd /lariat/app/users/EventViewer/
16 5 Jonathan Asaadi
source SETUP_ONLINE_EVENTVIEWER.sh
17 5 Jonathan Asaadi
</pre>
18 1 Johnny Ho
19 26 Corey Adams
For the pixlar display, with an updated mapping, use this script:
20 26 Corey Adams
<pre>
21 26 Corey Adams
cd /lariat/app/users/cadams/pixlar/
22 26 Corey Adams
source SETUP_ONLINE_EVENTVIEWER.sh
23 26 Corey Adams
</pre>
24 26 Corey Adams
25 5 Jonathan Asaadi
and should load an event viewer that looks like
26 5 Jonathan Asaadi
!{width: 25%}R8518_192_38.png!
27 20 Jason St. John
28 23 Elena Gramellini
In case you run into the following error:
29 23 Elena Gramellini
<pre>lost connection
30 23 Elena Gramellini
Permission denied (gssapi-keyex,gssapi-with-mic)</pre>
31 24 Elena Gramellini
Use the command *@kticket@* to pick up a fresh kerberos ticket with the special lariat principal (do not use your personal principal). Check for this success with @klist@. Then log back in to lariat@lariatgpvm01.fnal.gov and launch the event viewer as above.
32 22 Jason St. John
---
33 22 Jason St. John
34 21 Jason St. John
{{toc}}
35 23 Elena Gramellini
36 23 Elena Gramellini
37 22 Jason St. John
38 22 Jason St. John
h1. More on the event viewer
39 1 Johnny Ho
40 21 Jason St. John
h2. If a new release of the event viewer needs to be installed
41 21 Jason St. John
42 21 Jason St. John
Detailed instructions to pull LArLite (fmwk) and EventViewer (Code):
43 21 Jason St. John
44 5 Jonathan Asaadi
<pre>
45 5 Jonathan Asaadi
source /grid/fermiapp/lariat/setup_lariat.sh
46 5 Jonathan Asaadi
setup lariatsoft v01_00_07 -q e6:prof
47 5 Jonathan Asaadi
cd /lariat/app/users/EventViewer/
48 5 Jonathan Asaadi
git clone http://github.com/larlight/larlite LArLite
49 5 Jonathan Asaadi
cd LArLite/
50 5 Jonathan Asaadi
git checkout trunk
51 5 Jonathan Asaadi
source config/setup.sh
52 5 Jonathan Asaadi
make
53 5 Jonathan Asaadi
cd UserDev
54 5 Jonathan Asaadi
git clone https://github.com/coreyjadams/EventViewer.git
55 5 Jonathan Asaadi
cd EventViewer/
56 5 Jonathan Asaadi
source setup_evd.sh
57 5 Jonathan Asaadi
source /lariat/app/users/jasaadi/pystack/setup_pyqt4.sh
58 5 Jonathan Asaadi
make
59 1 Johnny Ho
</pre>
60 1 Johnny Ho
61 21 Jason St. John
62 21 Jason St. John
h2. To load a specific run/spill file
63 21 Jason St. John
64 5 Jonathan Asaadi
<pre>
65 1 Johnny Ho
lariatdaq.py /lariat/data/users/lariatdqm/dqm/dqm_run_[RUN]_spill_[SPILL].root
66 1 Johnny Ho
</pre>
67 1 Johnny Ho
with the naming convention @dqm_run_[RUN]_spill_[SPILL].root@ where @[RUN]@ is the 6-digit run number with leading zeros and @[SPILL]@ is the 4-digit spill number with leading zeros. For example, the file for run 666 and spill 3 is @dqm_run_000666_spill_0003.root@.
68 5 Jonathan Asaadi
69 21 Jason St. John
h2. To load the auto-updating feature
70 21 Jason St. John
71 21 Jason St. John
There exists a text file that is updated by Johnny's DQM code and lives at @/lariat/data/users/lariatdqm/EventViewer/latest_dqm_file_path.txt@. To load this feature use the command
72 1 Johnny Ho
<pre>
73 1 Johnny Ho
lariatdaq.py /lariat/data/users/lariatdqm/EventViewer/latest_dqm_file_path.txt
74 5 Jonathan Asaadi
</pre>
75 5 Jonathan Asaadi
76 21 Jason St. John
h2. In order to stop the auto updating feature 
77 21 Jason St. John
78 21 Jason St. John
Click the %{color:red}Stop Run% button and it should change to %{color:red}Start Run%
79 5 Jonathan Asaadi
!{width: 25%}StopRun.png!
80 5 Jonathan Asaadi
81 21 Jason St. John
h2. More features of the event viewer
82 21 Jason St. John
83 1 Johnny Ho
You can also view the raw wave forms from the wire information by clicking "Wire Drawing" box and then clicking around on the screen, the numbers in the lower left hand side tell you what wire number and time tick you are currently mousing over
84 6 Jonathan Asaadi
85 1 Johnny Ho
!{width: 25%}WireDrawing.png!
86 1 Johnny Ho
87 1 Johnny Ho
You can also save an screen capture by clicking the "Capture Screen" button on the lower right hand side 
88 6 Jonathan Asaadi
89 6 Jonathan Asaadi
!{width: 25%}ScreenCapture.png!
90 6 Jonathan Asaadi
91 21 Jason St. John
h1. More Event Viewers
92 21 Jason St. John
93 21 Jason St. John
Instructions on how to use the static event and waveform viewers
94 1 Johnny Ho
95 13 Johnny Ho
Log into the  %{background:lightgreen}@lariat-gateway.fnal.gov@% machine with the %{background:lightgreen}@lariat@% account.
96 1 Johnny Ho
97 1 Johnny Ho
<pre>
98 13 Johnny Ho
ssh -Y lariat-gateway.fnal.gov -l lariat
99 1 Johnny Ho
</pre>
100 1 Johnny Ho
101 1 Johnny Ho
Set up the environment for the DQM:
102 1 Johnny Ho
103 1 Johnny Ho
<pre>
104 1 Johnny Ho
source ~johnnyho/setup_dqm
105 1 Johnny Ho
</pre>
106 1 Johnny Ho
107 1 Johnny Ho
We have a directory set up that the DQM files are being written into:
108 1 Johnny Ho
109 1 Johnny Ho
<pre>
110 25 Jonathan Asaadi
/lariat/data/users/lariatdqm/dqm-v2/files/**/**/
111 1 Johnny Ho
</pre>
112 1 Johnny Ho
113 1 Johnny Ho
with the naming convention @dqm_run_[RUN]_spill_[SPILL].root@ where @[RUN]@ is the 6-digit run number with leading zeros and @[SPILL]@ is the 4-digit spill number with leading zeros. For example, the file for run 666 and spill 3 is @dqm_run_000666_spill_0003.root@.
114 1 Johnny Ho
115 1 Johnny Ho
The event viewer scripts are located in the following directory:
116 1 Johnny Ho
117 1 Johnny Ho
<pre>
118 1 Johnny Ho
~lariat/dqm
119 1 Johnny Ho
</pre>
120 1 Johnny Ho
121 1 Johnny Ho
These are the scripts for viewing the TPC readout and the waveforms from the V1751:
122 1 Johnny Ho
123 1 Johnny Ho
<pre>
124 25 Jonathan Asaadi
python evd/evd.py /lariat/data/users/lariatdqm/dqm-v2/files/dqm_run_[RUN]_spill_[SPILL].root               # for plotting the 2D TPC views of the collection and induction planes with adjustable color bars and wire view
125 1 Johnny Ho
python v1740_readout.py /lariat/data/users/lariatdqm/dqm/dqm_run_[RUN]_spill_[SPILL].root         # for plotting the waveforms of the TPC events
126 1 Johnny Ho
python plot_v1751_waveforms.py /lariat/data/users/lariatdqm/dqm/dqm_run_[RUN]_spill_[SPILL].root  # for plotting waveforms from each channel of V1751 boards
127 1 Johnny Ho
</pre>
128 1 Johnny Ho
129 14 Johnny Ho
Plots can be saved using the display interface (see attached file). Unfortunately, the save function can only save files to the @lariat-gateway@ machine (because you are running the plot maker on @lariat-gateway@), so you'll have to @scp@ the plots from @lariat-gateway@ to the machine you are using. Taking a screenshot of the plot window will also work. *Please resize or maximize the plot window for all the tick labels to be displayed correctly.*
130 1 Johnny Ho
131 7 Johnny Ho
@evd/evd.py@:
132 9 Johnny Ho
!{width: 100%}evd-latest.png!
133 13 Johnny Ho
134 13 Johnny Ho
!{width: 100%}evd.png!