Project

General

Profile

Wiki » History » Version 81

Ron Rechenmacher, 10/02/2018 04:13 PM

1 30 Gustavo Valdiviesso
!https://cdcvs.fnal.gov/redmine/attachments/download/48302/sbnd-logo-big.png!
2 23 Gustavo Valdiviesso
3 38 Gustavo Valdiviesso
---
4 38 Gustavo Valdiviesso
5 33 Gustavo Valdiviesso
h2. %{color:red}Quick Info%
6 1 Jose Ignacio Crespo Anadon
7 72 Minerba Betancourt
* *RUN COORDINATOR* Minerba Betancourt (612-859-9078)
8 43 Krishan Mistry
* Google Hangouts ID: sbndshift@gmail.com (password is the same as the sbn-doc-db)
9 33 Gustavo Valdiviesso
* "Hangouts Group":https://hangouts.google.com/group/cdpWmYQYwS3z31T62
10 33 Gustavo Valdiviesso
* VST shift: *+1 331 442 4353* (Hangouts Voice Service)
11 33 Gustavo Valdiviesso
* ROC West x5413
12 33 Gustavo Valdiviesso
* MCenter Control Room (MC-CR) x3726 or x8871
13 33 Gustavo Valdiviesso
* Internationally: prefix *+1 630 840* to any extensions (marked with x)
14 33 Gustavo Valdiviesso
* "Experts list":https://docs.google.com/spreadsheets/d/1_lixBwEmZP8X2hEL4gabbaPx3uZYUMtQdMLQH-5-aQE/edit?usp=sharing
15 6 Gustavo Valdiviesso
16 38 Gustavo Valdiviesso
---
17 38 Gustavo Valdiviesso
18 33 Gustavo Valdiviesso
{{toc}}
19 1 Jose Ignacio Crespo Anadon
20 33 Gustavo Valdiviesso
21 33 Gustavo Valdiviesso
h1. Welcome to the SBND VST Wiki
22 33 Gustavo Valdiviesso
23 1 Jose Ignacio Crespo Anadon
This is the wiki for the SBND's Vertical Slice Test (VST). This is an integration of the cold and warm electronics with DAQ and online monitoring using LArIAT's cryostat and TPC.
24 1 Jose Ignacio Crespo Anadon
25 33 Gustavo Valdiviesso
*HUGE DISCLAIMER: IT IS TOO SOON TO GET COMFORTABLE*
26 33 Gustavo Valdiviesso
*THIS PAGE IS BEING DEVELOPED RIGHT NOW! CHECK IT EVERY TIME SO YOU ARE UPDATED TOO!*
27 1 Jose Ignacio Crespo Anadon
28 73 Minerba Betancourt
h1. %{color:red}Run Plan for August 20 to September 05%
29 49 Gustavo Valdiviesso
30 75 Davio Cianci
*  At the start of your shift, please end the previous run by stopping the SBND DAQ and then the LArIAT DAQ, and start them both up again (first LArIAT, followed by SBND). Be sure to document this in the elog.
31 53 Gustavo Valdiviesso
*  When the new run starts, the Online monitor show reliable information for the noise correlation matrix and the wires rms. Save a snapshot of
32 53 Gustavo Valdiviesso
33 1 Jose Ignacio Crespo Anadon
1) the Correlation Matrix
34 74 Davio Cianci
2) the Collection Plane RMS 
35 74 Davio Cianci
3) the Collection Plane Pulse Height
36 53 Gustavo Valdiviesso
37 53 Gustavo Valdiviesso
and add them to a New Run e-log entry (see entry "297":http://dbweb6.fnal.gov:8080/ECL/sbnd/E/show?e=297 as an example).
38 53 Gustavo Valdiviesso
39 53 Gustavo Valdiviesso
There are now 4 types of reports:
40 53 Gustavo Valdiviesso
41 53 Gustavo Valdiviesso
Start of Shift Checklist
42 53 Gustavo Valdiviesso
End of Shift Checklist
43 53 Gustavo Valdiviesso
44 53 Gustavo Valdiviesso
New Run
45 53 Gustavo Valdiviesso
End of Run
46 53 Gustavo Valdiviesso
47 53 Gustavo Valdiviesso
The shifter must fill in all of them. Instructions are in the form themselves.
48 1 Jose Ignacio Crespo Anadon
49 77 Minerba Betancourt
At the end of the shift, shifters need to post an event display image of the data collected during the shift.
50 77 Minerba Betancourt
51 33 Gustavo Valdiviesso
h1. Taking VST Shifts
52 1 Jose Ignacio Crespo Anadon
53 54 Gustavo Valdiviesso
In summary, a VST shift is just like a LArIAT shift, with a few extras. If you didn't do this yet, make sure you are in the "SBND.Shift":https://hangouts.google.com/group/cdpWmYQYwS3z31T62 group at Google Hangouts.
54 33 Gustavo Valdiviesso
55 33 Gustavo Valdiviesso
h2(count). %{color:green}Prerequisites%
56 33 Gustavo Valdiviesso
57 33 Gustavo Valdiviesso
*Gaining Access*
58 33 Gustavo Valdiviesso
59 39 Gustavo Valdiviesso
* First, set up your Fermilab computing account and Kerberos. This can be done by following instructions "here":https://redmine.fnal.gov/redmine/projects/lardbt/wiki/Fermilab_Computing_Access. Check that you can issue a Kerberos ticket with 
60 1 Jose Ignacio Crespo Anadon
61 39 Gustavo Valdiviesso
<pre> kinit <yourKerberosPrincipal>@FNAL.GOV</pre> 
62 39 Gustavo Valdiviesso
63 39 Gustavo Valdiviesso
and confirm that you have gotten a kerberos ticket by checking the output of the command @klist@.
64 39 Gustavo Valdiviesso
65 33 Gustavo Valdiviesso
* If you are at Fermilab:
66 33 Gustavo Valdiviesso
** Check that you are connected via ethernet, or to the Fermilab @fgz@ Wi-Fi network and not the guest Wi-Fi network. This is required to access the lariat shift machines. The latter may lead to "Connection reset by peer" errors, refusing you access. Register your device to the fgz network "here":https://fermi.service-now.com/kb_view_customer.do?sysparm_article=KB0011206. 
67 1 Jose Ignacio Crespo Anadon
** If you find you cannot SSH into lariat-cr-02.fnal.gov, make sure your SSH config file allows X11 forwarding and all GSSAPI options. Further details can be found "here":https://cdcvs.fnal.gov/redmine/projects/lardbt/wiki/Fermilab_Computing_Access#Logging-into-Fermilab-Computers-with-Kerberos.
68 1 Jose Ignacio Crespo Anadon
69 1 Jose Ignacio Crespo Anadon
* If you are outside of the lab:
70 55 Gustavo Valdiviesso
** %{color:red} The Java dependent Cisco AnyConnect client can no longer run from a browser due to the lack of support for NPAPI%. This means that the old VPN method (https://vpn.fnal.gov) only works in old browsers. Use this as an alternative method, which is browser-independent:
71 54 Gustavo Valdiviesso
72 56 Gustavo Valdiviesso
Uninstall Cisco AnyConnect (skip this if you are sure you don't have it):
73 54 Gustavo Valdiviesso
74 54 Gustavo Valdiviesso
<pre>
75 54 Gustavo Valdiviesso
sudo /opt/cisco/vpn/bin/vpn_uninstall.sh
76 54 Gustavo Valdiviesso
</pre>
77 54 Gustavo Valdiviesso
78 54 Gustavo Valdiviesso
79 56 Gustavo Valdiviesso
Install  openconnect (it is an open source vpn client)
80 54 Gustavo Valdiviesso
81 54 Gustavo Valdiviesso
if you are using ubuntu...
82 54 Gustavo Valdiviesso
83 54 Gustavo Valdiviesso
<pre>
84 54 Gustavo Valdiviesso
sudo apt-get install openconnect 
85 54 Gustavo Valdiviesso
</pre>
86 54 Gustavo Valdiviesso
87 54 Gustavo Valdiviesso
if not, use the appropriate method for your system. You can verify the installation by asking the version:
88 54 Gustavo Valdiviesso
89 54 Gustavo Valdiviesso
<pre>
90 54 Gustavo Valdiviesso
openconnect --version
91 55 Gustavo Valdiviesso
</pre>
92 55 Gustavo Valdiviesso
93 56 Gustavo Valdiviesso
Install a vnc client of your choice. TigerVNC or Remmina work perfectly.
94 35 Gustavo Valdiviesso
95 1 Jose Ignacio Crespo Anadon
h2(count). When you are about to start
96 19 Gustavo Valdiviesso
97 1 Jose Ignacio Crespo Anadon
Contact the current shifter in the hangouts group to tell him/her that you are getting ready. This will give the current shifter time to fill in his  End Of Run report. Ask about the current plan and status (the shifter might ask you to read some e-log entries). 
98 19 Gustavo Valdiviesso
99 19 Gustavo Valdiviesso
Don't log into the hangouts yourself just yet. Wait until the current shifter tells you that he/she is ready to give you the controls. 
100 17 Gustavo Valdiviesso
101 1 Jose Ignacio Crespo Anadon
h2(count).  Setup your shift station
102 1 Jose Ignacio Crespo Anadon
103 35 Gustavo Valdiviesso
Either from a remote connection or from ROC-West, follow these instructions.
104 35 Gustavo Valdiviesso
105 35 Gustavo Valdiviesso
*Log onto the shift computer*
106 35 Gustavo Valdiviesso
107 35 Gustavo Valdiviesso
h3. For a shift at Fermilab:
108 35 Gustavo Valdiviesso
109 35 Gustavo Valdiviesso
* From a *ROC-West machine*, such as lariat-cr-02:
110 35 Gustavo Valdiviesso
** Log in with username = @lariat@.
111 35 Gustavo Valdiviesso
* From an *MCenter machine*, such as ftbflx18 or ftbflx15:
112 35 Gustavo Valdiviesso
** Log in with username = @ftbf_user@.
113 35 Gustavo Valdiviesso
* Password is YOUR kerberos password, then it will ask for YOUR kerberos principal. (Reverse from usual order)
114 35 Gustavo Valdiviesso
115 35 Gustavo Valdiviesso
h3. From a remote shift:
116 35 Gustavo Valdiviesso
117 35 Gustavo Valdiviesso
118 57 Gustavo Valdiviesso
* *VPN* - To connect to the Fermilab VPN, open a terminal and execute:
119 57 Gustavo Valdiviesso
120 57 Gustavo Valdiviesso
<pre>
121 57 Gustavo Valdiviesso
sudo openconnect https://vpn.fnal.gov
122 57 Gustavo Valdiviesso
</pre>
123 57 Gustavo Valdiviesso
124 57 Gustavo Valdiviesso
and it is going to ask for your Username and Password (your SERVICES password).
125 57 Gustavo Valdiviesso
126 57 Gustavo Valdiviesso
If it works, you will be greeted with this message:
127 57 Gustavo Valdiviesso
128 57 Gustavo Valdiviesso
<pre>
129 57 Gustavo Valdiviesso
| NOTICE TO USERS
130 57 Gustavo Valdiviesso
| This  is a Federal system (and/or it is directly connected to a Fermilab local network) ...
131 57 Gustavo Valdiviesso
</pre> 
132 57 Gustavo Valdiviesso
133 57 Gustavo Valdiviesso
That means you are in. Do not close this terminal.
134 57 Gustavo Valdiviesso
135 57 Gustavo Valdiviesso
* *SSH Tunnel* - In another terminal, get a Kerberos ticket
136 57 Gustavo Valdiviesso
137 57 Gustavo Valdiviesso
<pre>
138 57 Gustavo Valdiviesso
kinit <username>@FNAL.GOV
139 57 Gustavo Valdiviesso
</pre>
140 57 Gustavo Valdiviesso
141 57 Gustavo Valdiviesso
with your Kerberos ID. Now, open the tunnel with:
142 57 Gustavo Valdiviesso
143 57 Gustavo Valdiviesso
<pre>
144 57 Gustavo Valdiviesso
ssh -C -L 5900:localhost:5900 lariat@lariat-cr-02.fnal.gov
145 57 Gustavo Valdiviesso
</pre>
146 57 Gustavo Valdiviesso
147 57 Gustavo Valdiviesso
and you know it worked if you get another greeting:
148 57 Gustavo Valdiviesso
149 57 Gustavo Valdiviesso
<pre>
150 57 Gustavo Valdiviesso
Welcome to the LArIAT ROCwest Control Room
151 57 Gustavo Valdiviesso
</pre>
152 57 Gustavo Valdiviesso
153 57 Gustavo Valdiviesso
Again, leave this terminal open. If this fails, ask one of the following collaborators (stjohn@fnal.gov or badgett@fnal.gov) to add you to the ~lariat/.k5login list, which will grant you SSH access.
154 57 Gustavo Valdiviesso
155 57 Gustavo Valdiviesso
* *VNC* - Finally opening the VNC. You may use a client of you choice. When it asks for a server, use *localhost:5900* which is our tunnel. The password is the same as the *lariat-doc-db* password (*%{color:red}NOT SBND's%*).
156 57 Gustavo Valdiviesso
157 57 Gustavo Valdiviesso
158 35 Gustavo Valdiviesso
** *Please do not interfere with the shifter by VNC!*  Contact the shifter on Google Hangouts to confirm a convenient time before you test your VNC.  
159 1 Jose Ignacio Crespo Anadon
* *Google Hangouts* from Chrome browser (phone function does not work in Firefox)
160 36 Gustavo Valdiviesso
** Try to make a free phone call to a US number using the hangouts dialer (may require installing Google Talk plugin first time)
161 35 Gustavo Valdiviesso
** This is how the Main Control Room will phone you (it will ring when they dial +1 331-442-4353) and it is how you should phone them.
162 35 Gustavo Valdiviesso
163 1 Jose Ignacio Crespo Anadon
h3. Windows needed on the shifter computer (or by VNC)
164 35 Gustavo Valdiviesso
165 35 Gustavo Valdiviesso
See these "snapshots":https://cdcvs.fnal.gov/redmine/projects/lariat-online/wiki/How_to_set_up_your_shift_station#Shifter-desktop-layout of the ROC-West desktop should give you a good idea about what to look for.
166 35 Gustavo Valdiviesso
167 35 Gustavo Valdiviesso
168 35 Gustavo Valdiviesso
169 35 Gustavo Valdiviesso
---
170 18 Gustavo Valdiviesso
171 18 Gustavo Valdiviesso
172 18 Gustavo Valdiviesso
h2(count). Verify that Synoptic and Acnet are running
173 1 Jose Ignacio Crespo Anadon
174 18 Gustavo Valdiviesso
175 19 Gustavo Valdiviesso
You should get familiar with them. Always keep them open and in clear view. If connecting remotely, you should see them in the VNC shared desktop.
176 18 Gustavo Valdiviesso
177 18 Gustavo Valdiviesso
https://cdcvs.fnal.gov/redmine/projects/lariat-online/wiki/Using_Synoptic_for_monitoring
178 18 Gustavo Valdiviesso
179 18 Gustavo Valdiviesso
https://redmine.fnal.gov/redmine/projects/lariat-online/wiki/Using_ACNET_for_monitoring
180 18 Gustavo Valdiviesso
181 17 Gustavo Valdiviesso
h2(count). Connect as the SBND shifter in the hangouts
182 1 Jose Ignacio Crespo Anadon
183 1 Jose Ignacio Crespo Anadon
When the previous shifter had time to call the MCR and declare the end of his/her shift, you may log into the shifter's Hangouts account with:
184 1 Jose Ignacio Crespo Anadon
185 17 Gustavo Valdiviesso
sbndshift@gmail.com
186 1 Jose Ignacio Crespo Anadon
187 17 Gustavo Valdiviesso
using the current SBND DocDB password. The SBND Shift chat is used by the collaborators to communicate with the shifters and between themselves about the VST operations.
188 1 Jose Ignacio Crespo Anadon
189 17 Gustavo Valdiviesso
h2(count). Log into the SBND Electronic Logbook 
190 17 Gustavo Valdiviesso
191 47 William Badgett
http://dbweb0.fnal.gov/ECL/sbnd
192 1 Jose Ignacio Crespo Anadon
193 18 Gustavo Valdiviesso
with your Services user. Make an *VST Start of Shift Cheklist* entry and follow the checklist, which includes calling the Main Control Room (see next step).
194 17 Gustavo Valdiviesso
195 18 Gustavo Valdiviesso
h2(count). Calling the Main Control Room (MCR)
196 17 Gustavo Valdiviesso
197 17 Gustavo Valdiviesso
198 17 Gustavo Valdiviesso
Remember to call MCR (x3721) at the beginning and ending of each shift. If you are remote, you can use the hangouts to do so, but you may have to install a plugin first.
199 17 Gustavo Valdiviesso
200 17 Gustavo Valdiviesso
Main Control Room (internationally) +1.630.840.3721
201 17 Gustavo Valdiviesso
202 17 Gustavo Valdiviesso
Tell the MCR that you are the next LARIAT SHIFTER and if you are local or remote. If you are remote, inform the MCR of your contact number, which is the hangouts voice service:
203 1 Jose Ignacio Crespo Anadon
204 1 Jose Ignacio Crespo Anadon
+1 331 442 4354
205 18 Gustavo Valdiviesso
206 18 Gustavo Valdiviesso
You have to call the MCR at the begging and ending of each shift!
207 18 Gustavo Valdiviesso
208 1 Jose Ignacio Crespo Anadon
h2(count). During your shift
209 50 Gustavo Valdiviesso
210 50 Gustavo Valdiviesso
*See the RUN PLAN at the top of the page.*
211 1 Jose Ignacio Crespo Anadon
212 59 Gustavo Valdiviesso
Either in your machine or in the one you are remotely operating via VNC, you have to keep 3 (three) independent terminals running: LArIAT DAQ, SBND DAQ and SBND DQM.
213 14 Gustavo Valdiviesso
214 20 Gustavo Valdiviesso
* LArIAT DAQ: https://cdcvs.fnal.gov/redmine/projects/lariat-online/wiki/LArIAT_DAQ_Instructions
215 14 Gustavo Valdiviesso
216 20 Gustavo Valdiviesso
* SBND DAQ and DQM: https://redmine.fnal.gov/redmine/projects/sbnddaq/wiki/Starting_DAQ_Software
217 1 Jose Ignacio Crespo Anadon
218 59 Gustavo Valdiviesso
If for any reason you have to access those yourself (sometimes it happens when the previous Kerberos ticket expires), here is how:
219 59 Gustavo Valdiviesso
220 59 Gustavo Valdiviesso
** With the tunnel open, log in to the lariat-gateway with the sbnd user:
221 59 Gustavo Valdiviesso
222 59 Gustavo Valdiviesso
<pre>
223 59 Gustavo Valdiviesso
kinit <youruser>@FNAL.GOV
224 59 Gustavo Valdiviesso
ssh -X -Y sbnd@lariat-gateway.fnal.gov
225 59 Gustavo Valdiviesso
</pre>
226 59 Gustavo Valdiviesso
227 67 William Badgett
once you are in the gateway, access lariat-daq00 if you want to launch the LArIAT DAQ, or lariat-daq04 for the SBND DAQ (you want both, so repeat this procedure twice).
228 59 Gustavo Valdiviesso
229 59 Gustavo Valdiviesso
<pre>
230 59 Gustavo Valdiviesso
kinit <youruser>@FNAL.GOV
231 59 Gustavo Valdiviesso
ssh -X -Y sbnd@lariat-daq04.fnal.gov
232 59 Gustavo Valdiviesso
</pre>
233 59 Gustavo Valdiviesso
234 81 Ron Rechenmacher
again, substitute daq04 with daq00 if you want to launch the LArIAT DAQ.
235 59 Gustavo Valdiviesso
236 67 William Badgett
In the DAQ00 window, execute the LArIAT script:
237 59 Gustavo Valdiviesso
238 59 Gustavo Valdiviesso
<pre>
239 1 Jose Ignacio Crespo Anadon
go
240 59 Gustavo Valdiviesso
</pre>
241 59 Gustavo Valdiviesso
242 67 William Badgett
Do *not* specify any arguments.
243 59 Gustavo Valdiviesso
244 59 Gustavo Valdiviesso
In the daq04 machine, excecute the SBND script:
245 59 Gustavo Valdiviesso
246 59 Gustavo Valdiviesso
<pre>
247 59 Gustavo Valdiviesso
startDAQInterface
248 59 Gustavo Valdiviesso
</pre>
249 59 Gustavo Valdiviesso
250 61 Gustavo Valdiviesso
You also need the SBND DQM website (which can only see this via Fermilab VPN or locally through the fgz network): https://sbn-online.fnal.gov/cgi-bin/minargon/minargon.wsgi
251 61 Gustavo Valdiviesso
If you are in a remote shift, you can open another terminal and make use of the tunnel. Launch your favorite browser from the terminal, for instance
252 1 Jose Ignacio Crespo Anadon
253 61 Gustavo Valdiviesso
<pre>
254 61 Gustavo Valdiviesso
google-chrome
255 61 Gustavo Valdiviesso
</pre>
256 1 Jose Ignacio Crespo Anadon
257 61 Gustavo Valdiviesso
and it will be able to access the DQM site.
258 60 Gustavo Valdiviesso
259 1 Jose Ignacio Crespo Anadon
260 1 Jose Ignacio Crespo Anadon
261 61 Gustavo Valdiviesso
Keep checking the Synoptics alarms and the DQM website. The DQM has several plots that should be updating every few minutes. If you see any of the time stamps getting too old, you may need to restart it (instructions above). Instructions on how the DQM works are in its first page.
262 1 Jose Ignacio Crespo Anadon
263 71 Ivan Lepetic
*Archiver checks*
264 71 Ivan Lepetic
Once an hour, check the status of the archiver by following the instructions on the [[Slow Controls Archiving]] page.
265 71 Ivan Lepetic
266 1 Jose Ignacio Crespo Anadon
267 61 Gustavo Valdiviesso
*%{color:red}Some Troubleshooting%*
268 1 Jose Ignacio Crespo Anadon
269 61 Gustavo Valdiviesso
If the SBND DAQ won't start, there are two steps to follow, in this order:
270 1 Jose Ignacio Crespo Anadon
271 61 Gustavo Valdiviesso
Step 1. Try again: sometimes it just need some persistence.
272 61 Gustavo Valdiviesso
273 62 Gustavo Valdiviesso
Step 2. Other times, it might need some clean up. Try running this script:
274 61 Gustavo Valdiviesso
275 61 Gustavo Valdiviesso
<pre>
276 61 Gustavo Valdiviesso
kill_ipcs
277 61 Gustavo Valdiviesso
</pre>
278 61 Gustavo Valdiviesso
279 61 Gustavo Valdiviesso
and go back to Step 1.
280 61 Gustavo Valdiviesso
281 63 Gustavo Valdiviesso
Another problem is data corruption. You will see the RMS of the Wires going through the roof. If that happens, try this one first without turning off the daq.
282 63 Gustavo Valdiviesso
283 63 Gustavo Valdiviesso
<pre>
284 63 Gustavo Valdiviesso
source start_bnl_ld.sh
285 63 Gustavo Valdiviesso
python WIB_nevis_sync.py
286 63 Gustavo Valdiviesso
</pre> 
287 63 Gustavo Valdiviesso
288 63 Gustavo Valdiviesso
After about 3 minutes, you should see the rms going back to normal. If not, then follow this recipe:
289 63 Gustavo Valdiviesso
290 63 Gustavo Valdiviesso
stop the daq (ctrl+C only once)
291 63 Gustavo Valdiviesso
292 69 Elizabeth Worcester
Reconfigure the cold electronics 
293 69 Elizabeth Worcester
Note: this is the standard CE configuration procedure, so can be used for any time configuration is needed. If starting from state where electronics are off, you can skip the FEMBoff step.
294 1 Jose Ignacio Crespo Anadon
<pre>
295 69 Elizabeth Worcester
ssh lariat-gateway02
296 63 Gustavo Valdiviesso
source start_bnl_ld.sh 
297 63 Gustavo Valdiviesso
source Local_diagnositc_RUN_FEMBoff.sh 
298 63 Gustavo Valdiviesso
source Local_diagnositc_RUN_FEMBon.sh 
299 63 Gustavo Valdiviesso
source Local_diagnositc_RUN_ext.sh 
300 63 Gustavo Valdiviesso
</pre> 
301 63 Gustavo Valdiviesso
302 70 William Badgett
start the daq on lariat-daq04
303 63 Gustavo Valdiviesso
304 63 Gustavo Valdiviesso
<pre>
305 63 Gustavo Valdiviesso
startDAQInterface
306 63 Gustavo Valdiviesso
</pre>
307 61 Gustavo Valdiviesso
308 10 Jonathan Asaadi
309 22 Gustavo Valdiviesso
Report any oddities in the e-log with a *default* form, under the *Vertical Slice Test* category.
310 6 Gustavo Valdiviesso
311 1 Jose Ignacio Crespo Anadon
h2. Event Display
312 79 Dominic Barker
313 78 Dominic Barker
There are two ways to the run the event display now. If you want to look at the most up to date data. Data which might not have gone through SAM yet you can log into the daq04 machine and use the event display there. Otherwise you can you the event display on the sbnd gpvms. 
314 76 Dominic Barker
315 78 Dominic Barker
h3. daq04 Event Display.
316 78 Dominic Barker
317 76 Dominic Barker
To run the event display. From the control room PC log into daq04: 
318 76 Dominic Barker
<pre>
319 76 Dominic Barker
ssh -X lariat-gateway -l sbnddqm -t ssh -X lariat-daq04
320 76 Dominic Barker
</pre>
321 76 Dominic Barker
322 76 Dominic Barker
Then run the command replacing the run number you wish to look at and the sub run number: 
323 76 Dominic Barker
<pre> 
324 76 Dominic Barker
./home/nfs/sbnd/SBND_DAQ2/bin/evd_vst  run_number sub_run_number
325 76 Dominic Barker
</pre>
326 76 Dominic Barker
327 76 Dominic Barker
This will bring up the standard event display which you can flick through the events. 
328 78 Dominic Barker
329 78 Dominic Barker
h3. SBND GPVM Event Display.
330 78 Dominic Barker
331 78 Dominic Barker
log into the sbndgpv01. Remember to kinit (kinit username@FNAL.GOV). 
332 78 Dominic Barker
<pre>
333 78 Dominic Barker
ssh username@sbndgpvm01.fnal.gov. 
334 78 Dominic Barker
</pre> 
335 78 Dominic Barker
336 78 Dominic Barker
Then got the VST directory in app just running the following command:
337 78 Dominic Barker
<pre>
338 78 Dominic Barker
cd /sbnd/app/users/VST
339 78 Dominic Barker
bash evd_vst.sh
340 78 Dominic Barker
</pre>
341 78 Dominic Barker
342 80 Dominic Barker
This will cycle through the events and automatically pick up and read the latest file. You can pause the cycle by typing PAUSE (upper or lower case) into the command line and pressing enter (you will not see that you are writing pause). You can then save the event display. Type PLAY (upper or lower case) to continue the loop. NOTE: If you press previous on the GUI then when you press play it will loop backwards. So press next once to sort the loop out.  Note that I've only just made it so it might be a little buggy. If you see an error about trying to write to a read-only database then someone is already running the event display in there.  Contact Dom Barker for issues.   
343 78 Dominic Barker
344 76 Dominic Barker
345 40 Gustavo Valdiviesso
---
346 41 Gustavo Valdiviesso
347 40 Gustavo Valdiviesso
---
348 41 Gustavo Valdiviesso
349 40 Gustavo Valdiviesso
---
350 6 Gustavo Valdiviesso
351 6 Gustavo Valdiviesso
h1. Advanced Stuff
352 6 Gustavo Valdiviesso
353 1 Jose Ignacio Crespo Anadon
h2. How to change the DAQ configuration to calibration mode
354 65 Jose Ignacio Crespo Anadon
355 64 Jose Ignacio Crespo Anadon
At lariat-daq04.fnal.gov, open the file /home/nfs/sbnd/SBND_DAQ2/bin/start_daq_interface.sh and comment the line
356 64 Jose Ignacio Crespo Anadon
> CONFIG=NevisTPCXMIT30 # External triggers 
357 64 Jose Ignacio Crespo Anadon
and uncomment the line
358 64 Jose Ignacio Crespo Anadon
> #CONFIG=NevisTPCCalib # Internal calibration triggers
359 64 Jose Ignacio Crespo Anadon
Then you can start a new run following the usual procedure. This will run the DAQ using internal triggers and a calibration pulse will be sent to the Magic Blue Box for each trigger.
360 64 Jose Ignacio Crespo Anadon
361 64 Jose Ignacio Crespo Anadon
When you are done, remember to undo the changes to the /home/nfs/sbnd/SBND_DAQ2/bin/start_daq_interface.sh file.
362 64 Jose Ignacio Crespo Anadon
363 6 Gustavo Valdiviesso
h2. How to run the DAQ for the BNL-Nevis integration test
364 64 Jose Ignacio Crespo Anadon
365 64 Jose Ignacio Crespo Anadon
(Note: this DAQ routine has been superseded by "How to change the DAQ configuration to calibration mode":https://cdcvs.fnal.gov/redmine/projects/vertical-slice-test/wiki#How-to-change-the-DAQ-configuration-to-calibration-mode . If you want to run the DAQ in calibration mode, follow the instructions there)
366 1 Jose Ignacio Crespo Anadon
367 1 Jose Ignacio Crespo Anadon
1. Make sure the Nevis crate and NIM bin are powered. Experts: (on-site) Davio Cianci, (off-site) José I. Crespo (Skype: josei.ca)
368 1 Jose Ignacio Crespo Anadon
2. ssh into the DAQ machine
369 4 William Badgett
Log into the SBND gateway (or you can create an FNAL VPN connection and skip sbnd-daq00, not needed on FNAL site)
370 1 Jose Ignacio Crespo Anadon
> ssh -Y sbnd-daq00.fnal.gov
371 1 Jose Ignacio Crespo Anadon
Log into the LArIAT gateway
372 1 Jose Ignacio Crespo Anadon
> ssh -Y lariat-gateway01.fnal.gov
373 1 Jose Ignacio Crespo Anadon
Log into the DAQ server using the common sbnd account (reserved for DAQ) 
374 1 Jose Ignacio Crespo Anadon
> ssh -Y sbnd@lariat-daq04
375 1 Jose Ignacio Crespo Anadon
3. Go to the jcrespo/ directory
376 1 Jose Ignacio Crespo Anadon
> cd jcrespo
377 1 Jose Ignacio Crespo Anadon
Run the DAQ-decoder-plotter script
378 1 Jose Ignacio Crespo Anadon
> ./run_and_plot_sbnddaq.sh
379 1 Jose Ignacio Crespo Anadon
and follow the instructions printed on screen. This script runs the DAQ in calibration mode (CALIB pulses are sent to the Magic Blue Box every 1 s) -- once you have collected the desired number of events, it requires you to stop the DAQ using CTRL + C twice --, then runs the binary decoder, and finally runs a ROOT analysis to plot the waveforms.
380 5 Jose Ignacio Crespo Anadon
381 5 Jose Ignacio Crespo Anadon
The data is saved in the directory /home/nfs/sbnd/jcrespo/runs
382 5 Jose Ignacio Crespo Anadon
The script makes a new directory for each run named RunYearMonthDayHourMinutesSecond (e.g. Run20180620113511).
383 5 Jose Ignacio Crespo Anadon
The raw binary data is the file named output_NevisTPCCALIB_generator.dat. For a hexdump, you can use
384 5 Jose Ignacio Crespo Anadon
> hexdump -v -e '8/2 "%04X ""\n"' output_NevisTPCCALIB_generator.dat | less
385 5 Jose Ignacio Crespo Anadon
(it will display the data in 8 columns with 2 bytes each). The ADC data is encoded in the lower 12 bits (3 last hex characters) of the words beginning with "0".
386 52 William Badgett
387 52 William Badgett
h2. How to configure [[LArIAT Trigger]]
388 66 William Badgett
389 66 William Badgett
Follow the link [[LArIAT Trigger]]
390 68 Dominic Barker
391 68 Dominic Barker
392 68 Dominic Barker
h2. How to Access Files
393 68 Dominic Barker
394 68 Dominic Barker
All files created for the VST test are initially created on lariat daq01 and daq04. They are despoiled in /daqdata and are quickly moved to /daqdat/dropbox where they last for ~2 days until they are moved to SAM. Files beginning with sbnd are the raw data non-decoded files. Files beginning with digits_sbnd are larsoft friendly files. These have been decoded and raw:digits objects have been created. Files beginning with lariat for the corresponding runs contain the beam-line detector information.    
395 68 Dominic Barker
396 68 Dominic Barker
Raw Data files starting with sbnd from runs prior to Thursday 13th July are now temporarily being stored in /pnfs/sbnd/persistent/users/VST/sbnd_files. You can access these from the SBND GPVM. Gray is putting the digits on pnfs as well. Soon there will be the corresponding digits file as well.  
397 68 Dominic Barker
398 68 Dominic Barker
All Other files can be found on SAM. All the files come under the lariat experiment name so make sure there is a "-e lariat" in the commands you write.  To Quickly access the files here is a set of instructions: 
399 68 Dominic Barker
400 68 Dominic Barker
Setup the required stuff. 
401 68 Dominic Barker
<pre>
402 68 Dominic Barker
source /grid/fermiapp/products/setups.sh; 
403 68 Dominic Barker
setup ifdhc; 
404 68 Dominic Barker
setup sam_web_client; 
405 68 Dominic Barker
setup fife_utils; 
406 68 Dominic Barker
</pre>
407 68 Dominic Barker
408 68 Dominic Barker
To Look at the files available you can use some of the "SAM commands":https://cdcvs.fnal.gov/redmine/projects/sam-main/wiki/Sam_web_client_Command_Reference. Here is a few examples:   
409 68 Dominic Barker
410 68 Dominic Barker
To see a list of files from after a date: 
411 68 Dominic Barker
<pre>samweb -e lariat list-files "start_time > 02-Jul-2018" </pre>
412 68 Dominic Barker
413 68 Dominic Barker
To see all the files which have  sbnd: 
414 68 Dominic Barker
<pre>samweb -e lariat list-files "file_name like sbnd_r%.root" </pre>
415 68 Dominic Barker
416 68 Dominic Barker
To use metadata. 
417 68 Dominic Barker
<pre>samweb list-files -e lariat "MetaDataName = value"</pre>
418 68 Dominic Barker
419 68 Dominic Barker
Use And to do two or more filters :
420 68 Dominic Barker
<pre>samweb -e lariat list-files "start_time > 02-Jul-2018" AND file_name like sbnd_r%.root </pre>
421 68 Dominic Barker
422 68 Dominic Barker
You can look at the MetaData in the files by running: 
423 68 Dominic Barker
<pre>samweb -e lariat get-metadata file.root</pre>
424 68 Dominic Barker
425 68 Dominic Barker
You can locate the file on enstore: 
426 68 Dominic Barker
<pre>samweb -e lariat locate-file file.root </pre> 
427 68 Dominic Barker
428 68 Dominic Barker
To use the files you have to stage them and copy them into your directory. This "can be done":https://cdcvs.fnal.gov/redmine/projects/sbndcode/wiki/_How_to_create_and_use_a_SAM_definition using "project.py":https://cdcvs.fnal.gov/redmine/projects/larbatch/wiki/User_guide as a wrapper once definitions of the data have been created. 
429 68 Dominic Barker
For now you can use ifdh_fetch to fetch one or more files. It works in the same way as SAM and here is a couple examples on using it: 
430 68 Dominic Barker
431 68 Dominic Barker
Know the file name: 
432 68 Dominic Barker
<pre>ifdh_fetch -e lariat filename.root</pre>
433 68 Dominic Barker
434 68 Dominic Barker
Copy every file with a name that begins with sbnd_r. (NOTE: We have the downloaded so don't do it again. Just run on them. If they have been deleted because it has been a long time and we need the space for MC productions then you can download them but make sure we have the space!): 
435 68 Dominic Barker
436 68 Dominic Barker
<pre>ifdh_fetch -e lariat --dims "file_name like sbnd_r%.root"</pre> 
437 68 Dominic Barker
438 79 Dominic Barker
For more sbnd specific information you can find another wiki here: https://cdcvs.fnal.gov/redmine/projects/sbndcode/wiki/_How_to_create_and_use_a_SAM_definition.