X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2Fglobal%2FAliHLTGlobalFlatEsdConverterComponent.cxx;h=a44e0a46fbda6575da3c2ec04db11ddec782cf19;hb=10cad783ad6a600a066ff8bad79c5d06bfc30b86;hp=66c77aeab45645ee1d60d3109dc7ec62aa087b48;hpb=6d9b7a9e923ef7f86694b9cd1ec3fb287e618417;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/global/AliHLTGlobalFlatEsdConverterComponent.cxx b/HLT/global/AliHLTGlobalFlatEsdConverterComponent.cxx index 66c77aeab45..a44e0a46fbd 100644 --- a/HLT/global/AliHLTGlobalFlatEsdConverterComponent.cxx +++ b/HLT/global/AliHLTGlobalFlatEsdConverterComponent.cxx @@ -63,6 +63,8 @@ #include "AliHLTTPCClusterMCData.h" #include "AliHLTTPCTransform.h" +#include "AliSysInfo.h" + /** ROOT macro for the implementation of ROOT specific class methods */ ClassImp(AliHLTGlobalFlatEsdConverterComponent) @@ -78,6 +80,7 @@ AliHLTGlobalFlatEsdConverterComponent::AliHLTGlobalFlatEsdConverterComponent() // refer to README to build package // or // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt + } AliHLTGlobalFlatEsdConverterComponent::~AliHLTGlobalFlatEsdConverterComponent() @@ -260,15 +263,24 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, - AliHLTComponentBlockDataList& outputBlocks ) + AliHLTComponentBlockDataList& outputBlocks) { + // see header file for class documentation + + +AliSysInfo::AddStamp("DoEvent.Start"); + + int iResult=0; + bool benchmark = true; if (!IsDataEvent()) return iResult; fBenchmark.StartNewEvent(); fBenchmark.Start(0); + + size_t maxOutputSize = size; size = 0; @@ -426,7 +438,7 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(AliHLTTPCDefinitions::fgkClustersDataType| kAliHLTDataOriginTPC); pBlock!=NULL; pBlock=GetNextInputBlock()) { - //fBenchmark.AddInput(pBlock->fSize); + fBenchmark.AddInput(pBlock->fSize); UInt_t slice = AliHLTTPCDefinitions::GetMinSliceNr(*pBlock); UInt_t patch = AliHLTTPCDefinitions::GetMinPatchNr(*pBlock); if( slice >= kNSlices || patch>= kNPatches ){ @@ -438,7 +450,7 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo| kAliHLTDataOriginTPC); pBlock!=NULL; pBlock=GetNextInputBlock()) { - //fBenchmark.AddInput(pBlock->fSize); + fBenchmark.AddInput(pBlock->fSize); UInt_t slice = AliHLTTPCDefinitions::GetMinSliceNr(*pBlock); UInt_t patch = AliHLTTPCDefinitions::GetMinPatchNr(*pBlock); if( slice >= kNSlices || patch>= kNPatches ){ @@ -457,7 +469,7 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa const AliESDVertex *primaryVertexSPD = dynamic_cast( GetFirstInputObject( kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS ) ); const AliESDVertex *primaryVertexTracks = dynamic_cast( GetFirstInputObject( kAliHLTDataTypeESDVertex|kAliHLTDataOriginOut ) ); - cout<FillPrimaryVertices( primaryVertexSPD, primaryVertexTracks ); @@ -550,11 +562,18 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa } AliFlatESDTrack *flatTrack = flatEsd->GetNextTrackPointer(); + new(flatTrack) AliFlatESDTrack; + //cout<<"flatTrack: "<GetNumberOfTPCClusters()<GetNumberOfPoints(); UInt_t nClustersITS = itsRefit ?itsRefit->GetNumberOfPoints() :0; flatTrack->SetNumberOfITSClusters( nClustersITS ); + //flatTrack->SetNumberOfTPCClusters(0); + + //cout<<"GetNumberOfTPCClusters: "<GetNumberOfTPCClusters()<GetSize() + flatTrack->EstimateSize( kTRUE, nClustersTPC ) >= maxOutputSize ){ cout<fSpacePoints[iCluster]; - AliFlatTPCCluster *c= flatTrack->GetNextTPCClusterPointer(); + + AliFlatTPCCluster *c= flatTrack->GetTPCCluster( flatTrack->GetNumberOfTPCClusters() );; c->fX = cIn.GetX(); c->fY = cIn.GetY(); c->fZ = cIn.GetZ(); @@ -598,6 +618,8 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa } } + // cout<<"number of tpc clusters: "<GetNumberOfTPCClusters()<GetNumberOfITSClusters()<StoreLastTrack(); @@ -607,10 +629,11 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa // Fill v0's - { int nV0s =0; + { const AliHLTComponentBlockData* pP = GetFirstInputBlock(kAliHLTDataTypeGlobalVertexer|kAliHLTDataOriginOut); if (pP && pP->fSize && pP->fPtr) { + fBenchmark.AddInput(pP->fSize); const AliHLTGlobalVertexerComponent::AliHLTGlobalVertexerData *data = reinterpret_cast(pP->fPtr); const int* v0s = data->fTrackIndices + data->fNPrimTracks; nV0s = data->fNV0s; @@ -621,15 +644,20 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa flatEsd->StoreLastV0(); } } else { - HLTWarning("xxx No V0 data block"); + HLTWarning(" No V0 data block"); } - cout<<"\nxxxx Found "<fSize); } + // Get Track vertex + for( const AliHLTComponentBlockData *i= GetFirstInputBlock(kAliHLTDataTypeESDVertex|kAliHLTDataOriginOut); i!=NULL; i=GetNextInputBlock() ){ + fBenchmark.AddInput(i->fSize); + } + + /* for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS); iter != NULL; iter = GetNextInputObject() ) { @@ -716,7 +744,28 @@ int AliHLTGlobalFlatEsdConverterComponent::DoEvent( const AliHLTComponentEventDa fBenchmark.Stop(0); HLTWarning( fBenchmark.GetStatistics() ); - + + + + if(benchmark){ + + Double_t statistics[10]; + TString names[10]; + fBenchmark.GetStatisticsData(statistics, names); + // statistics[5] = tracksTPC.size(); + // statistics[7] = nV0s; + + // FillBenchmarkHistos( statistics, names); + fBenchmark.Reset(); + + AliSysInfo::AddStamp("DoEvent.Stop", (int)(statistics[1]), (int)(statistics[2]) ); + + } return iResult; + + + + } +