forked from UCATLAS/xAODAnaHelpers
/
FAQs.html
318 lines (205 loc) · 17.1 KB
/
FAQs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>xAH FAQ — xAODAnaHelpers 59c93cf documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/collapsible-lists/js/CollapsibleLists.compressed.js"></script>
<script type="text/javascript" src="_static/collapsible-lists/js/apply-collapsible-lists.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/collapsible-lists/css/tree_view.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="API Reference" href="API.html" />
<link rel="prev" title="Brian Tuan’s Tutorial" href="Tutorial_BrianTuan.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> xAODAnaHelpers
</a>
<div class="version">
59c93cf
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Installing.html">Installing</a></li>
<li class="toctree-l1"><a class="reference internal" href="UsingUs.html">xAH_run.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="Algorithms.html">Algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="Development.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="Community.html">Community</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">xAH FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#how-do-i">How do I…</a></li>
<li class="toctree-l2"><a class="reference internal" href="#slc6-vs-slc7">SLC6 vs SLC7</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="API.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/library_root.html">Doxygen API</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">xAODAnaHelpers</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>xAH FAQ</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/FAQs.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="xah-faq">
<span id="faq"></span><h1>xAH FAQ<a class="headerlink" href="#xah-faq" title="Permalink to this headline">¶</a></h1>
<p>This is a list of Frequently Asked Questions about xAODAnaHelpers and analysis software. Feel free to suggest new entries!</p>
<div class="section" id="how-do-i">
<h2>How do I…<a class="headerlink" href="#how-do-i" title="Permalink to this headline">¶</a></h2>
<dl>
<dt>… submit a grid (prun) job?</dt><dd><p>Start with a minimal environment:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">lsetup</span> <span class="n">panda</span>
</pre></div>
</div>
<p>and a minimal configuration script:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">from</span> <span class="n">xAH_config</span> <span class="n">import</span> <span class="n">xAH_config</span>
<span class="n">c</span> <span class="o">=</span> <span class="n">xAH_config</span><span class="p">()</span>
<span class="n">c</span><span class="p">.</span><span class="n">algorithm</span><span class="p">(</span><span class="s">"BasicEventSelection"</span><span class="p">,</span> <span class="p">{</span><span class="s">"m_name"</span><span class="o">:</span> <span class="s">"test"</span><span class="p">,</span> <span class="s">"m_useMetaData"</span><span class="o">:</span> <span class="n">False</span><span class="p">})</span>
</pre></div>
</div>
<p>Then we can submit a job:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">xAH_run</span><span class="p">.</span><span class="n">py</span> <span class="o">--</span><span class="n">files</span> <span class="s">"user.lgagnon.370150.Gtt.DAOD_SUSY10.e4049_s2608_r6765_r6282_p2411_tag_10_v1_output_xAOD.root"</span> \
<span class="o">--</span><span class="n">config</span><span class="o">=</span><span class="n">test</span><span class="p">.</span><span class="n">py</span> <span class="n">prun</span> <span class="o">--</span><span class="n">optGridMergeOutput</span><span class="o">=</span><span class="mi">1</span> \
<span class="o">--</span><span class="n">optGridNFilesPerJob</span><span class="o">=</span><span class="mf">1.0</span> <span class="o">--</span><span class="n">optGridOutputSampleName</span><span class="o">=</span><span class="n">user</span><span class="p">.</span><span class="n">gstark</span><span class="p">.</span><span class="n">test</span>
</pre></div>
</div>
</dd>
<dt>… submit <code class="docutils literal notranslate"><span class="pre">xAH_run</span></code> jobs with production privileges?</dt><dd><p>You can use <code class="docutils literal notranslate"><span class="pre">--optSubmitFlags="--official"</span></code> or <code class="docutils literal notranslate"><span class="pre">--optOfficial=1</span></code> (?):</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span> <span class="n">xAH_run</span><span class="p">.</span><span class="n">py</span> <span class="o">--</span><span class="n">files</span> <span class="n">MultijetAlgo</span><span class="o">/</span><span class="n">scripts</span><span class="o">/</span><span class="n">grid_samples_EXOT1_data</span><span class="p">.</span><span class="n">txt</span> <span class="o">--</span><span class="n">inputList</span> \
<span class="o">--</span><span class="n">config</span> <span class="n">MultijetAlgo</span><span class="o">/</span><span class="n">scripts</span><span class="o">/</span><span class="n">config_MultijetAlgo</span><span class="p">.</span><span class="n">py</span> <span class="o">-</span><span class="n">f</span> <span class="o">--</span><span class="n">inputDQ2</span> <span class="n">prun</span> \
<span class="o">--</span><span class="n">optGridOutputSampleName</span><span class="o">=</span><span class="s">"group.phys-exotics.%in:name[1]%.%in:name[2]%.%in:name[3]%.v0.1_20150921/"</span> \
<span class="o">--</span><span class="n">optSubmitFlags</span><span class="o">=</span><span class="s">"--official"</span>
</pre></div>
</div>
</dd>
<dt>… use <code class="docutils literal notranslate"><span class="pre">AnaToolHandle</span></code> for ASG CP tools?</dt><dd><p>Unfortunately there’s no much documentation out there, so everything written here comes from direct email question to ASG fellows, or looking at the <a class="reference external" href="https://svnweb.cern.ch/trac/atlasoff/browser/Control/AthToolSupport/AsgTools/trunk/AsgTools/AnaToolHandle.h">source code</a></p>
<ol class="arabic">
<li><p>Make the tool handle as a member of a xAH algorithm (NB: remember to set the <strong>interface</strong> class of the CP tool. Just prepend an `I` to the tool type):</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">MyAlgo</span> <span class="o">:</span> <span class="k">public</span> <span class="n">xAH</span><span class="o">::</span><span class="n">Algorithm</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="k">private</span><span class="o">:</span>
<span class="p">...</span>
<span class="n">asg</span><span class="o">::</span><span class="n">AnaToolHandle</span><span class="o"><</span><span class="n">IMyToolType</span><span class="o">></span> <span class="n">m_mytool_handle</span><span class="p">;</span> <span class="c1">//!</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p>In the xAH algorithm initialisation list, call the tool handle constructor. The argument of the constructor must be a string with the tool type and tool name separated by a slash `/` . In general, the tool name in the constructor can be just a dummy string, as it can be changed afterwards:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">MyAlgo</span> <span class="o">::</span> <span class="n">MyAlgo</span> <span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">className</span><span class="p">)</span> <span class="o">:</span>
<span class="p">...</span>
<span class="n">m_mytool_handle</span><span class="p">(</span><span class="s">"MyToolType/MyToolName"</span><span class="p">),</span>
<span class="p">...</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p>In some cases the name of the tool has to be different than the one set in the constructor. E.g., for the efficiency correctors, the tool names must depend on the configuration of the algorithm, which is set only <strong>after</strong> the initialisation list is executed. In such situations, the name of the tool can be modified (typically this would happen in <code class="docutils literal notranslate"><span class="pre">EL::initialize()</span></code>) with:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">EL</span><span class="o">::</span><span class="n">StatusCode</span> <span class="n">BasicEventSelection</span> <span class="o">::</span> <span class="n">initialize</span> <span class="p">()</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="n">m_mytool_handle</span><span class="p">.</span><span class="n">make</span><span class="p">(</span><span class="s">"MyToolType/MyToolNewName"</span><span class="p">);</span>
<span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p>In <code class="docutils literal notranslate"><span class="pre">EL::initialize()</span></code>, set the properties and initialise the tool handle. After <code class="docutils literal notranslate"><span class="pre">m_mytool_handle.initialize()</span></code> has been called, it will effectively behave like a pointer to the tool itself:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">EL</span><span class="o">::</span><span class="n">StatusCode</span> <span class="n">BasicEventSelection</span> <span class="o">::</span> <span class="n">initialize</span> <span class="p">()</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="n">m_mytool_handle</span><span class="p">.</span><span class="n">make</span><span class="p">(</span><span class="s">"MyToolType/MyToolNewName"</span><span class="p">);</span>
<span class="n">m_mytool_handle</span><span class="p">.</span><span class="n">SetProperty</span><span class="p">(...);</span>
<span class="n">m_mytool_handle</span><span class="p">.</span><span class="n">initialize</span><span class="p">();</span>
<span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p>In the algorithm, use the tool associated to the handle via calls like <code class="docutils literal notranslate"><span class="pre">m_mytool_handle->doStuff()</span></code>.</p></li>
<li><p>The tool associated to the handle will be automatically destroyed when appropriate. Hence, no need to call <code class="docutils literal notranslate"><span class="pre">delete</span></code> anywhere.</p></li>
</ol>
<p>If the same tool (identified by its name) needs to be used in another xAH algorithm downstream, just declare a tool handle member with the same <code class="docutils literal notranslate"><span class="pre">IMyToolType</span></code>, call its constructor in the initialisation list and (if needed) change its tool name with <code class="docutils literal notranslate"><span class="pre">make()</span></code>. Then in <code class="docutils literal notranslate"><span class="pre">EL::initialize()</span></code> simply call <code class="docutils literal notranslate"><span class="pre">m_mytool_handle.initialize()</span></code>, without setting any property. It will automagically get the pointer to the correct tool from a registry, and all the tool properties will be preserved from the previous initialisation.</p>
</dd>
</dl>
</div>
<div class="section" id="slc6-vs-slc7">
<h2>SLC6 vs SLC7<a class="headerlink" href="#slc6-vs-slc7" title="Permalink to this headline">¶</a></h2>
<p>If you’re running into issues with grid submission because of checks for SLC7-compatible machines in <cite>xAH_run.py</cite> preventing you from doing so, then you can either:</p>
<ul class="simple">
<li><p>ssh into lxplus SLC7 (<code class="docutils literal notranslate"><span class="pre">lxplus.cern.ch</span></code>)</p></li>
<li><p>run in a containerized SLC7 environment (<code class="docutils literal notranslate"><span class="pre">setupATLAS</span> <span class="pre">-c</span> <span class="pre">slc6</span></code>)</p></li>
</ul>
<p>If you think this message is happening in error, <a class="reference external" href="https://github.com/UCATLAS/xAODAnaHelpers/issues/new">file an issue</a> giving us the output from the following commands:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">lsb_release</span> <span class="pre">-d</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">printenv</span> <span class="pre">|</span> <span class="pre">grep</span> <span class="pre">_PLATFORM</span></code></p></li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="API.html" class="btn btn-neutral float-right" title="API Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Tutorial_BrianTuan.html" class="btn btn-neutral float-left" title="Brian Tuan’s Tutorial" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2015-2017, ATLAS Collaboration
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>