]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/html/AliHLTPHOSHistogramProducerComponent_8cxx-source.html
New component for writing calibration data to fxs (Oystein)
[u/mrichter/AliRoot.git] / HLT / PHOS / html / AliHLTPHOSHistogramProducerComponent_8cxx-source.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>AliHLTPHOS: AliHLTPHOSHistogramProducerComponent.cxx Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.9.1 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>AliHLTPHOSHistogramProducerComponent.cxx</h1><a href="AliHLTPHOSHistogramProducerComponent_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/**************************************************************************</span>
9 00002 <span class="comment"> * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *</span>
10 00003 <span class="comment"> *                                                                        *</span>
11 00004 <span class="comment"> * Authors: Boris Polichtchouk &amp; Per Thomas Hille for the ALICE           *</span>
12 00005 <span class="comment"> * offline/HLT Project. Contributors are mentioned in the code where      *</span>
13 00006 <span class="comment"> * appropriate.                                                           *</span>
14 00007 <span class="comment"> *                                                                        *</span>
15 00008 <span class="comment"> * Permission to use, copy, modify and distribute this software and its   *</span>
16 00009 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted   *</span>
17 00010 <span class="comment"> * without fee, provided that the above copyright notice appears in all   *</span>
18 00011 <span class="comment"> * copies and that both the copyright notice and this permission notice   *</span>
19 00012 <span class="comment"> * appear in the supporting documentation. The authors make no claims     *</span>
20 00013 <span class="comment"> * about the suitability of this software for any purpose. It is          *</span>
21 00014 <span class="comment"> * provided "as is" without express or implied warranty.                  *</span>
22 00015 <span class="comment"> **************************************************************************/</span>
23 00016 
24 00017 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSHistogramProducerComponent_8h.html">AliHLTPHOSHistogramProducerComponent.h</a>"</span>
25 00018 <span class="preprocessor">#include "AliRawReaderMemory.h"</span>
26 00019 <span class="preprocessor">#include "AliCaloRawStream.h"</span>
27 00020 <span class="comment">//#include "cstdio"</span>
28 00021 <span class="preprocessor">#include &lt;iostream&gt;</span>
29 00022 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRcuCellEnergyDataStruct_8h.html">AliHLTPHOSRcuCellEnergyDataStruct.h</a>"</span>
30 00023 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSModuleCellAccumulatedEnergyDataStruct_8h.html">AliHLTPHOSModuleCellAccumulatedEnergyDataStruct.h</a>"</span>
31 00024 
32 00025 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
33 00026 
34 00027 
35 <a name="l00028"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#v0">00028</a> <span class="keyword">const</span> <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a>  <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#v0">AliHLTPHOSHistogramProducerComponent::fgkInputDataTypes</a>[]={kAliHLTVoidDataType,{0,<span class="stringliteral">""</span>,<span class="stringliteral">""</span>}}; <span class="comment">//'zero' terminated array</span>
36 <a name="l00029"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#v1">00029</a> <span class="keyword">const</span> <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a>  <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#v1">AliHLTPHOSHistogramProducerComponent::fgkOutputDataType</a>=kAliHLTVoidDataType;
37 00030 
38 00031 
39 <a name="l00032"></a><a class="code" href="AliHLTPHOSHistogramProducerComponent_8cxx.html#a0">00032</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html">AliHLTPHOSHistogramProducerComponent</a> gAliHLTPHOSHistogramProducerComponent;
40 00033 
41 00034 <span class="comment">/*************************************************************************</span>
42 00035 <span class="comment">* Class AliHLTPHOSHistogramProducerComponent accumulating histograms     *</span>
43 00036 <span class="comment">* with amplitudes per PHOS channel                                       *</span>
44 00037 <span class="comment">* It is intended to run at the HLT farm                                  *</span>
45 00038 <span class="comment">* and it fills the histograms with amplitudes per channel.               * </span>
46 00039 <span class="comment">* Usage example see in PHOS/macros/Shuttle/AliPHOSCalibHistoProducer.C   *</span>
47 00040 <span class="comment">**************************************************************************/</span>
48 <a name="l00041"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a0">00041</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a0">AliHLTPHOSHistogramProducerComponent:: AliHLTPHOSHistogramProducerComponent</a>():<a class="code" href="classAliHLTProcessor.html">AliHLTProcessor</a>(), fEventCount(0),  fEquippmentID(0)
49 00042 {
50 00046   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b0">Reset</a>();
51 00047 } 
52 00048 
53 00049 
54 <a name="l00050"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a1">00050</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a1">AliHLTPHOSHistogramProducerComponent::~ AliHLTPHOSHistogramProducerComponent</a>()
55 00051 {
56 00055 }
57 00056 
58 00057 
59 <a name="l00058"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a2">00058</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a0">AliHLTPHOSHistogramProducerComponent::AliHLTPHOSHistogramProducerComponent</a>(<span class="keyword">const</span>  <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html">AliHLTPHOSHistogramProducerComponent</a> &amp; ) : <a class="code" href="classAliHLTProcessor.html">AliHLTProcessor</a>(), fEventCount(0),  fEquippmentID(0)
60 00059 {
61 00063 }
62 00064 
63 00065 
64 00066 <span class="keywordtype">int</span> 
65 <a name="l00067"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a5">00067</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a5">AliHLTPHOSHistogramProducerComponent::Deinit</a>()
66 00068 {
67 00072   <span class="keywordflow">return</span> 0;
68 00073 }
69 00074 
70 00075 
71 00076 <span class="keywordtype">int</span> 
72 <a name="l00077"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a6">00077</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a6">AliHLTPHOSHistogramProducerComponent::DoDeinit</a>()
73 00078 {
74 00079   <a class="code" href="classAliHLTLogging.html#a7">Logging</a>(<a class="code" href="AliHLTDataTypes_8h.html#a29a21">kHLTLogInfo</a>, <span class="stringliteral">"HLT"</span>, <span class="stringliteral">"PHOS"</span>, <span class="stringliteral">",AliHLTPHOSHistogramProducer DoDeinit"</span>);
75 00080   <span class="keywordflow">return</span> 0;
76 00081 }
77 00082 
78 00083 
79 00084 <span class="keyword">const</span> <span class="keywordtype">char</span>* 
80 <a name="l00085"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a10">00085</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a10">AliHLTPHOSHistogramProducerComponent::GetComponentID</a>()
81 00086 {
82 00090   <span class="keywordflow">return</span> <span class="stringliteral">"HistogramProducer"</span>;
83 00091 }
84 00092 
85 00093 
86 00094 <span class="keywordtype">void</span>
87 <a name="l00095"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a11">00095</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a11">AliHLTPHOSHistogramProducerComponent::GetInputDataTypes</a>( vector&lt;AliHLTComponentDataType&gt;&amp; list)
88 00096 {
89 00100   <span class="keyword">const</span> <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a>* pType=fgkInputDataTypes;
90 00101   <span class="keywordflow">while</span> (pType-&gt;<a class="code" href="structAliHLTComponentDataType.html#o1">fID</a>!=0) 
91 00102     {
92 00103       list.push_back(*pType);
93 00104       pType++;
94 00105     }
95 00106 }
96 00107 
97 00108 
98 00109 <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a> 
99 <a name="l00110"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a12">00110</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a12">AliHLTPHOSHistogramProducerComponent::GetOutputDataType</a>()
100 00111 {
101 00115   <span class="keywordflow">return</span> AliHLTPHOSDefinitions::gkCellEnergyDataType;
102 00116 }
103 00117 
104 00118 
105 00119 <span class="keywordtype">void</span>
106 <a name="l00120"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a13">00120</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a13">AliHLTPHOSHistogramProducerComponent::GetOutputDataSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; constBase, <span class="keywordtype">double</span>&amp; inputMultiplier )
107 00121 {
108 00125   constBase = 30;
109 00126   inputMultiplier = 1;
110 00127 }
111 00128 
112 00129 
113 <a name="l00130"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a7">00130</a> <span class="keywordtype">int</span>  <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a7">AliHLTPHOSHistogramProducerComponent::DoEvent</a>( <span class="keyword">const</span> <a class="code" href="structAliHLTComponentEventData.html">AliHLTComponentEventData</a>&amp; evtData, <span class="keyword">const</span> <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a>* blocks, 
114 00131                                               <a class="code" href="structAliHLTComponentTriggerData.html">AliHLTComponentTriggerData</a>&amp; trigData, AliHLTUInt8_t* outputPtr, 
115 00132                                               AliHLTUInt32_t&amp; size, vector&lt;AliHLTComponentBlockData&gt;&amp; outputBlocks )
116 00133 {
117 00142   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndx;
118 00143   UInt_t offset           = 0; 
119 00144   UInt_t mysize           = 0;
120 00145   UInt_t tSize            = 0;
121 00146 
122 00147   <span class="keyword">const</span> <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a>* iter = NULL;   
123 00148   <a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html">AliHLTPHOSRcuCellEnergyDataStruct</a> *cellDataPtr;
124 00149   <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a>* outBPtr;
125 00150   outBPtr = outputPtr;
126 00151   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r6">fOutPtr</a> =  (<a class="code" href="structAliHLTPHOSModuleCellAccumulatedEnergyDataStruct.html">AliHLTPHOSModuleCellAccumulatedEnergyDataStruct</a>*)outBPtr;
127 00152 
128 00153   <span class="keywordtype">int</span> tmpCnt;
129 00154   <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpModuleID;
130 00155   <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpRcuX;
131 00156   <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpRcuZ;
132 00157 
133 00158   <span class="keywordflow">for</span>( ndx = 0; ndx &lt; evtData.<a class="code" href="structAliHLTComponentEventData.html#o4">fBlockCnt</a>; ndx++ )
134 00159     {
135 00160       iter = blocks+ndx;
136 00161       cellDataPtr = (<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html">AliHLTPHOSRcuCellEnergyDataStruct</a>*)( iter-&gt;<a class="code" href="structAliHLTComponentBlockData.html#o3">fPtr</a>);
137 00162       tmpCnt =  cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o3">fCnt</a>;
138 00163 
139 00164       tmpModuleID = cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o0">fModuleID</a>;
140 00165       tmpRcuX     = cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o1">fRcuX</a> ;
141 00166       tmpRcuZ     = cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o2">fRcuZ</a>;
142 00167       <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r6">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSModuleCellAccumulatedEnergyDataStruct.html#o0">fModuleID</a> = tmpModuleID;
143 00168       <span class="keywordtype">int</span> tmpGain;
144 00169       <span class="keywordtype">int</span> tmpZ;
145 00170       <span class="keywordtype">int</span> tmpX;
146 00171 
147 00172       <span class="comment">//      for(int i= 0; i&lt; tmpCnt; i ++)</span>
148 00173       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i= 0; i &lt;= tmpCnt; i ++)
149 00174         {
150 00175           tmpZ =  cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o0">fZ</a> + <a class="code" href="AliHLTPHOSCommonDefs_8h.html#a13">N_ZROWS_RCU</a>*tmpRcuZ;
151 00176           tmpX =  cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o1">fX</a> + <a class="code" href="AliHLTPHOSCommonDefs_8h.html#a14">N_XCOLUMNS_RCU</a>*tmpRcuX;
152 00177 
153 00178           <span class="keywordflow">if</span>(cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o2">fGain</a> == HIGH_GAIN)
154 00179             {
155 00180               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[tmpZ][tmpX][HIGH_GAIN] +=  cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o3">fEnergy</a>;
156 00181               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r2">fHits</a>[tmpZ][tmpX][HIGH_GAIN] ++;
157 00182             }
158 00183           <span class="keywordflow">else</span> <span class="keywordflow">if</span>(cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o2">fGain</a> == LOW_GAIN)
159 00184             {
160 00185               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[tmpZ][tmpX][LOW_GAIN] +=  cellDataPtr-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#o4">fValidData</a>[i].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#o3">fEnergy</a>;
161 00186               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r2">fHits</a>[tmpZ][tmpX][LOW_GAIN] ++;
162 00187             }
163 00188         }
164 00189     }
165 00190 
166 00191 
167 00192   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> z=0;  z &lt; N_ZROWS_MOD; z ++ )
168 00193     {
169 00194       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> x = 0; x &lt; N_XCOLUMNS_MOD; x ++)
170 00195         {
171 00196           <span class="keywordflow">for</span>(<span class="keywordtype">int</span> gain =0; gain &lt; N_GAINS; gain ++)
172 00197             {
173 00198               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r6">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSModuleCellAccumulatedEnergyDataStruct.html#o1">fAccumulatedEnergies</a>[z][x][gain] = <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[z][x][gain];
174 00199               <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r6">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSModuleCellAccumulatedEnergyDataStruct.html#o2">fHits</a>[z][x][gain] = <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r2">fHits</a>[z][x][gain];
175 00200             }
176 00201         } 
177 00202     }
178 00203 
179 00204 
180 00205   <span class="comment">//pushing data to shared output memory</span>
181 00206   mysize += <span class="keyword">sizeof</span>(<a class="code" href="structAliHLTPHOSModuleCellAccumulatedEnergyDataStruct.html">AliHLTPHOSModuleCellAccumulatedEnergyDataStruct</a>);
182 00207   <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a> bd;
183 00208   <a class="code" href="classAliHLTComponent.html#b0">FillBlockData</a>( bd );
184 00209   bd.<a class="code" href="structAliHLTComponentBlockData.html#o2">fOffset</a> = offset;
185 00210   bd.<a class="code" href="structAliHLTComponentBlockData.html#o4">fSize</a> = mysize;
186 00211   bd.<a class="code" href="structAliHLTComponentBlockData.html#o5">fDataType</a> = AliHLTPHOSDefinitions::gkCellAccumulatedEnergyDataType;
187 00212   bd.<a class="code" href="structAliHLTComponentBlockData.html#o6">fSpecification</a> = 0xFFFFFFFF;
188 00213   outputBlocks.push_back( bd );
189 00214   tSize += mysize;
190 00215   outBPtr += mysize;
191 00216 
192 00217   <span class="keywordflow">if</span>( tSize &gt; size )
193 00218     {
194 00219       <a class="code" href="classAliHLTLogging.html#a7">Logging</a>( <a class="code" href="AliHLTDataTypes_8h.html#a29a24">kHLTLogFatal</a>, <span class="stringliteral">"HLT::AliHLTHistogramProducerComponent::DoEvent"</span>, <span class="stringliteral">"Too much data"</span>,
195 00220                <span class="stringliteral">"Data written over allowed buffer. Amount written: %lu, allowed amount: %lu."</span>
196 00221                , tSize, size );
197 00222       <span class="keywordflow">return</span> EMSGSIZE;
198 00223     }
199 00224 
200 00225   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r3">fEventCount</a>++; 
201 00226   <span class="keywordflow">return</span> 0;
202 00227 }<span class="comment">//end DoEvent</span>
203 00228 
204 00229 
205 00230 <span class="keywordtype">int</span>
206 <a name="l00231"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a4">00231</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a4">AliHLTPHOSHistogramProducerComponent::DoInit</a>( <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv )
207 00232 {
208 00233   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b0">Reset</a>();
209 00234   <span class="keywordflow">if</span> (argc==0 &amp;&amp; argv==NULL) {
210 00235     <span class="comment">// this is currently just to get rid of the warning "unused parameter"</span>
211 00236   }
212 00237   <span class="keywordflow">return</span> 0;
213 00238 }
214 00239 
215 00240 
216 00241 <span class="keywordtype">void</span>
217 <a name="l00242"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a8">00242</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a8">AliHLTPHOSHistogramProducerComponent::DumpData</a>(<span class="keywordtype">int</span> gain)
218 00243 {
219 00244 
220 00245   <span class="keywordflow">if</span>(gain &lt; 0 || gain &gt;  N_GAINS)
221 00246     {
222 00247       cout &lt;&lt;<span class="stringliteral">"AliHLTPHOSHistogramProducerComponent::DumpDat: Error, gain must be between "</span> &lt;&lt; 0 &lt;&lt; <span class="stringliteral">"and"</span> &lt;&lt; <a class="code" href="AliHLTPHOSCommonDefs_8h.html#a17">N_GAINS</a> &lt;&lt; endl;
223 00248     }
224 00249   
225 00250   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> mod = 0; mod &lt; N_MODULES; mod ++)
226 00251     {
227 00252       <span class="keywordflow">if</span>(gain == HIGH_GAIN)
228 00253         {
229 00254           cout &lt;&lt; endl &lt;&lt;<span class="stringliteral">" ***********  MODULE"</span> &lt;&lt; mod &lt;&lt; <span class="stringliteral">"****HIGH_GAIN"</span> &lt;&lt;<span class="stringliteral">"************"</span> &lt;&lt; endl;
230 00255         }
231 00256       <span class="keywordflow">else</span> <span class="keywordflow">if</span>(gain == LOW_GAIN)
232 00257         {
233 00258           cout &lt;&lt; endl &lt;&lt;<span class="stringliteral">" ***********  MODULE"</span> &lt;&lt; mod &lt;&lt; <span class="stringliteral">"****LOW_GAIN"</span> &lt;&lt;<span class="stringliteral">"************"</span> &lt;&lt; endl;
234 00259         }
235 00260       
236 00261       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> row = 0; row &lt; N_ROWS_MOD; row ++)
237 00262         {
238 00263           <span class="keywordflow">for</span>(<span class="keywordtype">int</span> col = 0; col &lt; N_COLUMNS_MOD; col ++)
239 00264             {
240 00265               <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[row][col][0] != 0)
241 00266                 { 
242 00267                   cout &lt;&lt; <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[row][col][0] &lt;&lt; <span class="stringliteral">"\t"</span>;
243 00268                 }
244 00269             }
245 00270         } 
246 00271     }
247 00272 }
248 00273 
249 00274 
250 00275 
251 00276 <span class="keywordtype">void</span>
252 <a name="l00277"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b0">00277</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b0">AliHLTPHOSHistogramProducerComponent::Reset</a>()
253 00278 {
254 00279   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> mod = 0; mod &lt; N_MODULES; mod ++)
255 00280     {
256 00281       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> row = 0; row &lt;  N_ROWS_MOD; row ++)
257 00282         {
258 00283           <span class="keywordflow">for</span>(<span class="keywordtype">int</span> col = 0; col &lt; N_COLUMNS_MOD; col ++)
259 00284             {
260 00285               <span class="keywordflow">for</span>(<span class="keywordtype">int</span> gain = 0; gain &lt; N_GAINS; gain ++ )
261 00286                 { 
262 00287                   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r1">fAccumulatedValues</a>[row][col][gain] = 0;
263 00288                   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r2">fHits</a>[row][col][gain] = 0;      
264 00289                 }
265 00290             }
266 00291         }
267 00292     }
268 00293 
269 00294   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i&lt;  ALTRO_MAX_SAMPLES; i++)
270 00295     {
271 00296       <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r5">fTmpChannelData</a>[i] = 0;
272 00297     }
273 00298 } <span class="comment">// end Reset</span>
274 00299 
275 00300 <span class="keywordtype">void</span>
276 <a name="l00301"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b1">00301</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#b1">AliHLTPHOSHistogramProducerComponent::ResetDataPtr</a>()
277 00302 {
278 00303   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i&lt;  ALTRO_MAX_SAMPLES; i++)
279 00304     {
280 00305       <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r5">fTmpChannelData</a>[i] = 0;
281 00306     }
282 00307 }
283 00308 
284 00309 
285 00310 <span class="keywordtype">void</span> 
286 <a name="l00311"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a14">00311</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a14">AliHLTPHOSHistogramProducerComponent::SetEquippmentId</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>)
287 00312 {
288 00313   <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#r4">fEquippmentID</a> = id;
289 00314 }
290 00315 
291 00316 <span class="keyword">const</span> <span class="keywordtype">int</span> 
292 <a name="l00317"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a9">00317</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a9">AliHLTPHOSHistogramProducerComponent::GetEquippmentId</a>()<span class="keyword"> const</span>
293 00318 <span class="keyword"></span>{
294 00319   <span class="keywordflow">return</span>  fEquippmentID;
295 00320 }
296 00321 
297 00322 
298 00323 <a class="code" href="classAliHLTComponent.html">AliHLTComponent</a>*
299 <a name="l00324"></a><a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a15">00324</a> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html#a15">AliHLTPHOSHistogramProducerComponent::Spawn</a>()
300 00325 {
301 00326   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classAliHLTPHOSHistogramProducerComponent.html">AliHLTPHOSHistogramProducerComponent</a>;
302 00327 }
303 00328 
304 00329 
305 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 4 04:49:52 2007 for AliHLTPHOS by&nbsp;
306 <a href="http://www.doxygen.org/index.html">
307 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
308 </body>
309 </html>