- constBase = 30;
- inputMultiplier = 0.2;
-}
-
-int
-AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
- std::vector<AliHLTComponentBlockData>& outputBlocks)
-{
- //Do event
-
- UInt_t tSize = 0;
- UInt_t offset = 0;
- UInt_t mysize = 0;
- Int_t nRecPoints = 0;
- Int_t index = 0;
-
- AliHLTUInt8_t* outBPtr;
- outBPtr = outputPtr;
- const AliHLTComponentBlockData* iter = 0;
- unsigned long ndx;
-
- for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
- {
- iter = blocks+ndx;
-
- if(iter->fDataType != AliHLTPHOSDefinitions::fgkCellEnergyDataType)
- {
- cout << "Warning: data type is not fgkCellEnergyDataType " << endl;
- continue;
- }
- index = fClusterizerPtr->BuildCellEnergyArray( reinterpret_cast<AliHLTPHOSRcuCellEnergyDataStruct*>(iter->fPtr),
- fRecPointListPtr);
-
- }
-
- nRecPoints = fClusterizerPtr->CreateRecPointStructArray(fRecPointStructArrayPtr, fRecPointListPtr, index);
-
- cout << "Number of clusters found: " << nRecPoints << endl;
-
- for(Int_t i = 0; i < nRecPoints; i++)
- {
- mysize = 0;
- offset = tSize;
-
- fOutPtr = (AliHLTPHOSClusterDataStruct*)outBPtr;
- fClusterizerPtr->CalculateCenterOfGravity(&fRecPointStructArrayPtr[i]);
- // fClusterizerPtr->CalculateMoments(&fRecPointStructArrayPtr[i], 0);
- // fClusterizerPtr->ClusterizeStruct(&fRecPointStructArrayPtr[i], fOutPtr);
-
- mysize += sizeof(AliHLTPHOSClusterDataStruct);
-
- AliHLTComponentBlockData bd;
- FillBlockData( bd );
- bd.fOffset = offset;
- bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSPhysicsDefinitions::fgkAliHLTClusterDataType;
- bd.fSpecification = 0xFFFFFFFF;
- outputBlocks.push_back( bd );
-
- tSize += mysize;
- outBPtr += mysize;
-
- if( tSize > size )
- {
- Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterizerComponent::DoEvent", "Too much data",
- "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu."
- , tSize, size );
- return EMSGSIZE;
- }
- }
-
- size = tSize;
- fClusterizerPtr->ResetCellEnergyArray();
-
- return 0;
-