]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/html/AliHLTPHOSRawAnalyzerComponent_8cxx-source.html
New documenation:wq
[u/mrichter/AliRoot.git] / HLT / PHOS / html / AliHLTPHOSRawAnalyzerComponent_8cxx-source.html
CommitLineData
8562a9e6 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: AliHLTPHOSRawAnalyzerComponent.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="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="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>AliHLTPHOSRawAnalyzerComponent.cxx</h1><a href="AliHLTPHOSRawAnalyzerComponent_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/**************************************************************************</span>
eace7fcd 900002 <span class="comment"> * This file is property of and copyright by the Experimental Nuclear *</span>
1000003 <span class="comment"> * Physics Group, Dep. of Physics *</span>
1100004 <span class="comment"> * University of Oslo, Norway, 2007 *</span>
1200005 <span class="comment"> * * </span>
1300006 <span class="comment"> * Author: Per Thomas Hille &lt;perthi@fys.uio.no&gt; for the ALICE HLT Project.*</span>
1400007 <span class="comment"> * Contributors are mentioned in the code where appropriate. *</span>
1500008 <span class="comment"> * Please report bugs to perthi@fys.uio.no * </span>
1600009 <span class="comment"> * *</span>
1700010 <span class="comment"> * Permission to use, copy, modify and distribute this software and its *</span>
1800011 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted *</span>
1900012 <span class="comment"> * without fee, provided that the above copyright notice appears in all *</span>
2000013 <span class="comment"> * copies and that both the copyright notice and this permission notice *</span>
2100014 <span class="comment"> * appear in the supporting documentation. The authors make no claims *</span>
2200015 <span class="comment"> * about the suitability of this software for any purpose. It is *</span>
2300016 <span class="comment"> * provided "as is" without express or implied warranty. *</span>
2400017 <span class="comment"> **************************************************************************/</span>
8562a9e6 2500018
eace7fcd 2600019 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRawAnalyzerComponent_8h.html">AliHLTPHOSRawAnalyzerComponent.h</a>"</span>
2700020 <span class="preprocessor">#include &lt;iostream&gt;</span>
2800021 <span class="preprocessor">#include "stdio.h"</span>
2900022 <span class="preprocessor">#include "AliRawReaderMemory.h"</span>
3000023 <span class="preprocessor">#include "AliCaloRawStream.h"</span>
3100024 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
3200025 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRcuCellEnergyDataStruct_8h.html">AliHLTPHOSRcuCellEnergyDataStruct.h</a>"</span>
3300026
34<a name="l00027"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv1">00027</a> <span class="keyword">const</span> AliHLTComponentDataType <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv1">AliHLTPHOSRawAnalyzerComponent::inputDataTypes</a>[]={kAliHLTVoidDataType,{0,<span class="stringliteral">""</span>,<span class="stringliteral">""</span>}}; <span class="comment">//'zero' terminated array</span>
35<a name="l00028"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv0">00028</a> <span class="keywordtype">int</span> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv0">AliHLTPHOSRawAnalyzerComponent::fEventCount</a> = 0;
8562a9e6 3600029
eace7fcd 3700030
38<a name="l00044"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta0">00044</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta0">AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent</a>():AliHLTProcessor(),fEquippmentID(0), fRcuX(0),
3900045 fRcuZ(0),fRcuRowOffeset(0), fRcuColOffeset(0), fModuleID(0), fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
4000046 {
4100047
4200048 }
4300049
44<a name="l00050"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta1">00050</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta1">AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent</a>()
4500051 {
4600052 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a> != 0)
4700053 {
4800054 <span class="keyword">delete</span> fRawMemoryReader;
4900055 }
5000056 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a> != 0)
5100057 {
5200058 <span class="keyword">delete</span> fPHOSRawStream;
5300059 }
8562a9e6 5400060
eace7fcd 5500061 }
5600062
5700063
5800064
59<a name="l00065"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta2">00065</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta0">AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent</a>(<span class="keyword">const</span> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html">AliHLTPHOSRawAnalyzerComponent</a> &amp; ) : AliHLTProcessor(),
6000066 fEquippmentID(0), fRcuX(0), fRcuZ(0),fRcuRowOffeset(0), fRcuColOffeset(0), fModuleID(0), fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
6100067 {
6200068 }
6300069
8562a9e6 6400070
eace7fcd 6500071 <span class="comment">/*</span>
6600072 <span class="comment"> *Deinit function called by the HLT framwork at end of run</span>
6700073 <span class="comment"> *@return 0 if the denitialzation was sucessfull.</span>
6800074 <span class="comment"> */</span>
6900075 <span class="keywordtype">int</span>
70<a name="l00076"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta5">00076</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta5">AliHLTPHOSRawAnalyzerComponent::Deinit</a>()
7100077 {
7200078 <span class="keywordflow">return</span> 0;
7300079 }
7400080
7500081
7600082 <span class="comment">/*</span>
7700083 <span class="comment"> *Deinit function called by the HLT framwork at end of run</span>
7800084 <span class="comment"> *@return 0 if the denitialzation was sucessfull.</span>
7900085 <span class="comment"> */</span>
8000086 <span class="keywordtype">int</span>
81<a name="l00087"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta6">00087</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta6">AliHLTPHOSRawAnalyzerComponent::DoDeinit</a>()
8200088 {
8300089 Logging(kHLTLogInfo, <span class="stringliteral">"HLT"</span>, <span class="stringliteral">"PHOS"</span>, <span class="stringliteral">",AliHLTPHOSRawAnalyzerComponen DoDeinit"</span>);
8400090
8500091 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a> !=0)
8600092 {
8700093 <span class="keyword">delete</span> fRawMemoryReader;
8800094 }
8900095
9000096 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a> != 0)
9100097 {
9200098 <span class="keyword">delete</span> fPHOSRawStream;
9300099 }
9400100 <span class="keywordflow">return</span> 0;
9500101
8562a9e6 9600102 }
eace7fcd 9700103
9800104 <span class="comment">/*</span>
9900105 <span class="comment"> *Function called by the HLT framework during initialization</span>
10000106 <span class="comment"> *@return the ID of the component</span>
10100107 <span class="comment"> */</span>
10200108 <span class="keyword">const</span> <span class="keywordtype">char</span>*
103<a name="l00109"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta13">00109</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponenta13">AliHLTPHOSRawAnalyzerComponent::GetComponentID</a>()
10400110 {
10500111 <span class="keywordflow">return</span> <span class="stringliteral">"AliPhosTestRaw"</span>;
10600112 }
10700113
10800114
10900115 <span class="keywordtype">void</span>
11000116 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta13">AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes</a>( vector&lt;AliHLTComponentDataType&gt;&amp; list)
11100117 {
11200118 <span class="keyword">const</span> AliHLTComponentDataType* pType=inputDataTypes;
11300119 <span class="keywordflow">while</span> (pType-&gt;fID!=0) {
11400120 list.push_back(*pType);
11500121 pType++;
11600122 }
11700123 }
11800124
11900125 AliHLTComponentDataType
120<a name="l00126"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta14">00126</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta14">AliHLTPHOSRawAnalyzerComponent::GetOutputDataType</a>()
12100127 {
12200128 <span class="keywordflow">return</span> AliHLTPHOSDefinitions::gkCellEnergyDataType;
12300129 }
12400130
12500131 <span class="keywordtype">void</span>
126<a name="l00132"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta15">00132</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta15">AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; constBase, <span class="keywordtype">double</span>&amp; inputMultiplier )
12700133
12800134 {
12900135 constBase = 30;
13000136 inputMultiplier = 0.1;
13100137 }
13200138
13300139
13400140 <span class="keywordtype">int</span> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta16">AliHLTPHOSRawAnalyzerComponent::DoEvent</a>( <span class="keyword">const</span> AliHLTComponentEventData&amp; evtData, <span class="keyword">const</span> AliHLTComponentBlockData* blocks,
13500141 AliHLTComponentTriggerData&amp; trigData, AliHLTUInt8_t* outputPtr,
13600142 AliHLTUInt32_t&amp; size, vector&lt;AliHLTComponentBlockData&gt;&amp; outputBlocks )
13700143 {
13800144 Int_t tmpMod = 0;
13900145 Int_t tmpRow = 0;
14000146 Int_t tmpCol = 0;
14100147 Int_t tmpGain = 0;
14200148 Int_t sampleCnt = 0;
14300149 Int_t processedChannels = 0;
14400150 UInt_t offset = 0;
14500151 UInt_t mysize = 0;
14600152 UInt_t tSize = 0;
14700153 Int_t tmpChannelCnt = 0;
14800154 Int_t tmpStartIndex = 0;
14900155 AliHLTUInt8_t* outBPtr;
15000156 outBPtr = outputPtr;
15100157 <span class="keyword">const</span> AliHLTComponentBlockData* iter = NULL;
15200158 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndx;
15300159
15400160 <span class="keywordflow">if</span>((fEventCount % 100) == 0)
15500161 {
15600162 <span class="comment">// cout &lt;&lt; "analyzing event: " &lt;&lt; fEventCount &lt;&lt; endl;</span>
15700163 }
15800164
15900165 <span class="keywordflow">for</span>( ndx = 0; ndx &lt; evtData.fBlockCnt; ndx++ )
16000166 {
16100167 iter = blocks+ndx;
16200168 mysize = 0;
16300169 offset = tSize;
16400170
16500171 <span class="keywordflow">if</span> ( iter-&gt;fDataType != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
16600172 {
16700173 <span class="comment">// cout &lt;&lt; "Warning: data type = is nOT gkDDLPackedRawDataType " &lt;&lt; endl;</span>
16800174 <span class="keywordflow">continue</span>;
16900175 }
17000176
17100177 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a>-&gt;SetMemory( reinterpret_cast&lt;UChar_t*&gt;( iter-&gt;fPtr ), iter-&gt;fSize );
17200178 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponentp0">analyzerPtr</a>-&gt;<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera12">SetData</a>(fTmpChannelData);
17300179 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a> = (<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html">AliHLTPHOSRcuCellEnergyDataStruct</a>*)outBPtr;
17400180 mysize += <span class="keyword">sizeof</span>(<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html">AliHLTPHOSRcuCellEnergyDataStruct</a>);
17500181 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo1">fRcuX</a> = fRcuX;
17600182 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo2">fRcuZ</a> = fRcuZ;
17700183 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo0">fModuleID</a> = fModuleID;
17800184 tmpChannelCnt = 0;
17900185
18000186 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv0">fEventCount</a>%100 ==0)
18100187 {
18200188 <span class="comment">// cout &lt;&lt;"Analyzing event: " &lt;&lt; fEventCount &lt;&lt; endl; </span>
18300189 }
18400190
18500191 <span class="keywordflow">while</span>(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;Next())
18600192 {
18700193 <span class="keywordflow">if</span> (<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;IsNewHWAddress())
18800194 {
18900195 <span class="keywordflow">if</span>(processedChannels &gt; 0)
19000196 {
19100197 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponentp0">analyzerPtr</a>-&gt;<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera12">SetData</a>(fTmpChannelData);
19200198 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponentp0">analyzerPtr</a>-&gt;<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera17">Evaluate</a>(0, sampleCnt);
19300199 sampleCnt = 0;
19400200
19500201 <span class="comment">// cout &lt;&lt; "tmGain = " &lt;&lt; tmpGain &lt;&lt;" tmpRow = " &lt;&lt; tmpRow &lt;&lt; " tmpCol = " &lt;&lt; tmpCol &lt;&lt;endl;</span>
19600202 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#AliHLTPHOSValidCellDataStructo2">fGain</a> = tmpGain;
19700203 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#AliHLTPHOSValidCellDataStructo0">fRow</a> = tmpRow;
19800204 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#AliHLTPHOSValidCellDataStructo1">fCol</a> = tmpCol;
19900205 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#AliHLTPHOSValidCellDataStructo3">fEnergy</a> = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponentp0">analyzerPtr</a>-&gt;<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera11">GetEnergy</a>();
20000206 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidCellDataStruct.html#AliHLTPHOSValidCellDataStructo4">fTime</a> = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponentp0">analyzerPtr</a>-&gt;<a class="code" href="classAliHLTPHOSRawAnalyzer.html#AliHLTPHOSRawAnalyzerPeakFindera10">GetTiming</a>();
20100207 tmpChannelCnt ++;
20200208 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">ResetDataPtr</a>(tmpStartIndex, sampleCnt);
20300209 sampleCnt = 0;
20400210 }
20500211
20600212 tmpMod = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetModule() ;
20700213 tmpRow = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetRow() - fRcuRowOffeset;
20800214 tmpCol = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetColumn() - fRcuColOffeset;
20900215 tmpGain = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;IsLowGain();
21000216 processedChannels ++;
21100217 <span class="comment">// cout &lt;&lt; endl;</span>
21200218 cout &lt;&lt; <span class="stringliteral">"EquitppmentId = "</span> &lt;&lt; <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a>-&gt;GetEquipmentId() &lt;&lt;<span class="stringliteral">"\t"</span> &lt;&lt; <span class="stringliteral">"fPHOSRawStream-&gt;GetColumn()=\t"</span> &lt;&lt;<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetColumn() &lt;&lt;<span class="stringliteral">"\t("</span> &lt;&lt; tmpCol &lt;&lt;<span class="stringliteral">")\t"</span>&lt;&lt;\
21300219 <span class="stringliteral">"fPHOSRawStream-&gt;GetRow()=\t"</span> &lt;&lt;<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetRow()&lt;&lt;<span class="stringliteral">"\t("</span> &lt;&lt; tmpRow &lt;&lt;<span class="stringliteral">")"</span> &lt;&lt;endl;
21400220 <span class="comment">// cout &lt;&lt; "fPHOSRawStream-&gt;GetColumn()=\t" &lt;&lt;fPHOSRawStream-&gt;GetColumn() &lt;&lt;"\t(" &lt;&lt; tmpCol &lt;&lt;")"&lt;&lt;endl;</span>
21500221 <span class="comment">// cout &lt;&lt; "fPHOSRawStream-&gt;GetRow()=\t" &lt;&lt;fPHOSRawStream-&gt;GetRow() &lt;&lt;"\t(" &lt;&lt; tmpRow &lt;&lt;")" &lt;&lt;endl;</span>
21600222 <span class="comment">// cout &lt;&lt; "tmGain = " &lt;&lt; tmpGain &lt;&lt;" tmpRow = " &lt;&lt; tmpRow &lt;&lt; " tmpCol = " &lt;&lt; tmpCol &lt;&lt;endl &lt;&lt; endl;</span>
21700223 }
21800224
21900225 <span class="keywordflow">if</span>(sampleCnt == 0)
22000226 {
22100227 tmpStartIndex = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetTime();
22200228 }
22300229
22400230 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr6">fTmpChannelData</a>[<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetTime()] = <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;GetSignal();
22500231 sampleCnt ++;
22600232
22700233 }
22800234
22900235 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr10">fOutPtr</a>-&gt;<a class="code" href="structAliHLTPHOSRcuCellEnergyDataStruct.html#AliHLTPHOSRcuCellEnergyDataStructo3">fCnt</a> = tmpChannelCnt;
23000236 AliHLTComponentBlockData bd;
23100237 FillBlockData( bd );
23200238 bd.fOffset = offset;
23300239 bd.fSize = mysize;
23400240 bd.fDataType = AliHLTPHOSDefinitions::gkCellEnergyDataType;
23500241 bd.fSpecification = 0xFFFFFFFF;
23600242 outputBlocks.push_back( bd );
23700243 tSize += mysize;
23800244 outBPtr += mysize;
23900245
24000246 <span class="keywordflow">if</span>( tSize &gt; size )
24100247 {
24200248 Logging( kHLTLogFatal, <span class="stringliteral">"HLT::AliHLTPHOSRawAnalyzerComponent::DoEvent"</span>, <span class="stringliteral">"Too much data"</span>,
24300249 <span class="stringliteral">"Data written over allowed buffer. Amount written: %lu, allowed amount: %lu."</span>
24400250 , tSize, size );
24500251 <span class="keywordflow">return</span> EMSGSIZE;
24600252 }
24700253 }
24800254
24900255 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentv0">fEventCount</a>++;
25000256 size = tSize;
25100257 <span class="keywordflow">return</span> 0;
25200258 }<span class="comment">//end DoEvent</span>
25300259
25400260
25500261
25600262 <span class="keywordtype">int</span>
257<a name="l00263"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta4">00263</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta4">AliHLTPHOSRawAnalyzerComponent::DoInit</a>( <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv )
25800264 {
25900265 <span class="keywordtype">int</span> equippmentID = atoi(argv[6]);
26000266 cout &lt;&lt; <span class="stringliteral">"AliHLTPHOSRawAnalyzerComponent::DoIni Setting EquipmentID to"</span> &lt;&lt; equippmentID &lt;&lt; endl;
26100267 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd0">Reset</a>();
26200268 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a> = <span class="keyword">new</span> AliRawReaderMemory();
26300269 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a> = <span class="keyword">new</span> AliCaloRawStream(<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a>,<span class="stringliteral">"PHOS"</span>);
26400270 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr8">fPHOSRawStream</a>-&gt;SetOldRCUFormat(kFALSE);
26500271 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr9">fRawMemoryReader</a>-&gt;SetEquipmentID(equippmentID);
26600272 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta10">SetEquippmentID</a>(equippmentID);
26700273 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta12">SetCoordinates</a>(equippmentID);
26800274 <span class="keywordflow">if</span> (argc==0 &amp;&amp; argv==NULL) {
26900275 <span class="comment">// this is currently just to get rid of the warning "unused parameter"</span>
27000276 }
27100277 <span class="keywordflow">return</span> 0;
27200278 }
27300279
27400280 <span class="keywordtype">void</span>
275<a name="l00281"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta7">00281</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta8">AliHLTPHOSRawAnalyzerComponent::DumpData</a>(<span class="keywordtype">int</span> gain)
27600282 {
27700283 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> mod = 0; mod &lt; N_MODULES; mod ++)
27800284 {
27900285 printf(<span class="stringliteral">"\n *********** MODULE %d ************\n"</span>, mod);
28000286 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> row = 0; row &lt; N_ROWS_MOD; row ++)
28100287 {
28200288 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> col = 0; col &lt; N_COLUMNS_MOD; col ++)
28300289 {
28400290 <span class="keywordflow">if</span>( <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr7">fMaxValues</a>[mod][row][col][0] != 0)
28500291 {
28600292 cout &lt;&lt; <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr7">fMaxValues</a>[mod][row][col][gain] &lt;&lt; <span class="stringliteral">"\t"</span>;
28700293 }
28800294 }
28900295 }
29000296 }
29100297 }
29200298
29300299
29400300 <span class="keywordtype">void</span>
295<a name="l00301"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta8">00301</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta8">AliHLTPHOSRawAnalyzerComponent::DumpData</a>()
29600302 {
29700303 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta8">DumpData</a>(0);
29800304 }
29900305
30000306 <span class="keywordtype">void</span>
301<a name="l00307"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta9">00307</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta9">AliHLTPHOSRawAnalyzerComponent::DumpChannelData</a>(Double_t *data)
30200308 {
30300309 cout &lt;&lt; endl;
30400310
30500311 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt; ALTRO_MAX_SAMPLES; i++)
30600312 {
30700313 <span class="keywordflow">if</span> (data[i] != 0)
30800314 {
30900315 cout &lt;&lt;i &lt;&lt;<span class="stringliteral">"\t"</span>;
31000316 }
31100317 }
31200318 cout &lt;&lt; endl;
31300319
31400320 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt; ALTRO_MAX_SAMPLES; i++)
31500321 {
31600322 <span class="keywordflow">if</span> (data[i] != 0)
31700323 {
31800324 cout &lt;&lt;data[i] &lt;&lt;<span class="stringliteral">"\t"</span>;
31900325 }
32000326 }
32100327
32200328 cout &lt;&lt; endl;
32300329 }
32400330
32500331
32600332
32700333 <span class="keywordtype">void</span>
328<a name="l00334"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd0">00334</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd0">AliHLTPHOSRawAnalyzerComponent::Reset</a>()
32900335 {
33000336 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> mod = 0; mod &lt; N_MODULES; mod ++)
33100337 {
33200338 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> row = 0; row &lt; N_ROWS_MOD; row ++)
33300339 {
33400340 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> col = 0; col &lt; N_COLUMNS_MOD; col ++)
33500341 {
33600342 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> gain = 0; gain &lt; N_GAINS; gain ++ )
33700343 {
33800344 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr7">fMaxValues</a>[mod][row][col][gain] = 0;
33900345 }
34000346 }
34100347 }
34200348 }
34300349
34400350 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">ResetDataPtr</a>();
34500351
34600352 } <span class="comment">// end Reset</span>
34700353
34800354
34900355
35000356 <span class="keywordtype">void</span>
351<a name="l00357"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">00357</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">AliHLTPHOSRawAnalyzerComponent::ResetDataPtr</a>()
35200358 {
35300359 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i&lt; ALTRO_MAX_SAMPLES; i++)
35400360 {
35500361 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr6">fTmpChannelData</a>[i] = 0;
35600362 }
35700363 }
35800364
35900365 <span class="keywordtype">void</span>
360<a name="l00366"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd2">00366</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">AliHLTPHOSRawAnalyzerComponent::ResetDataPtr</a>(<span class="keywordtype">int</span> sampleCnt)
36100367 {
36200368 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i&lt; sampleCnt; i++)
36300369 {
36400370 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr6">fTmpChannelData</a>[i] = 0;
36500371 }
36600372 }
36700373
36800374 <span class="keywordtype">void</span>
369<a name="l00375"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd3">00375</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentd1">AliHLTPHOSRawAnalyzerComponent::ResetDataPtr</a>(<span class="keywordtype">int</span> startindex, <span class="keywordtype">int</span> sampleCnt)
37000376 {
37100377 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = startindex ; i&lt; sampleCnt; i++)
37200378 {
37300379 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr6">fTmpChannelData</a>[i] = 0;
37400380 }
37500381 }
37600382
37700383
37800384 <span class="keywordtype">void</span>
379<a name="l00385"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta10">00385</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta10">AliHLTPHOSRawAnalyzerComponent::SetEquippmentID</a>(AliHLTUInt32_t <span class="keywordtype">id</span>)
38000386 {
38100387 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr0">fEquippmentID</a> = id;
38200388 }
38300389
38400390 <span class="keywordtype">int</span>
385<a name="l00391"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta11">00391</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta11">AliHLTPHOSRawAnalyzerComponent::GetEquippmentID</a>()
38600392 {
38700393 <span class="keywordflow">return</span> fEquippmentID;
38800394 }
38900395
39000396 <span class="keywordtype">void</span>
391<a name="l00397"></a><a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta12">00397</a> <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerPeakFinderComponenta12">AliHLTPHOSRawAnalyzerComponent::SetCoordinates</a>(AliHLTUInt32_t equippmentID)
39200398 {
39300399 <span class="keywordtype">int</span> rcuIndex = (<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr0">fEquippmentID</a> - 1792)%4;
39400400 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr5">fModuleID</a> = (<a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr0">fEquippmentID</a> -1792 -rcuIndex)/5;
39500401
39600402 <span class="keywordflow">if</span>(rcuIndex == 0)
39700403 {
39800404 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr1">fRcuX</a> = 0;
39900405 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr2">fRcuZ</a> = 0;
40000406 }
40100407
40200408 <span class="keywordflow">if</span>(rcuIndex == 1)
40300409 {
40400410 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr1">fRcuX</a> = 0;
40500411 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr2">fRcuZ</a> = 1;
40600412 }
40700413
40800414 <span class="keywordflow">if</span>(rcuIndex == 2)
40900415 {
41000416 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr1">fRcuX</a> = 1;
41100417 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr2">fRcuZ</a> = 0;
41200418 }
41300419
41400420
41500421 <span class="keywordflow">if</span>(rcuIndex == 3)
41600422 {
41700423 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr1">fRcuX</a> = 1;
41800424 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr2">fRcuZ</a> = 1;
41900425 }
42000426
42100427 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr3">fRcuRowOffeset</a> = 32*fRcuX;
42200428 <a class="code" href="classAliHLTPHOSRawAnalyzerComponent.html#AliHLTPHOSRawAnalyzerComponentr4">fRcuColOffeset</a> = 28*fRcuZ;
42300429
42400430 }
425</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Feb 18 22:17:03 2007 for AliHLTPHOS by&nbsp;
8562a9e6 426<a href="http://www.doxygen.org/index.html">
427<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
428</body>
429</html>