From c067b272a1a4b79a29e747f195714ad71ac62f3d Mon Sep 17 00:00:00 2001 From: richterm Date: Thu, 3 Dec 2009 11:54:59 +0000 Subject: [PATCH] A couple of major and minor bugs fixed in the SchemaEvolutionComponent - resolved increasing memory problem, duplicate objects had been added for every event - argument scan for '-fxs' corrected - skip classes with version 0 (not designated for storage) - generating output file with correct run no --- .../util/AliHLTRootSchemaEvolutionComponent.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx index 222dcce6e8f..982128e3712 100644 --- a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx +++ b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx @@ -178,6 +178,7 @@ int AliHLTRootSchemaEvolutionComponent::UpdateStreamerInfos(const TList* list, T if (!pInfo) continue; TString name=pInfo->GetName(); int i=0; + if (pInfo->GetClassVersion()==0) continue; // skip classes which are not for storage for (; iGetEntriesFast(); i++) { if (name.CompareTo(infos->At(i)->GetName())==0 && pInfo->GetClassVersion() == ((TStreamerInfo*)infos->At(i))->GetClassVersion()) { @@ -186,8 +187,10 @@ int AliHLTRootSchemaEvolutionComponent::UpdateStreamerInfos(const TList* list, T } } - // Add streamer info - infos->Add(pInfo); + // Add streamer info if not yet there + if (i>=infos->GetEntriesFast()) { + infos->Add(pInfo); + } } return iResult; @@ -224,8 +227,8 @@ int AliHLTRootSchemaEvolutionComponent::ScanConfigurationArgument(int argc, cons if (argument.Contains("-fxs")) { argument.ReplaceAll("-fxs", ""); argument.ReplaceAll("=", ""); + SetBits(kFXS); if (argument.IsNull()) { - SetBits(kFXS); } else if (argument.CompareTo("off")) { ClearBits(kFXS); } else if (argument.IsDigit()) { @@ -272,9 +275,9 @@ int AliHLTRootSchemaEvolutionComponent::WriteToFile(const char* filename, const version++; AliCDBPath cdbPath(entrypath); - AliCDBId cdbId(cdbPath, GetRunNo(), AliCDBRunRange::Infinity(), version, 0); + AliCDBId cdbId(cdbPath, AliCDBManager::Instance()->GetRun(), AliCDBRunRange::Infinity(), version, 0); AliCDBMetaData* cdbMetaData=new AliCDBMetaData; - cdbMetaData->SetResponsible("ALICE HLT"); + cdbMetaData->SetResponsible("ALICE HLT Matthias.Richter@cern.ch"); cdbMetaData->SetComment("Streamer info for HLTOUT payload"); AliCDBEntry* entry=new AliCDBEntry(infos->Clone(), cdbId, cdbMetaData, kTRUE); -- 2.43.0