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: AliHLTPHOSDDLDecoderComponent.cxx Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.3.9.1 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main 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 Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>AliHLTPHOSDDLDecoderComponent.cxx</h1><a href="AliHLTPHOSDDLDecoderComponent_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"> * This file is property of and copyright by the Experimental Nuclear *</span>
10 00003 <span class="comment"> * Physics Group, Dep. of Physics *</span>
11 00004 <span class="comment"> * University of Oslo, Norway, 2007 *</span>
12 00005 <span class="comment"> * * </span>
13 00006 <span class="comment"> * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*</span>
14 00007 <span class="comment"> * Contributors are mentioned in the code where appropriate. *</span>
15 00008 <span class="comment"> * Please report bugs to perthi@fys.uio.no * </span>
16 00009 <span class="comment"> * *</span>
17 00010 <span class="comment"> * Permission to use, copy, modify and distribute this software and its *</span>
18 00011 <span class="comment"> * documentation strictly for non-commercial purposes is hereby granted *</span>
19 00012 <span class="comment"> * without fee, provided that the above copyright notice appears in all *</span>
20 00013 <span class="comment"> * copies and that both the copyright notice and this permission notice *</span>
21 00014 <span class="comment"> * appear in the supporting documentation. The authors make no claims *</span>
22 00015 <span class="comment"> * about the suitability of this software for any purpose. It is *</span>
23 00016 <span class="comment"> * provided "as is" without express or implied warranty. *</span>
24 00017 <span class="comment"> **************************************************************************/</span>
26 00019 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSDDLDecoderComponent_8h.html">AliHLTPHOSDDLDecoderComponent.h</a>"</span>
27 00020 <span class="preprocessor">#include <iostream></span>
28 00021 <span class="preprocessor">#include "stdio.h"</span>
29 00022 <span class="preprocessor">#include "AliRawReaderMemory.h"</span>
30 00023 <span class="preprocessor">#include "AliCaloRawStream.h"</span>
31 00024 <span class="preprocessor">#include <cstdlib></span>
32 00025 <span class="preprocessor">#include "<a class="code" href="AliHLTPHOSRcuChannelDataStruct_8h.html">AliHLTPHOSRcuChannelDataStruct.h</a>"</span>
34 <a name="l00027"></a><a class="code" href="AliHLTPHOSDDLDecoderComponent_8cxx.html#a0">00027</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html">AliHLTPHOSDDLDecoderComponent</a> gAliHLTPHOSDDLDecoderComponent;
36 <a name="l00029"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v1">00029</a> <span class="keyword">const</span> <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v1">AliHLTPHOSDDLDecoderComponent::fgkInputDataTypes</a>[]={kAliHLTVoidDataType,{0,<span class="stringliteral">""</span>,<span class="stringliteral">""</span>}}; <span class="comment">//'zero' terminated array</span>
37 <a name="l00030"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v0">00030</a> <span class="keywordtype">int</span> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v0">AliHLTPHOSDDLDecoderComponent::fgEventCount</a> = 0;
40 <a name="l00033"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a0">00033</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a0">AliHLTPHOSDDLDecoderComponent::AliHLTPHOSDDLDecoderComponent</a>():<a class="code" href="classAliHLTProcessor.html">AliHLTProcessor</a>(), fEquippmentID(0), fRcuX(0),
41 00034 fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0), fModuleID(0), fSendChannelData(kFALSE), fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
46 <a name="l00039"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a1">00039</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a1">AliHLTPHOSDDLDecoderComponent::~AliHLTPHOSDDLDecoderComponent</a>()
48 00041 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a> != 0)
50 00043 <span class="keyword">delete</span> fRawMemoryReader;
52 00045 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a> != 0)
54 00047 <span class="keyword">delete</span> fPHOSRawStream;
59 <a name="l00052"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a2">00052</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a0">AliHLTPHOSDDLDecoderComponent::AliHLTPHOSDDLDecoderComponent</a>(<span class="keyword">const</span> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html">AliHLTPHOSDDLDecoderComponent</a> & ) : <a class="code" href="classAliHLTProcessor.html">AliHLTProcessor</a>(),
60 00053 fEquippmentID(0), fRcuX(0), fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0), fModuleID(0), fSendChannelData(kFALSE), fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
65 00058 <span class="keywordtype">int</span>
66 <a name="l00059"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a5">00059</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a5">AliHLTPHOSDDLDecoderComponent::Deinit</a>()
68 00061 cout << <span class="stringliteral">"Deinit"</span> << endl;
69 00062 <span class="keywordflow">return</span> 0;
73 00066 <span class="keywordtype">int</span>
74 <a name="l00067"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a6">00067</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a6">AliHLTPHOSDDLDecoderComponent::DoDeinit</a>()
76 00069 cout << <span class="stringliteral">"DoDeinit"</span> << endl;
77 00070 <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">",AliHLTPHOSRawAnalyzerComponen DoDeinit"</span>);
79 00072 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a> !=0)
81 00074 <span class="keyword">delete</span> fRawMemoryReader;
84 00077 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a> != 0)
86 00079 <span class="keyword">delete</span> fPHOSRawStream;
88 00081 <span class="keywordflow">return</span> 0;
93 00086 <span class="keyword">const</span> <span class="keywordtype">char</span>*
94 <a name="l00087"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a10">00087</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a10">AliHLTPHOSDDLDecoderComponent::GetComponentID</a>()
96 00089 <span class="keywordflow">return</span> <span class="stringliteral">"PhosDDLDecoder"</span>;
101 00094 <span class="keywordtype">void</span>
102 <a name="l00095"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a11">00095</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a11">AliHLTPHOSDDLDecoderComponent::GetInputDataTypes</a>(vector<AliHLTComponentDataType>& list)
104 00097 <span class="keyword">const</span> <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a>* pType=fgkInputDataTypes;
105 00098 <span class="keywordflow">while</span> (pType-><a class="code" href="structAliHLTComponentDataType.html#o1">fID</a>!=0) {
106 00099 list.push_back(*pType);
111 00104 <a class="code" href="structAliHLTComponentDataType.html">AliHLTComponentDataType</a>
112 <a name="l00105"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a12">00105</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a12">AliHLTPHOSDDLDecoderComponent::GetOutputDataType</a>()
114 00107 <span class="keywordflow">return</span> AliHLTPHOSDefinitions::gkCellEnergyDataType;
117 00110 <span class="keywordtype">void</span>
118 <a name="l00111"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a13">00111</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a13">AliHLTPHOSDDLDecoderComponent::GetOutputDataSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>& constBase, <span class="keywordtype">double</span>& inputMultiplier )
121 00114 constBase = 30;
122 00115 inputMultiplier = 1;
127 00120 <span class="keywordtype">int</span>
128 <a name="l00121"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a15">00121</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a15">AliHLTPHOSDDLDecoderComponent::DoEvent</a>( <span class="keyword">const</span> <a class="code" href="structAliHLTComponentEventData.html">AliHLTComponentEventData</a>& evtData, <span class="keyword">const</span> <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a>* blocks,
129 00122 <a class="code" href="structAliHLTComponentTriggerData.html">AliHLTComponentTriggerData</a>& trigData, AliHLTUInt8_t* outputPtr,
130 00123 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
132 00125 <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpMod = 0;
133 00126 <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpZ = 0;
134 00127 <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpX = 0;
135 00128 <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a> tmpGain = 0;
136 00129 Int_t sampleCnt = 0;
137 00130 Int_t processedChannels = 0;
138 00131 UInt_t offset = 0;
139 00132 UInt_t mysize = 0;
140 00133 UInt_t tSize = 0;
141 00134 Int_t tmpChannelCnt = 0;
142 00135 Int_t tmpStartIndex = 0;
143 00136 <a class="code" href="AliHLTDataTypes_8h.html#a4">AliHLTUInt8_t</a>* outBPtr;
144 00137 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> first;
145 00138 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> last;
146 00139 outBPtr = outputPtr;
147 00140 <span class="keyword">const</span> <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a>* iter = NULL;
148 00141 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndx;
150 00143 <span class="keywordflow">for</span>( ndx = 0; ndx < evtData.<a class="code" href="structAliHLTComponentEventData.html#o4">fBlockCnt</a>; ndx++ )
152 00145 iter = blocks+ndx;
154 00147 tmpChannelCnt = 0;
155 00148 offset = tSize;
157 00150 <span class="keywordflow">if</span> ( iter-><a class="code" href="structAliHLTComponentBlockData.html#o5">fDataType</a> != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
159 00152 <span class="keywordflow">continue</span>;
162 00155 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a>->SetMemory( reinterpret_cast<UChar_t*>( iter-><a class="code" href="structAliHLTComponentBlockData.html#o3">fPtr</a> ), iter-><a class="code" href="structAliHLTComponentBlockData.html#o4">fSize</a> );
163 00156 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a> = (<a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html">AliHLTPHOSRcuChannelDataStruct</a>*)outBPtr;
164 00157 mysize += <span class="keyword">sizeof</span>(<a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html">AliHLTPHOSRcuChannelDataStruct</a>);
166 00159 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o2">fRcuX</a> = fRcuX;
167 00160 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o3">fRcuZ</a> = fRcuZ;
168 00161 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o1">fModuleID</a> = fModuleID;
170 00163 <span class="keywordflow">while</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->Next())
173 00166 <span class="keywordflow">if</span> (<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->IsNewHWAddress())
176 00169 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o0">fZ</a> = (AliHLTUInt8_t)<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->GetColumn() - fRcuZOffset;
177 00170 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o1">fX</a> = (AliHLTUInt8_t)<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->GetRow() - fRcuXOffset;
178 00171 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o2">fGain</a> = <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->IsLowGain();
179 00172 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o3">fNSamples</a> = 0;
180 00173 tmpChannelCnt++;
182 00175 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt-1].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o3">fNSamples</a> ++;
183 00176 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o4">fValidData</a>[tmpChannelCnt-1].<a class="code" href="structAliHLTPHOSValidChannelDataStruct.html#o4">fChannelData</a>[sampleCnt] = <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->GetSignal();
187 00180 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r12">fOutPtr</a>-><a class="code" href="structAliHLTPHOSRcuChannelDataStruct.html#o0">fNValidChannels</a> = tmpChannelCnt-1;;
189 00182 <span class="keywordtype">int</span> tmpSampleCnt=0;
190 00183 <a class="code" href="structAliHLTComponentBlockData.html">AliHLTComponentBlockData</a> bd;
191 00184 <a class="code" href="classAliHLTComponent.html#b0">FillBlockData</a>( bd );
192 00185 bd.<a class="code" href="structAliHLTComponentBlockData.html#o2">fOffset</a> = offset;
193 00186 bd.<a class="code" href="structAliHLTComponentBlockData.html#o4">fSize</a> = mysize;
194 00187 bd.<a class="code" href="structAliHLTComponentBlockData.html#o5">fDataType</a> = AliHLTPHOSDefinitions::gkCellChannelDataDataType;
195 00188 bd.<a class="code" href="structAliHLTComponentBlockData.html#o6">fSpecification</a> = 0xeFFFFFFF;
196 00189 outputBlocks.push_back( bd);
197 00190 tSize += mysize;
198 00191 outBPtr += mysize;
202 00195 <span class="keywordflow">if</span>( tSize > size )
204 00197 cout <<<span class="stringliteral">"kHLTLogFatal, HLT::AliHLTPHOSDDLDecoderComponent::DoEvent Too much data Data written over allowed buffer. Amount written:"</span> << tSize << <span class="stringliteral">" allowed"</span> << size << endl;
205 00198 <a class="code" href="classAliHLTLogging.html#a7">Logging</a>( <a class="code" href="AliHLTDataTypes_8h.html#a29a24">kHLTLogFatal</a>, <span class="stringliteral">"HLT::AliHLTPHOSDDLDecoderComponent::DoEvent"</span>, <span class="stringliteral">"Too much data"</span>, <span class="stringliteral">"Data written over allowed buffer. Amount written: %lu, allowed amount: %lu."</span>, tSize, size );
206 00199 <span class="keywordflow">return</span> EMSGSIZE;
209 00202 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v0">fgEventCount</a>++;
211 00204 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r7">fPrintInfo</a> == kTRUE)
213 00206 <span class="keywordflow">if</span>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v0">fgEventCount</a>%<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r9">fPrintInfoFrequncy</a> == 0)
215 00208 cout <<<span class="stringliteral">"Analyzing event "</span> << <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#v0">fgEventCount</a> << <span class="stringliteral">"for Equippment "</span> << <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> << endl;
219 00212 <span class="keywordflow">return</span> 0;
220 00213 }<span class="comment">//end DoEvent</span>
223 00216 <span class="keywordtype">int</span>
224 <a name="l00217"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a4">00217</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a4">AliHLTPHOSDDLDecoderComponent::DoInit</a>( <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv )
226 00219 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r6">fSendChannelData</a> = kFALSE;
227 00220 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r7">fPrintInfo</a> = kFALSE;
228 00221 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a> = <span class="keyword">new</span> AliRawReaderMemory();
229 00222 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a> = <span class="keyword">new</span> AliCaloRawStream(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a>,<span class="stringliteral">"PHOS"</span>);
230 00223 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r10">fPHOSRawStream</a>->SetOldRCUFormat(kFALSE);
231 00224 <span class="keywordtype">int</span> iResult=0;
232 00225 TString argument=<span class="stringliteral">""</span>;
233 00226 Bool_t isSetEquippmentID = kFALSE;
235 00228 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i<argc && iResult>=0; i++)
237 00230 argument=argv[i];
239 00232 <span class="keywordflow">if</span> (argument.IsNull())
241 00234 <span class="keywordflow">continue</span>;
244 00237 <span class="keywordflow">if</span> (argument.CompareTo(<span class="stringliteral">"-equipmentID"</span>) == 0)
246 00239 cout << <span class="stringliteral">"AliHLTPHOSDDLDecoderComponent:DoInit argument = -equipmentID "</span> <<endl;
247 00240 <span class="keywordflow">if</span>(i+1 <= argc)
249 00242 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> = atoi(argv[i+1]);
250 00243 cout << <span class="stringliteral">"AliHLTPHOSDDLDecoderComponent:DoInit setting equippment ID to "</span> << <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> <<endl;
251 00244 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r11">fRawMemoryReader</a>->SetEquipmentID(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a>);
252 00245 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a7">SetEquippmentID</a>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a>);
253 00246 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a9">SetCoordinates</a>(<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a>);
254 00247 isSetEquippmentID = kTRUE;
256 00249 <span class="keywordflow">else</span>
259 00252 <a class="code" href="classAliHLTLogging.html#a7">Logging</a>( <a class="code" href="AliHLTDataTypes_8h.html#a29a24">kHLTLogFatal</a>, <span class="stringliteral">"HLT::AliHLTPHOSRcuHistogramProducerComponent::DoInt( int argc, const char** argv )"</span>, <span class="stringliteral">"Missing argument"</span>,
260 00253 <span class="stringliteral">"The argument -equippmentID expects a number"</span>);
261 00254 <span class="keywordflow">return</span> iResult;
266 00259 <span class="keywordflow">if</span> (argument.CompareTo(<span class="stringliteral">"-datatype"</span>) == 0)
268 00261 <span class="keywordflow">if</span>(i+1 <= argc)
270 00263 <span class="comment">// i++;</span>
271 00264 argument=argv[i+1];
272 00265 <span class="keywordflow">if</span>(argument.CompareTo(<span class="stringliteral">"channeldata"</span>) == 0)
274 00267 cout << <span class="stringliteral">"AliHLTPHOSDDLDecoderComponent::DoIni setting sendChannelData = kTRUE "</span><< endl;
275 00268 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r6">fSendChannelData</a> = kTRUE;
281 00274 <span class="keywordflow">if</span> (argument.CompareTo(<span class="stringliteral">"-printinfo"</span>) == 0)
283 00276 <span class="keywordflow">if</span>(i+1 <= argc)
285 00278 argument=argv[i+1];
286 00279 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r9">fPrintInfoFrequncy</a> = atoi(argv[i+1]);
287 00280 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r7">fPrintInfo</a> = kTRUE;
288 00281 cout << <span class="stringliteral">"AliHLTPHOSDDLDecoderComponent::DoIni setting printinfo = kTRUE, with update frequency every "</span><< <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r9">fPrintInfoFrequncy</a> << <span class="stringliteral">"th event"</span> <<endl;
290 00283 <span class="keywordflow">else</span>
292 00285 cout << <span class="stringliteral">"WARNING: asking for event info, but no update frequency is specified, otipn is ignored"</span> << endl;
294 00287 <span class="comment">// } </span>
300 00293 <span class="keywordflow">if</span>(isSetEquippmentID == kFALSE)
302 00295 <a class="code" href="classAliHLTLogging.html#a7">Logging</a>( <a class="code" href="AliHLTDataTypes_8h.html#a29a24">kHLTLogFatal</a>, <span class="stringliteral">"HLT::AliHLTPHOSRcuHistogramProducerComponent::DoInt( int argc, const char** argv )"</span>, <span class="stringliteral">"Missing argument"</span>,
303 00296 <span class="stringliteral">"The argument equippmentID is not set: set it with a component argumet like this: -equippmentID <number>"</span>);
308 00301 <span class="keywordflow">return</span> 0;
313 00306 <span class="keywordtype">void</span>
314 <a name="l00307"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a7">00307</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a7">AliHLTPHOSDDLDecoderComponent::SetEquippmentID</a>(AliHLTUInt16_t <span class="keywordtype">id</span>)
316 00309 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> = id;
320 00313 <a class="code" href="AliHLTDataTypes_8h.html#a5">AliHLTUInt16_t</a>
321 <a name="l00314"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a8">00314</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a8">AliHLTPHOSDDLDecoderComponent::GetEquippmentID</a>()
323 00316 <span class="keywordflow">return</span> fEquippmentID;
327 00320 <span class="keywordtype">void</span>
328 <a name="l00321"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a9">00321</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a9">AliHLTPHOSDDLDecoderComponent::SetCoordinates</a>(AliHLTUInt16_t equippmentID)
330 00323 <span class="keywordtype">int</span> rcuIndex = (<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> - 1792)%N_RCUS_PER_MODULE;
331 00324 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r5">fModuleID</a> = (<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> -1792 -rcuIndex)/N_RCUS_PER_MODULE;
333 00326 <span class="keywordflow">if</span>(rcuIndex == 0)
335 00328 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r1">fRcuX</a> = 0;
336 00329 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r2">fRcuZ</a> = 0;
339 00332 <span class="keywordflow">if</span>(rcuIndex == 1)
341 00334 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r1">fRcuX</a> = 0;
342 00335 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r2">fRcuZ</a> = 1;
345 00338 <span class="keywordflow">if</span>(rcuIndex == 2)
347 00340 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r1">fRcuX</a> = 1;
348 00341 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r2">fRcuZ</a> = 0;
351 00344 <span class="keywordflow">if</span>(rcuIndex == 3)
353 00346 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r1">fRcuX</a> = 1;
354 00347 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r2">fRcuZ</a> = 1;
359 00352 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r3">fRcuZOffset</a> = <a class="code" href="AliHLTPHOSCommonDefs_8h.html#a13">N_ZROWS_RCU</a>*fRcuZ;
360 00353 <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r4">fRcuXOffset</a> = <a class="code" href="AliHLTPHOSCommonDefs_8h.html#a14">N_XCOLUMNS_RCU</a>*fRcuX;
362 00355 cout <<<span class="stringliteral">"********InitInfo************"</span><< endl;
363 00356 cout <<<span class="stringliteral">"AliHLTPHOSDDLDecoderComponent::SetCoordinate"</span><< endl;
364 00357 cout <<<span class="stringliteral">"Equpippment ID =\t"</span><< <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r0">fEquippmentID</a> <<endl;
365 00358 cout <<<span class="stringliteral">"Module ID =\t"</span><< (int)<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r5">fModuleID</a><<endl;
366 00359 cout <<<span class="stringliteral">"RCUX =\t\t"</span> << (int)fRcuX << endl;
367 00360 cout <<<span class="stringliteral">"RCUZ =\t\t"</span> << (int)fRcuZ << endl;
368 00361 cout <<<span class="stringliteral">"RcuZOffset = \t"</span> << (int)<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r3">fRcuZOffset</a> << endl;
369 00362 cout <<<span class="stringliteral">"RcuXOffset = \t"</span> << (int)<a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#r4">fRcuXOffset</a> << endl << endl;
372 00365 <a class="code" href="classAliHLTComponent.html">AliHLTComponent</a>*
373 <a name="l00366"></a><a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a14">00366</a> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html#a14">AliHLTPHOSDDLDecoderComponent::Spawn</a>()
375 00368 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classAliHLTPHOSDDLDecoderComponent.html">AliHLTPHOSDDLDecoderComponent</a>;
377 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 4 04:49:52 2007 for AliHLTPHOS by
378 <a href="http://www.doxygen.org/index.html">
379 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>