, fESD(NULL)
, fESDfriend(NULL)
, fSolenoidBz(-5.00668)
- , fMakeFriends(1)
+ , fMakeFriends(0)
, fBenchmark("EsdConverter")
{
// see header file for class documentation
AliHLTGlobalEsdConverterComponent::~AliHLTGlobalEsdConverterComponent()
{
// see header file for class documentation
- delete fESD;
- delete fESDfriend;
+ if (fESD) delete fESD;
+ if (fESDfriend) delete fESDfriend;
for( int i=0; i<fkNPartition; i++ ){
delete[] fPartitionClusters[i];
}
fSolenoidBz=GetBz();
- delete fESD;
+ if(fESD) delete fESD;
fESD = NULL;
- delete fESDfriend;
- fESDfriend=0;
+ if(fESDfriend) delete fESDfriend;
+ fESDfriend=NULL;
if (iResult>=0) {
fESD = new AliESDEvent;
int AliHLTGlobalEsdConverterComponent::DoDeinit()
{
// see header file for class documentation
- delete fESD;
+ if(fESD) delete fESD;
fESD=NULL;
- delete fESDfriend;
+ if(fESDfriend) delete fESDfriend;
fESDfriend = NULL;
return 0;
}
// see header file for class documentation
int iResult=0;
-
- AliSysInfo::AddStamp("AliHLTGlobalEsdConverterComponent::DoEvent.Start", evtData.fStructSize);
-
- bool benchmark = true;
-
if (!fESD) return -ENODEV;
if (!IsDataEvent()) return iResult;
pESD->WriteToTree(pTree);
iResult=PushBack(pTree, kAliHLTDataTypeESDTree|kAliHLTDataOriginOut, 0);
} else {
- cout<<"Write ESD block: n tracks "<<pESD->GetNumberOfTracks()<<endl;
- cout<<"Write ESD block: n v0s "<<pESD->GetNumberOfV0s()<<endl;
iResult=PushBack(pESD, kAliHLTDataTypeESDObject|kAliHLTDataOriginOut, 0);
}
fBenchmark.AddOutput(GetLastObjectSize());
if( iResult>=0 && fMakeFriends ){
- cout<<"Write ESD friend block: n friend tracks "<<fESDfriend->GetNumberOfTracks()<<endl;
iResult=PushBack(fESDfriend, kAliHLTDataTypeESDfriendObject|kAliHLTDataOriginOut, 0);
fBenchmark.AddOutput(GetLastObjectSize());
}
}
fBenchmark.Stop(0);
- HLTWarning( fBenchmark.GetStatistics() );
-
-
-
-
-
-
- if(benchmark){
-
-
- Double_t statistics[10];
- TString names[10];
- fBenchmark.GetStatisticsData(statistics, names);
- fBenchmark.Reset();
-
- AliSysInfo::AddStamp("AliHLTGlobalEsdConverterComponent::DoEvent.Stop", (int)(statistics[1]), (int)(statistics[2]),pESD->GetNumberOfTracks(),pESD->GetNumberOfV0s() );
- }
+ HLTBenchmark( fBenchmark.GetStatistics() );
for(Int_t i=0; i<fkNPartition; i++){
- delete[] fPartitionClusters[i];
- fPartitionClusters[i] = 0;
- fNPartitionClusters[i] = 0;
+ delete[] fPartitionClusters[i];
+ fPartitionClusters[i] = 0;
+ fNPartitionClusters[i] = 0;
}
if( fESDfriend ) fESDfriend->Reset();
fBenchmark.AddInput(pBlock->fSize);
vector<AliHLTGlobalBarrelTrack> tracks;
if ((iResult=AliHLTGlobalBarrelTrack::ConvertTrackDataArray(reinterpret_cast<const AliHLTTracksData*>(pBlock->fPtr), pBlock->fSize, tracks))>=0) {
- cout<<"\n\n ESD converter: input "<<tracks.size()<<" TPC tracks"<<endl;
for (vector<AliHLTGlobalBarrelTrack>::iterator element=tracks.begin();
element!=tracks.end(); element++) {
Float_t points[4] = {
// Cook dEdx
- AliTPCseed *seed = &(tTPC);
+ //AliTPCseed *seed = &(tTPC);
//fSeedArray->AddAt( seed, TMath::Abs(seed->GetLabel()) );
//fdEdx->Fill( seed->P()*seed->Charge(), seed->CookdEdx(0.02, 0.6) );
fBenchmark.AddInput(pBlock->fSize);
AliFlatESDVertex *vtxFlat = reinterpret_cast<AliFlatESDVertex*>( pBlock->fPtr );
if (vtxFlat->GetNContributors()>0) {
- cout<<"\n\n ESD converter: input vertexTrackSAP with "<<vtxFlat->GetNContributors()<<" contributors"<<endl;
AliESDVertex vtx;
vtxFlat->GetESDVertex(vtx);
vtx.SetTitle("vertexITSSAP");
const AliHLTITSSAPTrackerDataContainer *dataSAP = reinterpret_cast<const AliHLTITSSAPTrackerDataContainer*>(pBlock->fPtr);
AliITStrackV2 trcV2;
int ntrITSSAP = dataSAP->fCount;
- cout<<"\n\n ESD converter: input "<<ntrITSSAP<<" ITS SAP tracks"<<endl;
for (int itr=0;itr<ntrITSSAP;itr++) {
const AliHLTITSSAPTrackerData& trcFlatSAP = dataSAP->fTracks[itr];
AliESDtrack inpESDtrc;
if( fMakeFriends && pESDfriend ){ // create friend track
pESD->SetESDfriend( pESDfriend );
- // cout<<"\n\n ESD Friend: "<<pESDfriend->GetNumberOfTracks()<<endl;
}
if (iResult>=0) iResult=iAddedDataBlocks;
return iResult;
-}
\ No newline at end of file
+}