From 93950a262d2b8cee4a635aed053ff02d45aee819 Mon Sep 17 00:00:00 2001 From: richterm Date: Mon, 7 Nov 2011 20:17:59 +0000 Subject: [PATCH] automatically added data sink components are now added directly to the internal instance of configuration handler (required for bug #83123); cleanup of TObjString usage without functional change --- HLT/BASE/AliHLTSystem.cxx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/HLT/BASE/AliHLTSystem.cxx b/HLT/BASE/AliHLTSystem.cxx index 1508db209f9..e89e41ab19d 100644 --- a/HLT/BASE/AliHLTSystem.cxx +++ b/HLT/BASE/AliHLTSystem.cxx @@ -1091,7 +1091,8 @@ int AliHLTSystem::LoadComponentLibraries(const char* libraries) if (pTokens) { int iEntries=pTokens->GetEntriesFast(); for (int i=0; i=0; i++) { - iResult=fpComponentHandler->LoadLibrary((((TObjString*)pTokens->At(i))->String()).Data()); + if (!pTokens->At(i)) continue; + iResult=fpComponentHandler->LoadLibrary(pTokens->At(i)->GetName()); } delete pTokens; } @@ -1164,7 +1165,8 @@ int AliHLTSystem::ScanOptions(const char* options) if (pTokens) { int iEntries=pTokens->GetEntriesFast(); for (int i=0; iAt(i))->String()); + if (!pTokens->At(i)) continue; + TString token=pTokens->At(i)->GetName(); if (token.Contains("loglevel=")) { TString param=token.ReplaceAll("loglevel=", ""); if (param.IsDigit()) { @@ -1348,7 +1350,8 @@ int AliHLTSystem::LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runl TObjArray* pTokens=dependencies.Tokenize(" "); if (pTokens) { for (int n=0; nGetEntriesFast(); n++) { - TString module=((TObjString*)pTokens->At(n))->String(); + if (!pTokens->At(n)) continue; + TString module=pTokens->At(n)->GetName(); HLTDebug(" checking %s", module.Data()); module.ReplaceAll("libAliHLT", ""); module.ReplaceAll(".so", ""); @@ -1401,6 +1404,8 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader return 0; } + if (!fpConfigurationHandler || !fpComponentHandler) return -EFAULT; + int iResult=0; int bHaveOutput=0; @@ -1427,14 +1432,14 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader if (pTokens) { int iEntries=pTokens->GetEntriesFast(); for (int i=0; i=0; i++) { - const char* pCID=((TObjString*)pTokens->At(i))->String().Data(); + if (!pTokens->At(i)) continue; + const char* pCID=pTokens->At(i)->GetName(); AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(pCID); if (pConf) { iResult=BuildTaskList(pConf); if (true) { // condition was deprecated but kept for sake of svn diff // bHaveOutput variable has to be set for both running modes // AliHLTSimulation and AliHLTReconstruction - assert(fpComponentHandler!=NULL); TString cid=pConf->GetComponentID(); if (runloader!=NULL && cid.CompareTo("HLTOUT")==0) { // remove from the input of a global HLTOUT configuration @@ -1464,8 +1469,8 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader // the output stream if (fpComponentHandler->FindComponentIndex("ROOTSchemaEvolutionComponent")>=0 || fpComponentHandler->LoadLibrary("libAliHLTUtil.so")>=0) { - AliHLTConfiguration schemaevo("_schemaevolution_", "ROOTSchemaEvolutionComponent", - chains.Data(), "-file=HLT.StreamerInfo.root"); + fpConfigurationHandler->CreateConfiguration("_schemaevolution_", "ROOTSchemaEvolutionComponent", + chains.Data(), "-file=HLT.StreamerInfo.root"); iResult=BuildTaskList("_schemaevolution_"); } else { HLTWarning("can not load libAliHLTUtil.so and ROOTSchemaEvolutionComponent"); @@ -1486,7 +1491,7 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader if (rawReader) HLTOUTComponentId="HLTOUTraw"; else HLTOUTComponentId="HLTOUTdigits"; } - AliHLTConfiguration globalout("_globalout_", HLTOUTComponentId, chains.Data(), NULL); + fpConfigurationHandler->CreateConfiguration("_globalout_", HLTOUTComponentId, chains.Data(), NULL); iResult=BuildTaskList("_globalout_"); } else { HLTError("can not load libHLTsim.so and HLTOUT component"); @@ -1531,7 +1536,8 @@ int AliHLTSystem::AddHLTOUTTask(const char* hltoutchains) if (pTokens) { int iEntries=pTokens->GetEntriesFast(); for (int i=0; i=0; i++) { - const char* token=((TObjString*)pTokens->At(i))->String().Data(); + if (!pTokens->At(i)) continue; + const char* token=pTokens->At(i)->GetName(); AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(token); if (pConf) { TString cid=pConf->GetComponentID(); -- 2.39.3