]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTSystem.cxx
Changes required to handle software triggers correctly in the global trigger component.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTSystem.cxx
index de3d4ab7e874bdb0d268121f95771166e0794541..3a9b5d467e8c03124f3deeb1664efe50d35834b8 100644 (file)
@@ -1,5 +1,4 @@
 // $Id$
-
 //**************************************************************************
 //* This file is property of and copyright by the ALICE HLT Project        * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
@@ -41,9 +40,12 @@ using namespace std;
 #include "AliHLTOUTHandler.h"
 #include "AliHLTOUTTask.h"
 #include "AliHLTControlTask.h"
+#include "AliHLTDataBuffer.h"
+#include "AliHLTMisc.h"
 #include <TObjArray.h>
 #include <TObjString.h>
 #include <TStopwatch.h>
+#include <TList.h>
 //#include <TSystem.h>
 #include <TROOT.h>
 //#include <TInterpreter.h>
@@ -54,10 +56,11 @@ const char* AliHLTSystem::fgkHLTDefaultLibs[]= {
   "libAliHLTRCU.so", 
   "libAliHLTTPC.so", 
   //  "libAliHLTSample.so",
-  //"libAliHLTPHOS.so",
+  //  "libAliHLTPHOS.so",
   "libAliHLTMUON.so",
-  //"libAliHLTTRD.so",
+  "libAliHLTTRD.so",
   "libAliHLTITS.so",
+  "libAliHLTGlobal.so",
   "libAliHLTTrigger.so",
   NULL
 };
@@ -81,6 +84,7 @@ AliHLTSystem::AliHLTSystem(AliHLTComponentLogSeverity loglevel, const char* name
   fpHLTOUTTask(NULL),
   fpControlTask(NULL),
   fName(name)
+  , fECSParams()
 {
   // see header file for class documentation
   // or
@@ -101,6 +105,7 @@ AliHLTSystem::AliHLTSystem(AliHLTComponentLogSeverity loglevel, const char* name
     memset(&env, 0, sizeof(AliHLTAnalysisEnvironment));
     env.fStructSize=sizeof(AliHLTAnalysisEnvironment);
     env.fAllocMemoryFunc=AliHLTSystem::AllocMemory;
+    env.fGetEventDoneDataFunc=AliHLTSystem::AllocEventDoneData;
     env.fLoggingFunc=NULL;
     fpComponentHandler->SetEnvironment(&env);
     InitAliLogFunc(fpComponentHandler);
@@ -133,6 +138,7 @@ AliHLTSystem::~AliHLTSystem()
     fpComponentHandler->Destroy();
   }
   fpComponentHandler=NULL;
+  delete fStopwatches;
 
   // note: fpHLTOUTTask and fpControlTask are deleted by
   // CleanTaskList
@@ -140,51 +146,6 @@ AliHLTSystem::~AliHLTSystem()
 
 int AliHLTSystem::fgNofInstances=0;
 
-int AliHLTSystem::AddConfiguration(AliHLTConfiguration* pConf)
-{
-  // see header file for class documentation
-  HLTLogKeyword("configuration handling");
-  int iResult=0;
-  if (pConf) {
-    HLTError("function not yet implemented");
-    iResult=-ENOSYS;
-  } else {
-    iResult=-EINVAL;
-  }
-  return iResult;
-}
-
-int AliHLTSystem::InsertConfiguration(AliHLTConfiguration* pConf, AliHLTConfiguration* pPrec)
-{
-  // see header file for class documentation
-  HLTLogKeyword("configuration handling");
-  int iResult=0;
-  if (pConf) {
-    if (pPrec) {
-      // find the position
-      HLTError("function not yet implemented");
-      iResult=-ENOSYS;
-    }
-  } else {
-    iResult=-EINVAL;
-  }
-  return iResult;
-}
-
-int AliHLTSystem::DeleteConfiguration(AliHLTConfiguration* pConf)
-{
-  // see header file for class documentation
-  HLTLogKeyword("configuration handling");
-  int iResult=0;
-  if (pConf) {
-    HLTError("function not yet implemented");
-    iResult=-ENOSYS;
-  } else {
-    iResult=-EINVAL;
-  }
-  return iResult;
-}
-
 int AliHLTSystem::BuildTaskList(const char* id)
 {
   // see header file for class documentation
@@ -378,7 +339,8 @@ void AliHLTSystem::PrintTaskList()
   }
 }
 
-int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
+int AliHLTSystem::Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
+                     AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype)
 {
   // see header file for class documentation
   int iResult=0;
@@ -402,7 +364,10 @@ int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
          // reset and prepare for new data
          fpHLTOUTTask->Reset();
        }
-       if ((iResult=ProcessTasks(i))>=0) {
+       if (eventtype == 0) {
+         eventtype = gkAliEventTypeData;
+       }
+       if ((iResult=ProcessTasks(i, trgMask, timestamp, eventtype))>=0) {
          fGoodEvents++;
          iCount++;
        } else {
@@ -411,6 +376,7 @@ int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
          // currently ignored 
          iResult=0;
        }
+       AliHLTDataBuffer::SetGlobalEventCount(iCount);
       }
       fEventCount+=iNofEvents;
       if (bStop) StopTasks();
@@ -424,6 +390,7 @@ int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
     iResult=0; // do not propagate the error
   }
   ClearStatusFlags(kRunning);
+  AliHLTDataBuffer::PrintStatistics();
   return iResult;
 }
 
@@ -434,7 +401,7 @@ int AliHLTSystem::InitTasks()
   TObjLink *lnk=fTaskList.FirstLink();
 
   if (lnk==NULL) {
-    HLTWarning("%s%sTask list is empty, skipping HLT", fName.Data(), fName.IsNull()?"":": ");
+    HLTInfo("Task list is empty, skipping HLT");
     return -126 /*ENOKEY*/;
   }
   while (lnk && iResult>=0) {
@@ -450,7 +417,7 @@ int AliHLTSystem::InitTasks()
     lnk = lnk->Next();
   }
   if (iResult<0) {
-    HLTError("%s%scan not initialize task list, error %d", fName.Data(), fName.IsNull()?"":": ", iResult);
+    HLTError("can not initialize task list, error %d", iResult);
   }
 
   return iResult;
@@ -600,19 +567,20 @@ int AliHLTSystem::StartTasks()
     lnk = lnk->Next();
   }
   if (iResult<0) {
-    HLTError("%s%scan not start task list, error %d", fName.Data(), fName.IsNull()?"":": ", iResult);
+    HLTError("can not start task list, error %d", iResult);
   } else {
     SetStatusFlags(kStarted);
     fEventCount=0;
     fGoodEvents=0;
     if ((iResult=SendControlEvent(kAliHLTDataTypeSOR))<0) {
-      HLTError("%s%scan not send SOR event", fName.Data(), fName.IsNull()?"":": ");
+      HLTError("can not send SOR event: error %d", iResult);
     }
   }
   return iResult;
 }
 
-int AliHLTSystem::ProcessTasks(Int_t eventNo)
+int AliHLTSystem::ProcessTasks(Int_t eventNo, AliHLTUInt64_t trgMask,
+         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype)
 {
   // see header file for class documentation
   int iResult=0;
@@ -622,7 +590,7 @@ int AliHLTSystem::ProcessTasks(Int_t eventNo)
     TObject* obj=lnk->GetObject();
     if (obj) {
       AliHLTTask* pTask=(AliHLTTask*)obj;
-      iResult=pTask->ProcessTask(eventNo);
+      iResult=pTask->ProcessTask(eventNo, eventtype, trgMask, timestamp);
 //       ProcInfo_t ProcInfo;
 //       gSystem->GetProcInfo(&ProcInfo);
 //       HLTInfo("task %s processed (%d), current memory usage %d %d", pTask->GetName(), iResult, ProcInfo.fMemResident, ProcInfo.fMemVirtual);
@@ -632,10 +600,10 @@ int AliHLTSystem::ProcessTasks(Int_t eventNo)
   }
 
   if (iResult>=0) {
-    HLTImportant("%s%sEvent %d successfully finished (%d)", fName.Data(), fName.IsNull()?"":": ", eventNo, iResult);
+    HLTImportant("Event %d successfully finished (%d)", eventNo, iResult);
     iResult=0;
   } else {
-    HLTError("%s%sProcessing of event %d failed (%d)", fName.Data(), fName.IsNull()?"":": ", eventNo, iResult);
+    HLTError("Processing of event %d failed (%d)", eventNo, iResult);
   }
 
   return iResult;
@@ -646,7 +614,7 @@ int AliHLTSystem::StopTasks()
   // see header file for class documentation
   int iResult=0;
   if ((iResult=SendControlEvent(kAliHLTDataTypeEOR))<0) {
-    HLTError("%s%scan not send EOR event", fName.Data(), fName.IsNull()?"":": ");
+    HLTError("can not send EOR event");
   }
 
   // cleanup blocks from the last event. This is a bit awkward. All output
@@ -679,10 +647,32 @@ int AliHLTSystem::SendControlEvent(AliHLTComponentDataType dt)
   // see header file for class documentation
   int iResult=0;
 
+  AliHLTComponentBlockDataList controlBlocks;
+  AliHLTComponentBlockData bd;
+
+  // run decriptor block of type kAliHLTDataTypeSOR/kAliHLTDataTypeEOR 
+  AliHLTComponent::FillBlockData(bd);
   AliHLTRunDesc runDesc;
   memset(&runDesc, 0, sizeof(AliHLTRunDesc));
   runDesc.fStructSize=sizeof(AliHLTRunDesc);
-  AliHLTControlTask::AliHLTControlEventGuard g(fpControlTask, dt, kAliHLTVoidDataSpec, (AliHLTUInt8_t*)&runDesc, sizeof(AliHLTRunDesc));
+  runDesc.fRunNo=AliHLTMisc::Instance().GetCDBRunNo();
+  bd.fPtr=&runDesc;
+  bd.fSize=sizeof(AliHLTRunDesc);
+  bd.fDataType=dt;
+  bd.fSpecification=kAliHLTVoidDataSpec;
+  controlBlocks.push_back(bd);
+
+  // ECS parameter of type kAliHLTDataTypeECSParam
+  if (fECSParams.IsNull())
+    fECSParams="CTP_TRIGGER_CLASS=00:DUMMY-TRIGGER-ALL:00-01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17";
+  AliHLTComponent::FillBlockData(bd);
+  bd.fPtr=(void*)fECSParams.Data();
+  bd.fSize=fECSParams.Length()+1;
+  bd.fDataType=kAliHLTDataTypeECSParam;
+  bd.fSpecification=kAliHLTVoidDataSpec;
+  controlBlocks.push_back(bd);  
+
+  AliHLTControlTask::AliHLTControlEventGuard g(fpControlTask, controlBlocks);
   HLTDebug("sending event %s, run descriptor %p", AliHLTComponent::DataType2Text(dt).c_str(), &runDesc);
   TObjLink *lnk=fTaskList.FirstLink();
   while (lnk && iResult>=0) {
@@ -693,7 +683,7 @@ int AliHLTSystem::SendControlEvent(AliHLTComponentDataType dt)
       if (dt==kAliHLTDataTypeSOR) eventType=gkAliEventTypeStartOfRun;
       else if (dt==kAliHLTDataTypeEOR) eventType=gkAliEventTypeEndOfRun;
       else HLTWarning("unknown control event %s", AliHLTComponent::DataType2Text(dt).c_str());
-      iResult=pTask->ProcessTask(-1, eventType);
+      iResult=pTask->ProcessTask(-1, eventType, 0, 0);
     } else {
     }
     lnk = lnk->Next();
@@ -711,18 +701,19 @@ int AliHLTSystem::DeinitTasks()
 {
   // see header file for class documentation
   int iResult=0;
-  TObjLink *lnk=fTaskList.FirstLink();
-  while (lnk && iResult>=0) {
+  TObjLink *lnk=fTaskList.LastLink();
+  while (lnk) {
     TObject* obj=lnk->GetObject();
     if (obj) {
       AliHLTTask* pTask=(AliHLTTask*)obj;
-      iResult=pTask->Deinit();
+      int localRes=pTask->Deinit();
+      if (iResult>=0) iResult=localRes;
 //       ProcInfo_t ProcInfo;
 //       gSystem->GetProcInfo(&ProcInfo);
 //       HLTInfo("task %s cleaned (%d), current memory usage %d %d", pTask->GetName(), iResult, ProcInfo.fMemResident, ProcInfo.fMemVirtual);
     } else {
     }
-    lnk = lnk->Next();
+    lnk = lnk->Prev();
   }
   fEventCount=-1;
   fGoodEvents=-1;
@@ -782,6 +773,21 @@ void* AliHLTSystem::AllocMemory( void* /*param*/, unsigned long size )
   return p;
 }
 
+int AliHLTSystem::AllocEventDoneData( void* /*param*/, AliHLTEventID_t /*eventID*/, unsigned long size, AliHLTComponentEventDoneData** edd )
+{
+  // see header file for class documentation
+  unsigned long blocksize=sizeof(AliHLTComponentEventDoneData)+size;
+  void* block=AllocMemory(NULL, blocksize);
+  if (!block) return -ENOMEM;
+  memset(block, 0, blocksize);
+  *edd=reinterpret_cast<AliHLTComponentEventDoneData*>(block);
+  (*edd)->fStructSize=sizeof(AliHLTComponentEventDoneData);
+  (*edd)->fDataSize=size;
+  (*edd)->fData=reinterpret_cast<AliHLTUInt8_t*>(block)+sizeof(AliHLTComponentEventDoneData);
+  
+  return 0;
+}
+
 int AliHLTSystem::Reconstruct(int nofEvents, AliRunLoader* runLoader, 
                              AliRawReader* rawReader)
 {
@@ -799,9 +805,25 @@ int AliHLTSystem::Reconstruct(int nofEvents, AliRunLoader* runLoader,
        }
       } else {
       if ((iResult=AliHLTOfflineInterface::SetParamsToComponents(runLoader, rawReader))>=0) {
+       AliHLTUInt64_t trgMask=0x1;
+       AliHLTUInt32_t timestamp=0;
+       AliHLTUInt32_t eventtype=0;
+       if (runLoader==NULL) {
+         // this is a quick workaround for the case of simulation
+         // the trigger framework is still under development, secondly, AliHLTSimulation
+         // does not yet add the emulated ECS parameters, so no CTP trigger is known in the HLT
+         // AliHLTTask will initialize one dummy CTP trigger class with bit 0, that's why the
+         // default trigger mask is 0x1
+         trgMask=AliHLTMisc::Instance().GetTriggerMask(rawReader);
+
+         // get the timestamp and type of the event from the raw reader
+         // this is currently only meaningfull for reconstruction (runloader==NULL)
+         timestamp=AliHLTMisc::Instance().GetTimeStamp(rawReader);
+         eventtype=AliHLTMisc::Instance().GetEventType(rawReader);
+       }
        // the system always remains started after event processing, a specific
        // call with nofEvents==0 is needed to execute the stop sequence
-       if ((iResult=Run(nofEvents, 0))<0) SetStatusFlags(kError);
+       if ((iResult=Run(nofEvents, 0, trgMask, timestamp, eventtype))<0) SetStatusFlags(kError);
       }
       }
     } else {
@@ -1022,7 +1044,7 @@ int AliHLTSystem::ProcessHLTOUTkChain(AliHLTOUT* pHLTOUT)
     pHandler->ProcessData(pHLTOUT);
     if ((size=pHandler->GetProcessedData(pBuffer))>0) {
       AliHLTModuleAgent::AliHLTOUTHandlerDesc desc=*chainHandler;
-      AliHLTComponentDataType dt=desc;
+      //AliHLTComponentDataType dt=desc;
 
       pHandler->ReleaseProcessedData(pBuffer, size);
     }
@@ -1044,7 +1066,7 @@ int AliHLTSystem::LoadComponentLibraries(const char* libraries)
       TString libs(libraries);
       TObjArray* pTokens=libs.Tokenize(" ");
       if (pTokens) {
-       int iEntries=pTokens->GetEntries();
+       int iEntries=pTokens->GetEntriesFast();
        for (int i=0; i<iEntries && iResult>=0; i++) {
          iResult=fpComponentHandler->LoadLibrary((((TObjString*)pTokens->At(i))->GetString()).Data());
        }
@@ -1113,10 +1135,11 @@ int AliHLTSystem::ScanOptions(const char* options)
   if (options) {
     //AliHLTComponentHandler::TLibraryMode libMode=AliHLTComponentHandler::kDynamic;
     TString libs("");
+    TString excludelibs("");
     TString alloptions(options);
     TObjArray* pTokens=alloptions.Tokenize(" ");
     if (pTokens) {
-      int iEntries=pTokens->GetEntries();
+      int iEntries=pTokens->GetEntriesFast();
       for (int i=0; i<iEntries; i++) {
        TString token=(((TObjString*)pTokens->At(i))->GetString());
        if (token.Contains("loglevel=")) {
@@ -1171,9 +1194,14 @@ int AliHLTSystem::ScanOptions(const char* options)
              HLTWarning("wrong argument for option \'libmode=\', use \'static\' or \'dynamic\'");
            }
          }
+       } else if (token.BeginsWith("ECS=")) {
+         fECSParams=token.ReplaceAll("ECS=", "");
        } else if (token.BeginsWith("lib") && token.EndsWith(".so")) {
          libs+=token;
          libs+=" ";
+       } else if (token.BeginsWith("!lib") && token.EndsWith(".so")) {
+         excludelibs+=token;
+         excludelibs+=" ";
        } else {
          HLTWarning("unknown option \'%s\'", token.Data());
        }
@@ -1184,8 +1212,9 @@ int AliHLTSystem::ScanOptions(const char* options)
     if (iResult>=0) {
       if (libs.IsNull()) {
        const char** deflib=fgkHLTDefaultLibs;
-       while (*deflib) {
-         libs+=*deflib++;
+       for (;*deflib; deflib++) {
+         if (excludelibs.Contains(*deflib)) continue;
+         libs+=*deflib;
          libs+=" ";
        }
       }
@@ -1220,24 +1249,75 @@ int AliHLTSystem::LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runl
     return -EBUSY;
   }
   int iResult=0;
-  AliHLTModuleAgent* pAgent=AliHLTModuleAgent::GetFirstAgent();
+  AliHLTModuleAgent* pAgent=NULL;
+
+  // first check for the required libraries and load those
   TString extralibs;
-  while (pAgent && iResult>=0) {
+  for (pAgent=AliHLTModuleAgent::GetFirstAgent(); 
+       pAgent && iResult>=0;
+       pAgent=AliHLTModuleAgent::GetNextAgent()) {
     const char* deplibs=pAgent->GetRequiredComponentLibraries();
     if (deplibs) {
       HLTDebug("required libraries \'%s\' for agent %s (%p)", deplibs, pAgent->GetName(), pAgent);
+      extralibs+=" ";
       extralibs+=deplibs;
     }
-    if (iResult>=0) {
-      HLTDebug("load configurations for agent %s (%p)", pAgent->GetName(), pAgent);
-      pAgent->CreateConfigurations(fpConfigurationHandler, rawReader, runloader);
-      pAgent=AliHLTModuleAgent::GetNextAgent();
-    }
   }
   if (iResult>=0) {
     iResult=LoadComponentLibraries(extralibs.Data());
   }
 
+  // in order to register the configurations in the correct sequence
+  // all agents need to be ordered with respect to the required
+  // libraries. Ordering relies on the naming convention
+  // libAliHLT<Module>.so
+  TList agents;
+  for (pAgent=AliHLTModuleAgent::GetFirstAgent(); 
+       pAgent && iResult>=0;
+       pAgent=AliHLTModuleAgent::GetNextAgent()) {
+    AliHLTModuleAgent* pPrevDep=NULL;
+    TString dependencies=pAgent->GetRequiredComponentLibraries();
+    TObjArray* pTokens=dependencies.Tokenize(" ");
+    if (pTokens) {
+      for (int n=0; n<pTokens->GetEntriesFast(); n++) {
+       TString module=((TObjString*)pTokens->At(n))->GetString();
+       HLTDebug("  checking %s", module.Data());
+       module.ReplaceAll("libAliHLT", "");
+       module.ReplaceAll(".so", "");
+       
+       for (AliHLTModuleAgent* pCurrent=dynamic_cast<AliHLTModuleAgent*>(pPrevDep==NULL?agents.First():agents.After(pPrevDep));
+            pCurrent!=NULL; pCurrent=dynamic_cast<AliHLTModuleAgent*>(agents.After(pCurrent))) {
+         HLTDebug("    checking %s == %s", module.Data(), pCurrent->GetModuleId());
+
+         if (module.CompareTo(pCurrent->GetModuleId())==0) {
+           pPrevDep=pCurrent;
+           break;
+         }
+       }
+      }
+      delete pTokens;
+    }
+
+    if (pPrevDep) {
+      // insert right after the last dependency
+      agents.AddAfter(pPrevDep, pAgent);
+      HLTDebug("insert %s after %s", pAgent->GetModuleId(), pPrevDep->GetModuleId());
+    } else {
+      // insert at the beginning
+      agents.AddFirst(pAgent);
+      HLTDebug("insert %s at beginning", pAgent->GetModuleId());
+    }
+  }
+
+  // now we load the configurations
+  if (agents.GetEntries()) {
+    TIter next(&agents);
+    while ((pAgent = dynamic_cast<AliHLTModuleAgent*>(next()))) {
+      HLTDebug("load configurations for agent %s (%p)", pAgent->GetName(), pAgent);
+      pAgent->CreateConfigurations(fpConfigurationHandler, rawReader, runloader);
+    }
+  }
+
   return iResult;
 }
 
@@ -1277,7 +1357,7 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader
   // build task list for chains
   TObjArray* pTokens=chains.Tokenize(" ");
   if (pTokens) {
-    int iEntries=pTokens->GetEntries();
+    int iEntries=pTokens->GetEntriesFast();
     for (int i=0; i<iEntries && iResult>=0; i++) {
       const char* pCID=((TObjString*)pTokens->At(i))->GetString().Data();
       AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(pCID);
@@ -1311,6 +1391,19 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader
     if (bHaveOutput) {
       // there are components in the chain which produce data which need to be
       // piped to an HLTOUT
+
+      // add the SchemaEvolutionComponent which analyzes the ROOT objects in
+      // the output stream
+      if (fpComponentHandler->FindComponentIndex("ROOTSchemaEvolutionComponent")>=0 ||
+         fpComponentHandler->LoadLibrary("libAliHLTUtil.so")>=0) {
+       AliHLTConfiguration schemaevo("_schemaevolution_", "ROOTSchemaEvolutionComponent", 
+                                     chains.Data(), "-file=HLT.StreamerInfo.root");
+       iResult=BuildTaskList("_schemaevolution_");
+      } else {
+       HLTWarning("can not load libAliHLTUtil.so and ROOTSchemaEvolutionComponent");
+      }
+
+      // add the HLTOUT component
       if (fpComponentHandler->FindComponentIndex("HLTOUT")>=0 ||
          fpComponentHandler->LoadLibrary("libHLTsim.so")>=0) {
        AliHLTConfiguration globalout("_globalout_", "HLTOUT", chains.Data(), NULL);
@@ -1356,7 +1449,7 @@ int AliHLTSystem::AddHLTOUTTask(const char* hltoutchains)
   TString chains=hltoutchains;
   TObjArray* pTokens=chains.Tokenize(" ");
   if (pTokens) {
-    int iEntries=pTokens->GetEntries();
+    int iEntries=pTokens->GetEntriesFast();
     for (int i=0; i<iEntries && iResult>=0; i++) {
       const char* token=((TObjString*)pTokens->At(i))->GetString().Data();
       AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(token);
@@ -1437,7 +1530,7 @@ int AliHLTSystem::ClearStatusFlags(int flags)
   return fState;
 }
 
-void* AliHLTSystem::FindDynamicSymbol(const char* library, const char* symbol)
+AliHLTfctVoid AliHLTSystem::FindDynamicSymbol(const char* library, const char* symbol)
 {
   // see header file for class documentation
   if (fpComponentHandler==NULL) return NULL;
@@ -1451,3 +1544,21 @@ void AliHLTSystem::SetFrameworkLog(AliHLTComponentLogSeverity level)
   if (fpComponentHandler) fpComponentHandler->SetLocalLoggingLevel(level);
   if (fpConfigurationHandler) fpConfigurationHandler->SetLocalLoggingLevel(level);
 }
+
+int AliHLTSystem::LoggingVarargs(AliHLTComponentLogSeverity severity, 
+                                const char* originClass, const char* originFunc,
+                                const char* file, int line, ... ) const
+{
+  // see header file for function documentation
+  int iResult=0;
+
+  va_list args;
+  va_start(args, line);
+
+  if (!fName.IsNull())
+    AliHLTLogging::SetLogString(this, " (%p)", "%s_pfmt_: ", fName.Data());
+  iResult=SendMessage(severity, originClass, originFunc, file, line, AliHLTLogging::BuildLogString(NULL, args, !fName.IsNull() /*append if non empty*/));
+  va_end(args);
+
+  return iResult;
+}