3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * for The ALICE HLT Project. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 /** @file AliHLTSystem.cxx
20 @author Matthias Richter
22 @brief Implementation of HLT module management.
30 #include "AliHLTStdIncludes.h"
31 #include "AliHLTSystem.h"
32 #include "AliHLTComponentHandler.h"
33 #include "AliHLTComponent.h"
34 #include "AliHLTConfiguration.h"
35 #include "AliHLTConfigurationHandler.h"
36 #include "AliHLTTask.h"
37 #include "AliHLTModuleAgent.h"
38 #include "AliHLTOfflineInterface.h"
39 #include <TObjArray.h>
40 #include <TObjString.h>
41 #include <TStopwatch.h>
43 #include <TInterpreter.h>
45 /** HLT default component libraries */
46 const char* kHLTDefaultLibs[]= {
49 // "libAliHLTSample.so",
56 /** ROOT macro for the implementation of ROOT specific class methods */
57 ClassImp(AliHLTSystem)
59 AliHLTSystem::AliHLTSystem()
61 fpComponentHandler(new AliHLTComponentHandler()),
62 fpConfigurationHandler(new AliHLTConfigurationHandler()),
66 fStopwatches(new TObjArray),
70 // see header file for class documentation
72 // refer to README to build package
74 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
76 if (fgNofInstances++>0)
77 HLTWarning("multiple instances of AliHLTSystem, you should not use more than one at a time");
79 SetGlobalLoggingLevel(kHLTLogDefault);
80 if (fpComponentHandler) {
81 AliHLTComponentEnvironment env;
82 memset(&env, 0, sizeof(AliHLTComponentEnvironment));
83 env.fAllocMemoryFunc=AliHLTSystem::AllocMemory;
84 env.fLoggingFunc=NULL;
85 AliHLTComponentLogSeverity loglevel=fpComponentHandler->GetLocalLoggingLevel();
86 fpComponentHandler->SetLocalLoggingLevel(kHLTLogError);
87 fpComponentHandler->SetEnvironment(&env);
88 fpComponentHandler->LoadLibrary("libAliHLTUtil.so", 0/* do not activate agents */);
89 fgAliLoggingFunc=(AliHLTLogging::AliHLTDynamicMessage)fpComponentHandler->FindSymbol("libAliHLTUtil.so", "AliDynamicMessage");
90 fpComponentHandler->SetLocalLoggingLevel(loglevel);
91 if (fgAliLoggingFunc==NULL) {
92 HLTError("symbol lookp failure: can not find AliDynamicMessage, switching to HLT logging system");
94 fpComponentHandler->AnnounceVersion();
96 HLTFatal("can not create Component Handler");
98 if (fpConfigurationHandler) {
99 AliHLTConfiguration::GlobalInit(fpConfigurationHandler);
101 HLTFatal("can not create Configuration Handler");
105 AliHLTSystem::~AliHLTSystem()
107 // see header file for class documentation
110 AliHLTConfiguration::GlobalDeinit(fpConfigurationHandler);
111 if (fpConfigurationHandler) {
112 delete fpConfigurationHandler;
114 fpConfigurationHandler=NULL;
116 if (fpComponentHandler) {
117 delete fpComponentHandler;
119 fpComponentHandler=NULL;
122 int AliHLTSystem::fgNofInstances=0;
124 int AliHLTSystem::AddConfiguration(AliHLTConfiguration* pConf)
126 // see header file for class documentation
135 int AliHLTSystem::InsertConfiguration(AliHLTConfiguration* pConf, AliHLTConfiguration* pPrec)
137 // see header file for class documentation
149 int AliHLTSystem::DeleteConfiguration(AliHLTConfiguration* pConf)
151 // see header file for class documentation
160 int AliHLTSystem::BuildTaskList(const char* id)
162 // see header file for class documentation
165 if (fpConfigurationHandler) {
166 AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(id);
168 iResult=BuildTaskList(pConf);
170 HLTError("unknown configuration \"%s\"", id);
182 int AliHLTSystem::BuildTaskList(AliHLTConfiguration* pConf)
184 // see header file for class documentation
187 AliHLTTask* pTask=NULL;
188 if ((pTask=FindTask(pConf->GetName()))!=NULL) {
189 if (pTask->GetConf()!=pConf) {
190 HLTError("configuration missmatch, there is already a task with configuration name \"%s\", but it is different. Most likely configuration %p is not registered properly", pConf->GetName(), pConf);
193 // task for this configuration exists, terminate
195 } else if (pConf->SourcesResolved(1)!=1) {
196 HLTError("configuration \"%s\" has unresolved sources, aborting ...", pConf->GetName());
199 pTask=new AliHLTTask(pConf);
204 static int iterationLevel=0;
205 if (pTask && iResult>=0) {
206 // check for circular dependencies
207 if ((iResult=pConf->FollowDependency(pConf->GetName()))>0) {
208 HLTError("detected circular dependency for configuration \"%s\"", pTask->GetName());
209 pTask->PrintDependencyTree(pTask->GetName(), 1/*use the configuration list*/);
210 HLTError("aborted ...");
214 // check whether all dependencies are already in the task list
215 // create the missing ones
216 // this step is an iterative process which calls this function again for the missing
217 // configurations, in order to avoid the currently processed task to be created
218 // again it is added to the list temporarily and removed afterwards
219 // This is of high importance to preserve the order of the tasks. Furthermore, the
220 // InsertTask method has to be used in order to set all the cross links right
221 fTaskList.Add(pTask);
222 AliHLTConfiguration* pDep=pConf->GetFirstSource();
223 while (pDep!=NULL && iResult>=0) {
224 HLTDebug("iteration %d: checking dependency %s (%p)", iterationLevel, pDep->GetName(), pDep);
225 if (FindTask(pDep->GetName())==NULL) {
226 HLTDebug("iteration %d: building task list for configuration %s (%p)", iterationLevel, pDep->GetName(), pDep);
228 iResult=BuildTaskList(pDep);
231 pDep=pConf->GetNextSource();
233 // remove the temporarily added task
234 fTaskList.Remove(pTask);
236 // insert the task and set the cross-links
238 HLTDebug("iteration %d: inserting task %s (%p)", iterationLevel, pTask->GetName(), pTask);
239 iResult=InsertTask(pTask);
252 int AliHLTSystem::CleanTaskList()
254 // see header file for class documentation
257 while ((lnk=fTaskList.LastLink())!=NULL) {
258 delete (lnk->GetObject());
259 fTaskList.Remove(lnk);
264 int AliHLTSystem::InsertTask(AliHLTTask* pTask)
266 // see header file for class documentation
268 TObjLink *lnk = NULL;
269 if ((iResult=pTask->CheckDependencies())>0)
270 lnk=fTaskList.FirstLink();
271 while (lnk && iResult>0) {
272 AliHLTTask* pCurr = (AliHLTTask*)lnk->GetObject();
273 //HLTDebug("checking \"%s\"", pCurr->GetName());
274 iResult=pTask->Depends(pCurr);
276 iResult=pTask->SetDependency(pCurr);
277 pCurr->SetTarget(pTask);
278 HLTDebug("set dependency \"%s\" for configuration \"%s\"", pCurr->GetName(), pTask->GetName());
280 if (pCurr->Depends(pTask)) {
281 // circular dependency
282 HLTError("circular dependency: can not resolve dependencies for configuration \"%s\"", pTask->GetName());
284 } else if ((iResult=pTask->CheckDependencies())>0) {
290 fTaskList.AddAfter(lnk, pTask);
292 fTaskList.AddFirst(pTask);
294 HLTDebug("task \"%s\" (%p) inserted (size %d)", pTask->GetName(), pTask, sizeof(AliHLTTask));
295 } else if (iResult>0) {
296 HLTError("can not resolve dependencies for configuration \"%s\" (%d unresolved)", pTask->GetName(), iResult);
302 AliHLTTask* AliHLTSystem::FindTask(const char* id)
304 // see header file for class documentation
305 AliHLTTask* pTask=NULL;
307 pTask=dynamic_cast<AliHLTTask*>(fTaskList.FindObject(id));
312 void AliHLTSystem::PrintTaskList()
314 // see header file for class documentation
315 HLTLogKeyword("task list");
316 TObjLink *lnk = NULL;
317 HLTMessage("Task List");
318 lnk=fTaskList.FirstLink();
320 TObject* obj=lnk->GetObject();
322 HLTMessage(" %s - status:", obj->GetName());
323 AliHLTTask* pTask=(AliHLTTask*)obj;
324 pTask->PrintStatus();
331 int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
333 // see header file for class documentation
336 SetStatusFlags(kRunning);
337 if (fEventCount>=0 || (iResult=InitTasks())>=0) {
338 if (fEventCount>=0 || (iResult=StartTasks())>=0) {
339 if (fEventCount==0) {
340 InitBenchmarking(fStopwatches);
342 //ResumeBenchmarking(fStopwatches);
344 for (int i=fEventCount; i<fEventCount+iNofEvents && iResult>=0; i++) {
345 if ((iResult=ProcessTasks(i))>=0) {
349 // TODO: define different running modes to either ignore errors in
350 // event processing or not
355 fEventCount+=iNofEvents;
356 if (bStop) StopTasks();
357 //else PauseBenchmarking(fStopwatches);
359 if (bStop) DeinitTasks();
363 } else if (iResult==-ENOKEY) {
364 iResult=0; // do not propagate the error
366 ClearStatusFlags(kRunning);
370 int AliHLTSystem::InitTasks()
372 // see header file for class documentation
374 TObjLink *lnk=fTaskList.FirstLink();
377 HLTWarning("Task list is empty, aborting ...");
380 while (lnk && iResult>=0) {
381 TObject* obj=lnk->GetObject();
383 AliHLTTask* pTask=(AliHLTTask*)obj;
384 iResult=pTask->Init(NULL, fpComponentHandler);
390 HLTError("can not initialize task list, error %d", iResult);
396 int AliHLTSystem::InitBenchmarking(TObjArray* pStopwatches)
398 // see header file for class documentation
400 if (pStopwatches==NULL) return 0;
402 for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
403 TStopwatch* pStopwatch= new TStopwatch;
406 pStopwatches->AddAt(pStopwatch, i);
413 TObjLink *lnk=fTaskList.FirstLink();
414 while (lnk && iResult>=0) {
415 TObject* obj=lnk->GetObject();
417 AliHLTTask* pTask=(AliHLTTask*)obj;
418 AliHLTComponent* pComp=NULL;
419 if (iResult>=0 && (pComp=pTask->GetComponent())!=NULL) {
420 switch (pComp->GetComponentType()) {
421 case AliHLTComponent::kProcessor:
422 pComp->SetStopwatches(pStopwatches);
424 case AliHLTComponent::kSource:
426 // this switch determines whether the time consumption of the
427 // AliHLTComponent base methods should be counted to the input
428 // stopwatch or base stopwatch.
429 //int inputBase=(int)AliHLTComponent::kSWBase;
430 int inputBase=(int)AliHLTComponent::kSWInput;
431 pComp->SetStopwatch(pStopwatches->At(inputBase), AliHLTComponent::kSWBase);
432 pComp->SetStopwatch(pStopwatches->At((int)AliHLTComponent::kSWInput), AliHLTComponent::kSWDA);
435 case AliHLTComponent::kSink:
437 // this switch determines whether the time consumption of the
438 // AliHLTComponent base methods should be counted to the output
439 // stopwatch or base stopwatch.
440 //int outputBase=(int)AliHLTComponent::kSWBase;
441 int outputBase=(int)AliHLTComponent::kSWOutput;
442 pComp->SetStopwatch(pStopwatches->At(outputBase), AliHLTComponent::kSWBase);
443 pComp->SetStopwatch(pStopwatches->At((int)AliHLTComponent::kSWOutput), AliHLTComponent::kSWDA);
447 HLTWarning("unknown component type %d", (int)pComp->GetComponentType());
457 int AliHLTSystem::PrintBenchmarking(TObjArray* pStopwatches, int bClean)
459 // see header file for class documentation
461 if (pStopwatches==NULL) return 0;
463 for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
464 if (!dynamic_cast<TStopwatch*>(pStopwatches->At(i))) {
470 if (iInitialized!=0) {
471 HLTInfo("HLT statistics:\n"
472 " base: R:%.3fs C:%.3fs\n"
473 " input: R:%.3fs C:%.3fs\n"
474 " output: R:%.3fs C:%.3fs\n"
475 " event processing : R:%.3fs C:%.3fs"
476 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWBase))->RealTime()
477 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWBase))->CpuTime()
478 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWInput))->RealTime()
479 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWInput))->CpuTime()
480 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWOutput))->RealTime()
481 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWOutput))->CpuTime()
482 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWDA))->RealTime()
483 , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWDA))->CpuTime()
488 for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
489 TObject* pObj=pStopwatches->RemoveAt(i);
490 if (pObj) delete pObj;
496 int AliHLTSystem::StartTasks()
498 // see header file for class documentation
500 TObjLink *lnk=fTaskList.FirstLink();
501 while (lnk && iResult>=0) {
502 TObject* obj=lnk->GetObject();
504 AliHLTTask* pTask=(AliHLTTask*)obj;
505 iResult=pTask->StartRun();
511 HLTError("can not start task list, error %d", iResult);
519 int AliHLTSystem::ProcessTasks(Int_t eventNo)
521 // see header file for class documentation
523 HLTDebug("processing event no %d", eventNo);
524 TObjLink *lnk=fTaskList.FirstLink();
525 while (lnk && iResult>=0) {
526 TObject* obj=lnk->GetObject();
528 AliHLTTask* pTask=(AliHLTTask*)obj;
529 iResult=pTask->ProcessTask(eventNo);
530 HLTDebug("task %s finnished (%d)", pTask->GetName(), iResult);
537 HLTInfo("Event %d successfully finished (%d)", eventNo, iResult);
540 HLTError("Processing of event %d failed (%d)", eventNo, iResult);
546 int AliHLTSystem::StopTasks()
548 // see header file for class documentation
550 TObjLink *lnk=fTaskList.FirstLink();
551 while (lnk && iResult>=0) {
552 TObject* obj=lnk->GetObject();
554 AliHLTTask* pTask=(AliHLTTask*)obj;
555 iResult=pTask->EndRun();
560 PrintBenchmarking(fStopwatches, 1 /*clean*/);
564 int AliHLTSystem::DeinitTasks()
566 // see header file for class documentation
568 TObjLink *lnk=fTaskList.FirstLink();
569 while (lnk && iResult>=0) {
570 TObject* obj=lnk->GetObject();
572 AliHLTTask* pTask=(AliHLTTask*)obj;
573 iResult=pTask->Deinit();
584 void* AliHLTSystem::AllocMemory( void* /*param*/, unsigned long size )
586 // see header file for class documentation
589 p=(void*)new char[size];
593 log.LoggingVarargs(kHLTLogError, "AliHLTSystem" , "AllocMemory" , __FILE__ , __LINE__ , "exeption during memory allocation" );
598 int AliHLTSystem::Reconstruct(int nofEvents, AliRunLoader* runLoader,
599 AliRawReader* rawReader)
601 // see header file for class documentation
603 if (runLoader || rawReader || nofEvents==0) {
604 if (nofEvents>0) {HLTInfo("Run Loader %p, Raw Reader %p , %d event(s)", runLoader, rawReader, nofEvents);}
605 if (CheckStatus(kReady)) {
607 // special case to close the reconstruction
608 if (!CheckStatus(kError)) {
613 if ((iResult=AliHLTOfflineInterface::SetParamsToComponents(runLoader, rawReader))>=0) {
614 // the system always remains started after event processing, a specific
615 // call with nofEvents==0 is needed to execute the stop sequence
616 if ((iResult=Run(nofEvents, 0))<0) SetStatusFlags(kError);
620 HLTError("wrong state %#x, required flags %#x", GetStatusFlags(), kReady);
623 HLTError("missing RunLoader (%p)/RawReader (%p) instance", runLoader, rawReader);
629 int AliHLTSystem::FillESD(int eventNo, AliRunLoader* runLoader, AliESDEvent* esd)
631 // see header file for class documentation
633 if (runLoader || esd) {
634 HLTInfo("Event %d: Run Loader %p, ESD %p", eventNo, runLoader, esd);
635 iResult=AliHLTOfflineInterface::FillComponentESDs(eventNo, runLoader, esd);
637 HLTError("missing run loader/ESD instance(s)");
643 int AliHLTSystem::LoadComponentLibraries(const char* libraries)
645 // see header file for class documentation
648 if (fpComponentHandler) {
649 TString libs(libraries);
650 TObjArray* pTokens=libs.Tokenize(" ");
652 int iEntries=pTokens->GetEntries();
653 for (int i=0; i<iEntries && iResult>=0; i++) {
654 iResult=fpComponentHandler->LoadLibrary((((TObjString*)pTokens->At(i))->GetString()).Data());
659 SetStatusFlags(kLibrariesLoaded);
661 // lets see if we need this, probably not
662 //fpComponentHandler->UnloadLibraries();
663 ClearStatusFlags(kLibrariesLoaded);
667 HLTFatal("no component handler available");
675 int AliHLTSystem::Configure(AliRunLoader* runloader)
677 // see header file for class documentation
678 return Configure(NULL, runloader);
681 int AliHLTSystem::Configure(AliRawReader* rawReader, AliRunLoader* runloader)
683 // see header file for class documentation
685 if (CheckStatus(kRunning)) {
686 HLTError("HLT system in running state, can not configure");
689 ClearStatusFlags(kConfigurationLoaded|kTaskListCreated);
690 if (CheckFilter(kHLTLogDebug))
691 AliHLTModuleAgent::PrintStatus();
692 if (CheckStatus(kConfigurationLoaded)==0) {
693 iResult=LoadConfigurations(rawReader, runloader);
695 if (fChains.Length()==0) {
696 HLTError("custom configuration(s) specified, but no configuration to run in local reconstruction, use \'localrec=<conf>\' option");
701 SetStatusFlags(kConfigurationLoaded);
702 if (CheckFilter(kHLTLogDebug))
703 fpConfigurationHandler->PrintConfigurations();
704 iResult=BuildTaskListsFromReconstructionChains(rawReader, runloader);
706 SetStatusFlags(kTaskListCreated);
709 if (iResult<0) SetStatusFlags(kError);
714 int AliHLTSystem::ScanOptions(const char* options)
716 // see header file for class documentation
720 TString alloptions(options);
721 TObjArray* pTokens=alloptions.Tokenize(" ");
723 int iEntries=pTokens->GetEntries();
724 for (int i=0; i<iEntries; i++) {
725 TString token=(((TObjString*)pTokens->At(i))->GetString());
726 if (token.Contains("loglevel=")) {
727 TString param=token.ReplaceAll("loglevel=", "");
728 if (param.IsDigit()) {
729 SetGlobalLoggingLevel((AliHLTComponentLogSeverity)param.Atoi());
730 } else if (param.BeginsWith("0x") &&
731 param.Replace(0,2,"",0).IsHex()) {
733 sscanf(param.Data(),"%x", &severity);
734 SetGlobalLoggingLevel((AliHLTComponentLogSeverity)severity);
736 HLTWarning("wrong parameter for option \'loglevel=\', (hex) number expected");
738 } else if (token.Contains("alilog=off")) {
740 } else if (token.Contains("config=")) {
741 TString param=token.ReplaceAll("config=", "");
743 gROOT->Macro(param.Data(), &error);
745 SetStatusFlags(kConfigurationLoaded);
747 HLTError("can not execute macro \'%s\'", param.Data());
750 } else if (token.Contains("chains=")) {
751 TString param=token.ReplaceAll("chains=", "");
752 fChains=param.ReplaceAll(",", " ");
753 } else if (token.BeginsWith("lib") && token.EndsWith(".so")) {
757 HLTWarning("unknown option \'%s\'", token.Data());
765 const char** deflib=kHLTDefaultLibs;
771 if ((!CheckStatus(AliHLTSystem::kLibrariesLoaded)) &&
772 (LoadComponentLibraries(libs.Data())<0)) {
773 HLTError("error while loading HLT libraries");
781 int AliHLTSystem::Reset(int bForce)
783 // see header file for class documentation
785 if (!bForce && CheckStatus(kRunning)) {
786 HLTError("HLT system in running state, can not configure");
790 ClearStatusFlags(~kUninitialized);
794 int AliHLTSystem::LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runloader)
796 // see header file for class documentation
797 if (CheckStatus(kRunning)) {
798 HLTError("HLT system in running state, can not configure");
802 AliHLTModuleAgent* pAgent=AliHLTModuleAgent::GetFirstAgent();
803 while (pAgent && iResult>=0) {
804 const char* deplibs=pAgent->GetRequiredComponentLibraries();
806 HLTDebug("load libraries \'%s\' for agent %s (%p)", deplibs, pAgent->GetName(), pAgent);
807 iResult=LoadComponentLibraries(deplibs);
810 HLTDebug("load configurations for agent %s (%p)", pAgent->GetName(), pAgent);
811 pAgent->CreateConfigurations(fpConfigurationHandler, rawReader, runloader);
812 pAgent=AliHLTModuleAgent::GetNextAgent();
818 int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader, AliRunLoader* runloader)
820 // see header file for class documentation
821 if (CheckStatus(kRunning)) {
822 HLTError("HLT system in running state, can not configure");
825 if (!CheckStatus(kConfigurationLoaded)) {
826 HLTWarning("configurations not yet loaded");
835 if (fChains.Length()>0) {
837 HLTInfo("custom reconstruction chain: %s", chains.Data());
839 AliHLTModuleAgent* pAgent=AliHLTModuleAgent::GetFirstAgent();
840 while ((pAgent || fChains.Length()>0) && iResult>=0) {
841 const char* agentchains=pAgent->GetReconstructionChains(rawReader, runloader);
843 if (!chains.IsNull()) chains+="";
845 HLTInfo("reconstruction chains for agent %s (%p): %s", pAgent->GetName(), pAgent, agentchains);
847 pAgent=AliHLTModuleAgent::GetNextAgent();
851 // build task list for chains
852 TObjArray* pTokens=chains.Tokenize(" ");
854 int iEntries=pTokens->GetEntries();
855 for (int i=0; i<iEntries && iResult>=0; i++) {
856 const char* pCID=((TObjString*)pTokens->At(i))->GetString().Data();
857 AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(pCID);
859 iResult=BuildTaskList(pConf);
861 assert(fpComponentHandler!=NULL);
862 TString cid=pConf->GetComponentID();
863 if (cid.CompareTo("HLTOUT")==0) {
864 // remove from the input of a global HLTOUT configuration
865 chains.ReplaceAll(pCID, "");
866 } else if (bHaveOutput==0) {
867 // check whether this configuration produces data output
868 if ((bHaveOutput=fpComponentHandler->HasOutputData(cid.Data()))<0) {
870 chains.ReplaceAll(pCID, "");
875 HLTWarning("can not find configuration %s", pCID);
881 // build HLTOUT for simulation
882 if (iResult>=0 && runloader) {
884 // there are components in the chain which produce data which need to be
885 // piped to an HLTOUT
886 if (fpComponentHandler->FindComponentIndex("HLTOUT")>=0 ||
887 LoadComponentLibraries("libHLTsim.so")>=0) {
888 AliHLTConfiguration globalout("_globalout_", "HLTOUT", chains.Data(), NULL);
889 iResult=BuildTaskList("_globalout_");
891 HLTError("can not load libHLTsim.so and HLTOUT component");
897 if (iResult>=0) SetStatusFlags(kTaskListCreated);
902 int AliHLTSystem::CheckStatus(int flag)
904 // see header file for class documentation
905 if (flag==kUninitialized && flag==fState) return 1;
906 if ((fState&flag)==flag) return 1;
910 int AliHLTSystem::GetStatusFlags()
912 // see header file for class documentation
916 int AliHLTSystem::SetStatusFlags(int flags)
918 // see header file for class documentation
923 int AliHLTSystem::ClearStatusFlags(int flags)
925 // see header file for class documentation
930 void* AliHLTSystem::FindDynamicSymbol(const char* library, const char* symbol)
932 // see header file for class documentation
933 if (fpComponentHandler==NULL) return NULL;
934 return fpComponentHandler->FindSymbol(library, symbol);