]>
Commit | Line | Data |
---|---|---|
a9d14303 | 1 | // $Id$ |
6af4f584 | 2 | |
3 | //************************************************************************** | |
4 | //* This file is property of and copyright by the ALICE HLT Project * | |
5 | //* ALICE Experiment at CERN, All rights reserved. * | |
6 | //* * | |
7 | //* Primary Authors: Kalliopi Kanaki <Kalliopi.Kanaki@ift.uib.no> * | |
8 | //* for The ALICE HLT Project. * | |
9 | //* * | |
10 | //* Permission to use, copy, modify and distribute this software and its * | |
11 | //* documentation strictly for non-commercial purposes is hereby granted * | |
12 | //* without fee, provided that the above copyright notice appears in all * | |
13 | //* copies and that both the copyright notice and this permission notice * | |
14 | //* appear in the supporting documentation. The authors make no claims * | |
15 | //* about the suitability of this software for any purpose. It is * | |
16 | //* provided "as is" without express or implied warranty. * | |
17 | //************************************************************************** | |
18 | ||
19 | /** @file AliHLTTPCHWClusterTransformComponent.cxx | |
20 | @author Kalliopi Kanaki | |
21 | @date | |
22 | @brief | |
23 | */ | |
24 | ||
25 | #if __GNUC__>= 3 | |
26 | using namespace std; | |
27 | #endif | |
28 | #include "AliHLTTPCHWClusterTransformComponent.h" | |
29 | #include "AliHLTTPCDefinitions.h" | |
30 | #include "AliHLTTPCTransform.h" | |
31 | #include "AliHLTTPCSpacePointData.h" | |
32 | #include "AliHLTTPCClusterDataFormat.h" | |
f670cd93 | 33 | #include "AliRawDataHeader.h" |
e9530747 | 34 | #include "AliHLTTPCRawCluster.h" |
35 | #include "AliHLTTPCHWCFEmulator.h" | |
6af4f584 | 36 | |
491d6af5 | 37 | #include "AliCDBManager.h" |
38 | #include "AliCDBEntry.h" | |
dccee396 | 39 | #include "AliTPCcalibDB.h" |
491d6af5 | 40 | |
2b727eff | 41 | #include "TMath.h" |
7361746a | 42 | #include "TObjString.h" |
6af4f584 | 43 | #include <cstdlib> |
44 | #include <cerrno> | |
45 | #include <sys/time.h> | |
46 | ||
47 | ClassImp(AliHLTTPCHWClusterTransformComponent) //ROOT macro for the implementation of ROOT specific class methods | |
48 | ||
84e36c27 | 49 | const char* AliHLTTPCHWClusterTransformComponent::fgkOCDBEntryHWTransform="HLT/ConfigTPC/TPCHWClusterTransform"; |
50 | ||
6af4f584 | 51 | AliHLTTPCHWClusterTransformComponent::AliHLTTPCHWClusterTransformComponent() |
a9d14303 | 52 | : |
84e36c27 | 53 | fDataId(kFALSE), |
58df4cfa | 54 | fChargeThreshold(10), |
dccee396 | 55 | fTransform(), |
e9530747 | 56 | fPublishRawClusters(kFALSE), |
a5dc9013 | 57 | fBenchmark("HWClusterTransform") |
6af4f584 | 58 | { |
59 | // see header file for class documentation | |
60 | // or | |
61 | // refer to README to build package | |
62 | // or | |
a9d14303 | 63 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt |
a5dc9013 | 64 | |
65 | fBenchmark.Reset(); | |
66 | fBenchmark.SetTimer(0,"total"); | |
6af4f584 | 67 | } |
68 | ||
69 | AliHLTTPCHWClusterTransformComponent::~AliHLTTPCHWClusterTransformComponent() { | |
70 | // see header file for class documentation | |
71 | } | |
72 | ||
73 | const char* AliHLTTPCHWClusterTransformComponent::GetComponentID() { | |
74 | // see header file for class documentation | |
75 | ||
76 | return "TPCHWClusterTransform"; | |
77 | } | |
78 | ||
79 | void AliHLTTPCHWClusterTransformComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) { | |
80 | // see header file for class documentation | |
81 | ||
82 | list.clear(); | |
83 | list.push_back( AliHLTTPCDefinitions::fgkHWClustersDataType ); | |
84 | } | |
85 | ||
86 | AliHLTComponentDataType AliHLTTPCHWClusterTransformComponent::GetOutputDataType() { | |
87 | // see header file for class documentation | |
88 | ||
89 | return AliHLTTPCDefinitions::fgkClustersDataType; | |
90 | } | |
91 | ||
92 | int AliHLTTPCHWClusterTransformComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList) { | |
93 | // see header file for class documentation | |
94 | ||
95 | tgtList.clear(); | |
7b86c66e | 96 | tgtList.push_back(AliHLTTPCDefinitions::fgkClustersDataType| kAliHLTDataOriginTPC); |
97 | tgtList.push_back(AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo | kAliHLTDataOriginTPC ); | |
e9530747 | 98 | tgtList.push_back(AliHLTTPCDefinitions::fgkRawClustersDataType | kAliHLTDataOriginTPC ); |
6af4f584 | 99 | return tgtList.size(); |
100 | } | |
101 | ||
102 | void AliHLTTPCHWClusterTransformComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { | |
103 | // see header file for class documentation | |
6af4f584 | 104 | constBase = 0; |
641530bb | 105 | inputMultiplier = 3.0; |
6af4f584 | 106 | } |
107 | ||
108 | AliHLTComponent* AliHLTTPCHWClusterTransformComponent::Spawn() { | |
109 | // see header file for class documentation | |
110 | ||
111 | return new AliHLTTPCHWClusterTransformComponent(); | |
112 | } | |
113 | ||
491d6af5 | 114 | int AliHLTTPCHWClusterTransformComponent::DoInit( int argc, const char** argv ) { |
6af4f584 | 115 | // see header file for class documentation |
dccee396 | 116 | |
aa0d6ff8 | 117 | AliTPCcalibDB *calib=AliTPCcalibDB::Instance(); |
118 | if(!calib){ | |
119 | HLTError("AliTPCcalibDB does not exist"); | |
120 | return -ENOENT; | |
121 | } | |
122 | calib->SetRun(GetRunNo()); | |
123 | calib->UpdateRunInformations(GetRunNo()); | |
124 | ||
dccee396 | 125 | int err = fTransform.Init( GetBz(), GetTimeStamp() ); |
6af4f584 | 126 | |
dccee396 | 127 | if( err!=0 ){ |
128 | HLTError("Cannot retrieve offline transform from AliTPCcalibDB"); | |
b4c689c4 | 129 | return -ENOENT; |
130 | } | |
491d6af5 | 131 | |
132 | int iResult=0; | |
84e36c27 | 133 | iResult = ConfigureFromCDBTObjString(fgkOCDBEntryHWTransform); |
134 | ||
135 | if (iResult>=0 && argc>0) | |
136 | iResult=ConfigureFromArgumentString(argc, argv); | |
137 | ||
138 | return iResult; | |
6af4f584 | 139 | } // end DoInit() |
140 | ||
141 | int AliHLTTPCHWClusterTransformComponent::DoDeinit() { | |
bd1ecd64 | 142 | // see header file for class documentation |
6af4f584 | 143 | return 0; |
144 | } | |
145 | ||
146 | int AliHLTTPCHWClusterTransformComponent::DoEvent(const AliHLTComponentEventData& evtData, | |
491d6af5 | 147 | const AliHLTComponentBlockData* blocks, |
148 | AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, | |
149 | AliHLTUInt32_t& size, | |
150 | vector<AliHLTComponentBlockData>& outputBlocks ){ | |
6af4f584 | 151 | // see header file for class documentation |
bd1ecd64 | 152 | |
7b86c66e | 153 | UInt_t maxOutSize = size; |
154 | size = 0; | |
155 | int iResult = 0; | |
6af4f584 | 156 | if(GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR )){ |
6af4f584 | 157 | return 0; |
158 | } | |
a5dc9013 | 159 | |
160 | fBenchmark.StartNewEvent(); | |
161 | fBenchmark.Start(0); | |
162 | ||
dccee396 | 163 | fTransform.SetCurrentTimeStamp( GetTimeStamp() ); |
7b86c66e | 164 | |
165 | for( unsigned long ndx=0; ndx<evtData.fBlockCnt; ndx++ ){ | |
166 | ||
167 | const AliHLTComponentBlockData *iter = blocks+ndx; | |
168 | ||
169 | fBenchmark.AddInput(iter->fSize); | |
170 | ||
171 | HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", | |
172 | evtData.fEventID, evtData.fEventID, | |
173 | DataType2Text( iter->fDataType).c_str(), | |
174 | DataType2Text(AliHLTTPCDefinitions::fgkHWClustersDataType).c_str()); | |
175 | ||
176 | if(iter->fDataType == (AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo | kAliHLTDataOriginTPC) ){ | |
177 | // simply forward MC labels | |
178 | ||
179 | if( size+iter->fSize > maxOutSize ){ | |
180 | HLTWarning( "Output buffer (%db) is too small, required %db", maxOutSize, size+iter->fSize); | |
181 | iResult = -ENOSPC; | |
182 | break; | |
183 | } | |
dccee396 | 184 | |
7b86c66e | 185 | memcpy( outputPtr, iter->fPtr, iter->fSize ); |
61c1f30c | 186 | |
7b86c66e | 187 | AliHLTComponentBlockData bd; |
188 | FillBlockData( bd ); | |
189 | bd.fOffset = size; | |
190 | bd.fSize = iter->fSize; | |
191 | bd.fSpecification = iter->fSpecification; | |
192 | bd.fDataType = iter->fDataType; | |
193 | outputBlocks.push_back( bd ); | |
194 | fBenchmark.AddOutput(bd.fSize); | |
195 | size += bd.fSize; | |
196 | outputPtr += bd.fSize; | |
197 | continue; | |
198 | } | |
a5dc9013 | 199 | |
7b86c66e | 200 | if(iter->fDataType != (AliHLTTPCDefinitions::fgkHWClustersDataType | kAliHLTDataOriginTPC)) continue; |
201 | ||
202 | UInt_t minSlice = AliHLTTPCDefinitions::GetMinSliceNr(*iter); | |
203 | UInt_t minPartition = AliHLTTPCDefinitions::GetMinPatchNr(*iter); | |
204 | //UInt_t maxSlice = AliHLTTPCDefinitions::GetMaxSliceNr(*iter); | |
205 | //UInt_t maxPartition = AliHLTTPCDefinitions::GetMaxPatchNr(*iter); | |
a5dc9013 | 206 | |
7b86c66e | 207 | fBenchmark.SetName(Form("HWClusterTransform slice %d patch %d",minSlice,minPartition)); |
a5dc9013 | 208 | |
7b86c66e | 209 | HLTDebug("minSlice: %d, minPartition: %d", minSlice, minPartition); |
6af4f584 | 210 | |
7b86c66e | 211 | AliHLTTPCClusterData* outPtr = (AliHLTTPCClusterData*)outputPtr; |
61c1f30c | 212 | |
7b86c66e | 213 | long maxPoints = ((long)maxOutSize-size-sizeof(AliHLTTPCClusterData))/sizeof(AliHLTTPCSpacePointData); |
214 | ||
6af4f584 | 215 | |
7b86c66e | 216 | AliHLTUInt32_t *buffer; |
217 | buffer = (AliHLTUInt32_t*)iter->fPtr; | |
6af4f584 | 218 | |
219 | /* | |
220 | //cluster fabrication | |
221 | buffer = new AliHLTUInt32_t[14]; | |
222 | //header | |
223 | buffer[0]=0xffffffff; | |
224 | buffer[1]=0xffffffff; | |
225 | buffer[2]=0xffffffff; | |
226 | buffer[3]=0xffffffff; | |
227 | buffer[4]=0xffffffff; | |
228 | buffer[5]=0xffffffff; | |
229 | buffer[6]=0xffffffff; | |
230 | buffer[7]=0xffffffff; | |
231 | //cluster 1 | |
232 | buffer[8]=0xC60002EF; | |
233 | buffer[9]=0x0; | |
234 | buffer[10]=0x0; | |
235 | buffer[11]=0x0; | |
236 | buffer[12]=0x0; | |
237 | //RCU trailer | |
238 | buffer[13]=0x80000000; | |
239 | */ | |
240 | ||
6af4f584 | 241 | // PrintDebug(buffer, 14); |
242 | ||
243 | // skip the first 8 32-bit CDH words | |
244 | buffer += 8; | |
f670cd93 | 245 | UInt_t bufferSize32 = ((Int_t)iter->fSize - sizeof(AliRawDataHeader) )/sizeof(AliHLTUInt32_t); |
6af4f584 | 246 | |
247 | //PrintDebug(buffer, (Int_t)iter->fSize/sizeof(AliHLTUInt32_t)); | |
248 | ||
7b86c66e | 249 | long nAddedClusters = 0; |
6af4f584 | 250 | |
f670cd93 | 251 | for(UInt_t nWords=0; nWords<bufferSize32; nWords+=5){ |
e9530747 | 252 | |
253 | AliHLTUInt32_t word0 = AliHLTTPCHWCFEmulator::ReadBigEndian( buffer[nWords] ); | |
bd1ecd64 | 254 | |
7b86c66e | 255 | // check if bit 31 and 30 of the 32-bit word is 11 -> cluster (10 is RCU trailer) |
e9530747 | 256 | AliHLTUInt32_t bit3130 = (word0>>30); // shift 30 to the right |
6af4f584 | 257 | |
7b86c66e | 258 | if(bit3130 == 0x3){ //beginning of a cluster |
259 | ||
260 | //PrintDebug(&buffer[nWords], 5); | |
261 | ||
262 | if(nAddedClusters>=maxPoints){ | |
263 | HLTWarning("No more space to add clusters, exiting!"); | |
264 | iResult = -ENOSPC; | |
265 | break; | |
266 | } | |
6af4f584 | 267 | |
32f8cf3d | 268 | AliHLTTPCSpacePointData cluster; |
6af4f584 | 269 | |
e9530747 | 270 | cluster.fPadRow = ( word0 >> 24 ) & 0x3f ; |
271 | cluster.fCharge = ( word0 & 0xFFFFFF )>>6; //24-bit mask to get out the charge and division with 64(>>6) for the gain correction | |
7b86c66e | 272 | Float_t tmpPad = *((Float_t*)&buffer[nWords+1]); |
273 | Float_t tmpTime = *((Float_t*)&buffer[nWords+2]); | |
274 | cluster.fSigmaY2 = *((Float_t*)&buffer[nWords+3]); | |
275 | cluster.fSigmaZ2 = *((Float_t*)&buffer[nWords+4]); | |
2b727eff | 276 | |
116fb816 | 277 | |
7b86c66e | 278 | if(cluster.fCharge<fChargeThreshold) continue; |
116fb816 | 279 | |
7b86c66e | 280 | // correct expressions for the error calculation |
281 | // Kenneth: 12.11.2009 I'm not sure if this is a correct calculation. Leave it out for now since it is anyway not used later since it caused segfaults. | |
282 | // cluster.fSigmaY2 = TMath::Sqrt( *((Float_t*)&buffer[nWords+3]) - *((Float_t*)&buffer[nWords+1])* (*((Float_t*)&buffer[nWords+1])) ); | |
283 | // cluster.fSigmaZ2 = TMath::Sqrt( *((Float_t*)&buffer[nWords+3]) - *((Float_t*)&buffer[nWords+1])* (*((Float_t*)&buffer[nWords+1])) ); | |
284 | ||
285 | HLTDebug("padrow: %d, charge: %d, pad: %f, time: %f, errY: %f, errZ: %f \n", cluster.fPadRow, (UInt_t)cluster.fCharge, tmpPad, tmpTime, cluster.fSigmaY2, cluster.fSigmaZ2); | |
286 | ||
287 | cluster.fPadRow += AliHLTTPCTransform::GetFirstRow(minPartition); | |
288 | ||
289 | Float_t xyz[3]; | |
31307b4a | 290 | fTransform.Transform( minSlice, cluster.fPadRow, tmpPad + 0.5, tmpTime, xyz ); |
7b86c66e | 291 | cluster.fX = xyz[0]; |
292 | cluster.fY = xyz[1]; | |
293 | cluster.fZ = xyz[2]; | |
294 | ||
295 | // set the cluster ID so that the cluster dump printout is the same for FCF and SCF | |
296 | cluster.SetID( minSlice, minPartition, nAddedClusters ); | |
297 | ||
298 | HLTDebug("Cluster number %d: %f, Y: %f, Z: %f, charge: %d \n", nAddedClusters, cluster.fX, cluster.fY, cluster.fZ, (UInt_t)cluster.fCharge); | |
299 | outPtr->fSpacePoints[nAddedClusters] = cluster; | |
300 | ||
301 | nAddedClusters++; | |
302 | } // end of clusters starting with 11=0x3 | |
303 | else if(bit3130 == 0x2){ // we have reached the beginning of the RCU trailer - 10=0x2 | |
304 | break; | |
305 | } | |
6af4f584 | 306 | } // end of loop over clusters |
307 | ||
308 | HLTDebug("Number of found clusters: %d", nAddedClusters); | |
309 | ||
310 | outPtr->fSpacePointCnt = nAddedClusters; | |
7b86c66e | 311 | |
312 | UInt_t mysize = sizeof(AliHLTTPCClusterData) + sizeof(AliHLTTPCSpacePointData)*outPtr->fSpacePointCnt; | |
6af4f584 | 313 | |
314 | AliHLTComponentBlockData bd; | |
315 | FillBlockData( bd ); | |
7b86c66e | 316 | bd.fOffset = size; |
6af4f584 | 317 | bd.fSize = mysize; |
7b86c66e | 318 | bd.fSpecification = iter->fSpecification; |
491d6af5 | 319 | if(fDataId==kFALSE) bd.fDataType = AliHLTTPCDefinitions::fgkClustersDataType; |
320 | else bd.fDataType = AliHLTTPCDefinitions::fgkAlterClustersDataType; | |
321 | ||
322 | //HLTDebug("datatype: %s", DataType2Text(bd.fDataType).c_str()); | |
323 | ||
6af4f584 | 324 | outputBlocks.push_back( bd ); |
325 | ||
7b86c66e | 326 | fBenchmark.AddOutput(bd.fSize); |
327 | size += mysize; | |
328 | outputPtr += mysize; | |
6af4f584 | 329 | |
e9530747 | 330 | if (fPublishRawClusters) { |
331 | ||
332 | long maxRawClusters = ((long)maxOutSize-size-sizeof(AliHLTTPCRawClusterData))/sizeof(AliHLTTPCRawCluster); | |
333 | ||
334 | if( maxRawClusters<=0 ) { | |
335 | HLTWarning("No more space to add raw clusters, exiting!"); | |
336 | iResult = -ENOSPC; | |
337 | } else { | |
338 | ||
339 | // copy raw cluster data from input | |
340 | ||
341 | AliHLTTPCRawClusterData* outputRaw= (AliHLTTPCRawClusterData*)(outputPtr); | |
342 | ||
343 | outputRaw->fVersion = 0; | |
344 | outputRaw->fCount = 0; | |
345 | ||
346 | for(UInt_t nWords=0; nWords<bufferSize32; nWords+=5){ | |
347 | ||
348 | AliHLTUInt32_t word0 = AliHLTTPCHWCFEmulator::ReadBigEndian( buffer[nWords] ); | |
349 | ||
350 | // check if bit 31 and 30 of the 32-bit word is 11 -> cluster (10 is RCU trailer) | |
351 | AliHLTUInt32_t bit3130 = (word0>>30); // shift 30 to the right | |
352 | ||
353 | if(bit3130 == 0x3){ //beginning of a cluster | |
354 | ||
355 | if(outputRaw->fCount>=maxRawClusters){ | |
356 | HLTWarning("No more space to add clusters, exiting!"); | |
357 | iResult = -ENOSPC; | |
358 | break; | |
359 | } | |
360 | ||
361 | AliHLTTPCRawCluster &c = outputRaw->fClusters[outputRaw->fCount]; | |
0642fc33 | 362 | c.SetPadRow( ((word0>>24)&0x3f) + AliHLTTPCTransform::GetFirstRow(minPartition)); |
e9530747 | 363 | c.SetPad( *((Float_t*)&buffer[nWords+1])); |
364 | c.SetTime( *((Float_t*)&buffer[nWords+2])); | |
365 | c.SetSigmaY2(*((Float_t*)&buffer[nWords+3])); | |
366 | c.SetSigmaZ2(*((Float_t*)&buffer[nWords+4])); | |
367 | c.SetCharge( (word0 & 0xFFFFFF) >> 6 ); | |
368 | c.SetQMax(0); // TODO | |
369 | ||
370 | // skip clusters below threshold | |
0642fc33 | 371 | if( c.GetCharge()<(int)fChargeThreshold ) continue; |
e9530747 | 372 | // store cluster and continue |
373 | outputRaw->fCount++; | |
374 | ||
375 | } else if(bit3130 == 0x2){ // we have reached the beginning of the RCU trailer - 10=0x2 | |
376 | break; | |
377 | } | |
378 | } | |
379 | ||
380 | // fill into HLT output data | |
381 | AliHLTComponentBlockData bdRawClusters; | |
382 | FillBlockData( bdRawClusters ); | |
383 | bdRawClusters.fOffset = size; | |
384 | bdRawClusters.fSize = sizeof(AliHLTTPCRawClusterData)+outputRaw->fCount*sizeof(AliHLTTPCRawCluster); | |
385 | bdRawClusters.fSpecification = iter->fSpecification; | |
386 | bdRawClusters.fDataType = AliHLTTPCDefinitions::fgkRawClustersDataType | kAliHLTDataOriginTPC; | |
387 | outputBlocks.push_back( bdRawClusters ); | |
388 | fBenchmark.AddOutput(bdRawClusters.fSize); | |
389 | size += bdRawClusters.fSize; | |
390 | outputPtr += bdRawClusters.fSize; | |
391 | } | |
392 | } | |
393 | } // end of loop over data blocks | |
a5dc9013 | 394 | |
395 | fBenchmark.Stop(0); | |
396 | HLTInfo(fBenchmark.GetStatistics()); | |
e9530747 | 397 | |
7b86c66e | 398 | return iResult; |
6af4f584 | 399 | } // end DoEvent() |
84e36c27 | 400 | |
401 | int AliHLTTPCHWClusterTransformComponent::ScanConfigurationArgument(int argc, const char** argv){ | |
402 | ||
403 | // see header file for class documentation | |
404 | ||
405 | if (argc<=0) return 0; | |
406 | int i=0; | |
407 | TString argument=argv[i]; | |
408 | ||
409 | if (argument.CompareTo("-solenoidBz")==0){ | |
410 | if (++i>=argc) return -EPROTO; | |
411 | argument=argv[i]; | |
412 | AliTPCcalibDB* calib=AliTPCcalibDB::Instance(); | |
413 | if(!calib){ | |
66a3e955 | 414 | HLTError("CalibDB instance cannot be created."); |
415 | return 0; | |
84e36c27 | 416 | } |
417 | Float_t magneticField = argument.Atof(); | |
418 | calib->SetExBField(magneticField); | |
419 | HLTInfo("SolenoidBz is set to %f in the calibDB",magneticField); | |
420 | return 2; | |
421 | } | |
422 | ||
423 | if (argument.CompareTo("-change-dataId")==0){ | |
424 | HLTDebug("Change data ID received."); | |
425 | fDataId = kTRUE; | |
426 | return 1; | |
427 | } | |
58df4cfa | 428 | |
429 | if (argument.CompareTo("-charge-threshold")==0) { | |
430 | if (++i>=argc) return -EPROTO; | |
431 | argument=argv[i]; | |
5c2dca91 | 432 | fChargeThreshold=(UInt_t)argument.Atoi(); |
58df4cfa | 433 | HLTInfo("The charge threshold has been set to %d.", fChargeThreshold); |
434 | return 2; | |
435 | } | |
84e36c27 | 436 | |
e9530747 | 437 | if (argument.CompareTo("-publish-raw")==0) { |
438 | fPublishRawClusters=kTRUE; | |
439 | return 1; | |
440 | } | |
441 | ||
84e36c27 | 442 | // unknown argument |
443 | return -EINVAL; | |
444 | } | |
445 | ||
84e36c27 | 446 | int AliHLTTPCHWClusterTransformComponent::Reconfigure(const char* /*cdbEntry*/, const char* /*chainId*/) { |
491d6af5 | 447 | // see header file for class documentation |
84e36c27 | 448 | return ConfigureFromCDBTObjString(fgkOCDBEntryHWTransform); |
491d6af5 | 449 | } |
6af4f584 | 450 | |
451 | void AliHLTTPCHWClusterTransformComponent::PrintDebug(AliHLTUInt32_t *buffer, Int_t size){ | |
452 | // see header file for class documentation | |
453 | ||
454 | HLTInfo("The size is: %d", size); | |
455 | for(Int_t n32bit=0; n32bit<size; n32bit++){ | |
456 | ||
457 | AliHLTUInt8_t *wordPtr = reinterpret_cast<AliHLTUInt8_t*>(&buffer[n32bit]); | |
458 | // cout << "word ptr initialized"<<endl; | |
459 | for(Int_t w=3;w>=0;w--){ | |
460 | // cout <<"accessing word"<<endl; | |
461 | AliHLTUInt8_t word = wordPtr[w]; | |
462 | // cout<< "word was accessed"<<endl; | |
463 | for(int n=7; n>=0; n--){ | |
464 | //print the byte values | |
465 | if((((word>>n)<<7)&0x80) != 0){ | |
466 | printf("1"); | |
467 | } | |
468 | else{ | |
469 | printf("0"); | |
470 | } | |
471 | } | |
472 | printf(" "); | |
473 | } | |
474 | printf("\n"); | |
475 | } | |
476 | } // end of PrintDebug | |
1c29fee7 | 477 | |
fe1a26cb | 478 | void AliHLTTPCHWClusterTransformComponent::GetOCDBObjectDescription( TMap* const targetMap) |
479 | { | |
480 | // Get a list of OCDB object description needed for the particular component | |
1c29fee7 | 481 | if (!targetMap) return; |
fe1a26cb | 482 | |
483 | // OCDB entries for component arguments | |
484 | ||
1c29fee7 | 485 | targetMap->Add(new TObjString("HLT/ConfigTPC/TPCHWClusterTransform"), new TObjString("component argument for the charge threshold")); |
fe1a26cb | 486 | |
487 | // OCDB entries to be fetched by the TAXI (access via the AliTPCcalibDB class) | |
488 | targetMap->Add(new TObjString("TPC/Calib/Parameters"), new TObjString("unknown content")); | |
489 | targetMap->Add(new TObjString("TPC/Calib/TimeDrift"), new TObjString("drift velocity calibration")); | |
490 | targetMap->Add(new TObjString("TPC/Calib/Temperature"), new TObjString("temperature map")); | |
491 | targetMap->Add(new TObjString("TPC/Calib/PadGainFactor"), new TObjString("gain factor pad by pad")); | |
492 | targetMap->Add(new TObjString("TPC/Calib/ClusterParam"), new TObjString("cluster parameters")); | |
493 | ||
494 | // OCDB entries needed to be fetched by the Pendolino | |
495 | targetMap->Add(new TObjString("TPC/Calib/AltroConfig"), new TObjString("contains the altro config, e.g. info about the L0 trigger timing")); | |
496 | targetMap->Add(new TObjString("GRP/CTP/CTPtiming"), new TObjString("content used in the cluster coordinate transformation in relation to the L0 trigger timing")); | |
497 | ||
498 | // OCDB entries necessary for replaying data on the HLT cluster | |
499 | targetMap->Add(new TObjString("GRP/GRP/Data"), new TObjString("contains magnetic field info")); | |
500 | ||
501 | // OCDB entries needed to suppress fatals/errors/warnings during reconstruction | |
502 | targetMap->Add(new TObjString("TPC/Calib/PadTime0"), new TObjString("time0 offset pad by pad")); | |
503 | targetMap->Add(new TObjString("TPC/Calib/PadNoise"), new TObjString("pad noise values")); | |
504 | targetMap->Add(new TObjString("TPC/Calib/Pedestals"), new TObjString("pedestal info")); | |
505 | targetMap->Add(new TObjString("TPC/Calib/Pulser"), new TObjString("pulser info")); | |
506 | targetMap->Add(new TObjString("TPC/Calib/CE"), new TObjString("CE laser calibration result")); | |
507 | targetMap->Add(new TObjString("TPC/Calib/Raw"), new TObjString("unknown content")); | |
508 | targetMap->Add(new TObjString("TPC/Calib/QA"), new TObjString("not important")); | |
509 | targetMap->Add(new TObjString("TPC/Calib/Mapping"), new TObjString("unknown content")); | |
510 | targetMap->Add(new TObjString("TPC/Calib/Goofie"), new TObjString("Goofie values, not used at the moment (05.03.2010)")); | |
511 | targetMap->Add(new TObjString("TPC/Calib/HighVoltage"), new TObjString("high voltage values, not used")); | |
512 | targetMap->Add(new TObjString("TPC/Calib/Ref"), new TObjString("unknown content")); | |
1c29fee7 | 513 | } |