/[PAMELA software]/PamCut/doc/Doxygen/html/classCollectionAction.html
ViewVC logotype

Contents of /PamCut/doc/Doxygen/html/classCollectionAction.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Wed May 27 13:30:07 2009 UTC (15 years, 10 months ago) by pam-fi
Branch: MAIN
Branch point for: DEV
File MIME type: text/html
Initial revision

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 <title>PamCut: CollectionAction Class Reference</title>
4 <link href="tabs.css" rel="stylesheet" type="text/css">
5 <link href="doxygen.css" rel="stylesheet" type="text/css">
6 </head><body>
7 <!-- Generated by Doxygen 1.5.9 -->
8 <div class="navigation" id="top">
9 <div class="tabs">
10 <ul>
11 <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
13 <li><a href="files.html"><span>Files</span></a></li>
14 </ul>
15 </div>
16 <div class="tabs">
17 <ul>
18 <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
19 <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
20 <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
21 </ul>
22 </div>
23 </div>
24 <div class="contents">
25 <h1>CollectionAction Class Reference</h1><!-- doxytag: class="CollectionAction" -->An abstract class that defines the interface of a generic collection action.
26 <a href="#_details">More...</a>
27 <p>
28 <code>#include &lt;<a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>&gt;</code>
29 <p>
30 <div class="dynheader">
31 Inheritance diagram for CollectionAction:</div>
32 <div class="dynsection">
33
34 <p><center><img src="classCollectionAction.png" usemap="#CollectionAction_map" border="0" alt=""></center>
35 <map name="CollectionAction_map">
36 <area href="classChargeHistosAction.html" alt="ChargeHistosAction" shape="rect" coords="0,56,187,80">
37 <area href="classEvRateS11VsCutoffHistoAction.html" alt="EvRateS11VsCutoffHistoAction" shape="rect" coords="197,56,384,80">
38 <area href="classFluxHistoAction.html" alt="FluxHistoAction" shape="rect" coords="394,56,581,80">
39 <area href="classSaveEventsAction.html" alt="SaveEventsAction" shape="rect" coords="591,56,778,80">
40 </map>
41 </div>
42
43 <p>
44 <a href="classCollectionAction-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
45 <tr><td></td></tr>
46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
47 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#35e6d0d0351e0fafe4b508faeb3598d6">CollectionAction</a> (const char *actionName)</td></tr>
48
49 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <a href="#35e6d0d0351e0fafe4b508faeb3598d6"></a><br></td></tr>
50 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#d327a6cfdc6148db563ae52aa004e098">~CollectionAction</a> ()</td></tr>
51
52 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#d327a6cfdc6148db563ae52aa004e098"></a><br></td></tr>
53 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#13adbcacf5e088f7979f0644a65372b4">Setup</a> (PamLevel2 *events)</td></tr>
54
55 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The initialization routine. <a href="#13adbcacf5e088f7979f0644a65372b4"></a><br></td></tr>
56 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#801dd664020b71e8a3232e5a584d96a0">OnGood</a> (PamLevel2 *event)=0</td></tr>
57
58 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine for selected events. <a href="#801dd664020b71e8a3232e5a584d96a0"></a><br></td></tr>
59 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#ef4ee9fd63c0d232e90694e068e6e339">OnBad</a> (PamLevel2 *event, int selectionResult)</td></tr>
60
61 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Routine for discarded events. <a href="#ef4ee9fd63c0d232e90694e068e6e339"></a><br></td></tr>
62 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#c32b42fc08bc1be7b003579b633de041">Finalize</a> ()=0</td></tr>
63
64 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The finalization routine. <a href="#c32b42fc08bc1be7b003579b633de041"></a><br></td></tr>
65 <tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#96783ca0685b2095bf519c17a057c926">GetName</a> ()</td></tr>
66
67 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the action name. <a href="#96783ca0685b2095bf519c17a057c926"></a><br></td></tr>
68 <tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
69 <tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollectionAction.html#5c046c663d75fdcb53d00cda91cc3509">_actionName</a></td></tr>
70
71 </table>
72 <hr><a name="_details"></a><h2>Detailed Description</h2>
73 An abstract class that defines the interface of a generic collection action.
74 <p>
75 The <a class="el" href="classCollectionAction.html" title="An abstract class that defines the interface of a generic collection action.">CollectionAction</a> abstract class defines an interface for a generic action object which can be used to implement common actions that can be done by collections, like filling histograms or saving selected events. The structure of this class mimicks that of a standard collection: it has a <a class="el" href="classCollectionAction.html#13adbcacf5e088f7979f0644a65372b4" title="The initialization routine.">Setup()</a> and a <a class="el" href="classCollectionAction.html#c32b42fc08bc1be7b003579b633de041" title="The finalization routine.">Finalize()</a> methods that are meant to be called at the beginning and at the end of the selection procedure, respectively. In <a class="el" href="classCollectionAction.html#13adbcacf5e088f7979f0644a65372b4" title="The initialization routine.">Setup()</a> one can prepare the analysis actions like instantiating a histogram object (this can be done also in the constructor), while in <a class="el" href="classCollectionAction.html#c32b42fc08bc1be7b003579b633de041" title="The finalization routine.">Finalize()</a> the analysis can be closed by, eg., writing histograms on a file and closing that file. The two methods <a class="el" href="classCollectionAction.html#801dd664020b71e8a3232e5a584d96a0" title="Routine for selected events.">OnGood()</a> and <a class="el" href="classCollectionAction.html#ef4ee9fd63c0d232e90694e068e6e339" title="Routine for discarded events.">OnBad()</a> have exactly the same purpose they have in a Collection: to define action to perform each time an event is selected as good or bad. The class <a class="el" href="classSmartCollection.html" title="A collection class designed to use CollectionAction objects.">SmartCollection</a> is specially designed to handle <a class="el" href="classCollectionAction.html" title="An abstract class that defines the interface of a generic collection action.">CollectionAction</a> objects: see the documentation of <a class="el" href="classSmartCollection.html" title="A collection class designed to use CollectionAction objects.">SmartCollection</a> for info on how these objects are handled.
76 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00030">30</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
77 <hr><h2>Constructor &amp; Destructor Documentation</h2>
78 <a class="anchor" name="35e6d0d0351e0fafe4b508faeb3598d6"></a><!-- doxytag: member="CollectionAction::CollectionAction" ref="35e6d0d0351e0fafe4b508faeb3598d6" args="(const char *actionName)" -->
79 <div class="memitem">
80 <div class="memproto">
81 <table class="memname">
82 <tr>
83 <td class="memname">CollectionAction::CollectionAction </td>
84 <td>(</td>
85 <td class="paramtype">const char *&nbsp;</td>
86 <td class="paramname"> <em>actionName</em> </td>
87 <td>&nbsp;)&nbsp;</td>
88 <td><code> [inline]</code></td>
89 </tr>
90 </table>
91 </div>
92 <div class="memdoc">
93
94 <p>
95 Constructor.
96 <p>
97 <dl compact><dt><b>Parameters:</b></dt><dd>
98 <table border="0" cellspacing="2" cellpadding="0">
99 <tr><td valign="top"></td><td valign="top"><em>actionName</em>&nbsp;</td><td>The action's name. </td></tr>
100 </table>
101 </dl>
102
103 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00037">37</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
104
105 </div>
106 </div><p>
107 <a class="anchor" name="d327a6cfdc6148db563ae52aa004e098"></a><!-- doxytag: member="CollectionAction::~CollectionAction" ref="d327a6cfdc6148db563ae52aa004e098" args="()" -->
108 <div class="memitem">
109 <div class="memproto">
110 <table class="memname">
111 <tr>
112 <td class="memname">virtual CollectionAction::~CollectionAction </td>
113 <td>(</td>
114 <td class="paramname"> </td>
115 <td>&nbsp;)&nbsp;</td>
116 <td><code> [inline, virtual]</code></td>
117 </tr>
118 </table>
119 </div>
120 <div class="memdoc">
121
122 <p>
123 Destructor.
124 <p>
125
126 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00041">41</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
127
128 </div>
129 </div><p>
130 <hr><h2>Member Function Documentation</h2>
131 <a class="anchor" name="c32b42fc08bc1be7b003579b633de041"></a><!-- doxytag: member="CollectionAction::Finalize" ref="c32b42fc08bc1be7b003579b633de041" args="()=0" -->
132 <div class="memitem">
133 <div class="memproto">
134 <table class="memname">
135 <tr>
136 <td class="memname">virtual void CollectionAction::Finalize </td>
137 <td>(</td>
138 <td class="paramname"> </td>
139 <td>&nbsp;)&nbsp;</td>
140 <td><code> [pure virtual]</code></td>
141 </tr>
142 </table>
143 </div>
144 <div class="memdoc">
145
146 <p>
147 The finalization routine.
148 <p>
149 This method is intended to be called at the end of the analysis. Its implementations contain the finalizing procedures, like writing histograms to file or printing reports. It is automatically called by <a class="el" href="classSmartCollection.html#8105730615ad127a482a7fb399695977" title="The post-analysis task definition.">SmartCollection::Finalize()</a>.
150 <p>Implemented in <a class="el" href="classChargeHistosAction.html#b0aa2e207eea6e8f80c89197f9705dbe">ChargeHistosAction</a>, <a class="el" href="classEvRateS11VsCutoffHistoAction.html#71062bd029caf54cb174b9b8df5ed6ad">EvRateS11VsCutoffHistoAction</a>, <a class="el" href="classFluxHistoAction.html#4565d0ea3ca0f895af489455dfd5ff04">FluxHistoAction</a>, and <a class="el" href="classSaveEventsAction.html#790f534c0a888c2a57814cd859b97270">SaveEventsAction</a>.</p>
151
152 </div>
153 </div><p>
154 <a class="anchor" name="96783ca0685b2095bf519c17a057c926"></a><!-- doxytag: member="CollectionAction::GetName" ref="96783ca0685b2095bf519c17a057c926" args="()" -->
155 <div class="memitem">
156 <div class="memproto">
157 <table class="memname">
158 <tr>
159 <td class="memname">const char* CollectionAction::GetName </td>
160 <td>(</td>
161 <td class="paramname"> </td>
162 <td>&nbsp;)&nbsp;</td>
163 <td><code> [inline]</code></td>
164 </tr>
165 </table>
166 </div>
167 <div class="memdoc">
168
169 <p>
170 Returns the action name.
171 <p>
172
173 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00089">89</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
174
175 <p>References <a class="el" href="CollectionAction_8h_source.html#l00094">_actionName</a>.</p>
176
177 <p>Referenced by <a class="el" href="FluxHistoAction_8cpp_source.html#l00079">FluxHistoAction::Finalize()</a>.</p>
178
179 </div>
180 </div><p>
181 <a class="anchor" name="ef4ee9fd63c0d232e90694e068e6e339"></a><!-- doxytag: member="CollectionAction::OnBad" ref="ef4ee9fd63c0d232e90694e068e6e339" args="(PamLevel2 *event, int selectionResult)" -->
182 <div class="memitem">
183 <div class="memproto">
184 <table class="memname">
185 <tr>
186 <td class="memname">virtual void CollectionAction::OnBad </td>
187 <td>(</td>
188 <td class="paramtype">PamLevel2 *&nbsp;</td>
189 <td class="paramname"> <em>event</em>, </td>
190 </tr>
191 <tr>
192 <td class="paramkey"></td>
193 <td></td>
194 <td class="paramtype">int&nbsp;</td>
195 <td class="paramname"> <em>selectionResult</em></td><td>&nbsp;</td>
196 </tr>
197 <tr>
198 <td></td>
199 <td>)</td>
200 <td></td><td></td><td><code> [inline, virtual]</code></td>
201 </tr>
202 </table>
203 </div>
204 <div class="memdoc">
205
206 <p>
207 Routine for discarded events.
208 <p>
209 The concrete implementations define what to do when an event is discarded. This is conceptually the same as <a class="el" href="classPamCut.html#cbb3b507d79f20878fac4392ffa57acb" title="Post-selection tasks.">PamCut::OnBad()</a>. Call to this method is automatically done in <a class="el" href="classSmartCollection.html#99ac049c98461fbe04167f386ca7ed76" title="Post-selection tasks.">SmartCollection::OnBad()</a>. This method is not pure virtual, since many times there's nothing to do when a cut fails; this way, it's not necessary to implement it in derived classes. Current implementation is void.<p>
210 <dl compact><dt><b>Parameters:</b></dt><dd>
211 <table border="0" cellspacing="2" cellpadding="0">
212 <tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>The selected event. </td></tr>
213 <tr><td valign="top"></td><td valign="top"><em>selectionResult</em>&nbsp;</td><td>The code describing the reason of cut's failure (collections will automatically pass the index of the failed cut as selectionResult). </td></tr>
214 </table>
215 </dl>
216
217 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00078">78</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
218
219 </div>
220 </div><p>
221 <a class="anchor" name="801dd664020b71e8a3232e5a584d96a0"></a><!-- doxytag: member="CollectionAction::OnGood" ref="801dd664020b71e8a3232e5a584d96a0" args="(PamLevel2 *event)=0" -->
222 <div class="memitem">
223 <div class="memproto">
224 <table class="memname">
225 <tr>
226 <td class="memname">virtual void CollectionAction::OnGood </td>
227 <td>(</td>
228 <td class="paramtype">PamLevel2 *&nbsp;</td>
229 <td class="paramname"> <em>event</em> </td>
230 <td>&nbsp;)&nbsp;</td>
231 <td><code> [pure virtual]</code></td>
232 </tr>
233 </table>
234 </div>
235 <div class="memdoc">
236
237 <p>
238 Routine for selected events.
239 <p>
240 The concrete implementations define what to do when an event is selected. This is conceptually the same as <a class="el" href="classPamCut.html#56021e959232270c12528ddec3062985" title="Post-selection tasks.">PamCut::OnGood()</a>. Call to this method is automatically done in <a class="el" href="classSmartCollection.html#13ce6deb47b60d10225598dd1201cd80" title="Post-selection tasks.">SmartCollection::OnGood()</a>.<p>
241 <dl compact><dt><b>Parameters:</b></dt><dd>
242 <table border="0" cellspacing="2" cellpadding="0">
243 <tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>The selected event. </td></tr>
244 </table>
245 </dl>
246
247 <p>Implemented in <a class="el" href="classChargeHistosAction.html#315d81cbff24a228c85b648393d67107">ChargeHistosAction</a>, <a class="el" href="classEvRateS11VsCutoffHistoAction.html#bb38c1bcb9d3e52abd6f929db8577ac6">EvRateS11VsCutoffHistoAction</a>, <a class="el" href="classFluxHistoAction.html#363f9657ac69e1051449ec1907c04809">FluxHistoAction</a>, and <a class="el" href="classSaveEventsAction.html#47e8259afe7a68ba3c0adf3bd79fe52a">SaveEventsAction</a>.</p>
248
249 </div>
250 </div><p>
251 <a class="anchor" name="13adbcacf5e088f7979f0644a65372b4"></a><!-- doxytag: member="CollectionAction::Setup" ref="13adbcacf5e088f7979f0644a65372b4" args="(PamLevel2 *events)" -->
252 <div class="memitem">
253 <div class="memproto">
254 <table class="memname">
255 <tr>
256 <td class="memname">virtual void CollectionAction::Setup </td>
257 <td>(</td>
258 <td class="paramtype">PamLevel2 *&nbsp;</td>
259 <td class="paramname"> <em>events</em> </td>
260 <td>&nbsp;)&nbsp;</td>
261 <td><code> [inline, virtual]</code></td>
262 </tr>
263 </table>
264 </div>
265 <div class="memdoc">
266
267 <p>
268 The initialization routine.
269 <p>
270 In this routine the initialization procedure is to be defined. <a class="el" href="classSmartCollection.html" title="A collection class designed to use CollectionAction objects.">SmartCollection</a> objects will call <a class="el" href="classCollectionAction.html#13adbcacf5e088f7979f0644a65372b4" title="The initialization routine.">Setup()</a> for each <a class="el" href="classCollectionAction.html" title="An abstract class that defines the interface of a generic collection action.">CollectionAction</a> object they hold during <a class="el" href="classSmartCollection.html#9b5b11a854b9e174218ea516ceffb34c" title="The pre-analysis task definition.">SmartCollection::Setup()</a>. This method is intended for some possible post-constructor initialization, like those who need to know the PamLevel2 object (eg., clone trees selection). This method is likely to be unnecessary most of the times, so it is implemented as a void function and it's not pure virtual.<p>
271 <dl compact><dt><b>Parameters:</b></dt><dd>
272 <table border="0" cellspacing="2" cellpadding="0">
273 <tr><td valign="top"></td><td valign="top"><em>events</em>&nbsp;</td><td>The PamLevel2 events which will be analyzed by the collection hosting the action. </td></tr>
274 </table>
275 </dl>
276
277 <p>Reimplemented in <a class="el" href="classSaveEventsAction.html#3a59e42181c79dcd192b0be3d14a34c2">SaveEventsAction</a>.</p>
278
279 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00055">55</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
280
281 </div>
282 </div><p>
283 <hr><h2>Member Data Documentation</h2>
284 <a class="anchor" name="5c046c663d75fdcb53d00cda91cc3509"></a><!-- doxytag: member="CollectionAction::_actionName" ref="5c046c663d75fdcb53d00cda91cc3509" args="" -->
285 <div class="memitem">
286 <div class="memproto">
287 <table class="memname">
288 <tr>
289 <td class="memname">const char* <a class="el" href="classCollectionAction.html#5c046c663d75fdcb53d00cda91cc3509">CollectionAction::_actionName</a><code> [private]</code> </td>
290 </tr>
291 </table>
292 </div>
293 <div class="memdoc">
294
295 <p>
296
297 <p>Definition at line <a class="el" href="CollectionAction_8h_source.html#l00094">94</a> of file <a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a>.</p>
298
299 <p>Referenced by <a class="el" href="CollectionAction_8h_source.html#l00089">GetName()</a>.</p>
300
301 </div>
302 </div><p>
303 <hr>The documentation for this class was generated from the following file:<ul>
304 <li>CollectionActions/CollectionAction/<a class="el" href="CollectionAction_8h_source.html">CollectionAction.h</a></ul>
305 </div>
306 <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 15:21:36 2009 for PamCut by&nbsp;
307 <a href="http://www.doxygen.org/index.html">
308 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
309 </body>
310 </html>

  ViewVC Help
Powered by ViewVC 1.1.23