]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLT_C_Component_WrapperInterface.cxx
corrected CDB and run number initialization for usage from external interface, AliHLT...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLT_C_Component_WrapperInterface.cxx
index 4101f4a004f88c51d222c5770d1fe1d4fdbe1194..ce4657a090e0a76be8a877debc8e527fdffbdc57 100644 (file)
@@ -34,7 +34,6 @@ using namespace std;
 
 static AliHLTComponentHandler *gComponentHandler_C = NULL;
 
-
 int AliHLT_C_Component_InitSystem( AliHLTComponentEnvironment* comenv )
 {
   if ( gComponentHandler_C )
@@ -107,6 +106,17 @@ void AliHLT_C_DestroyComponent( AliHLTComponentHandle handle )
   delete pComp;
 }
 
+int AliHLT_C_SetRunDescription(const AliHLTRunDesc* desc, const char* runType)
+{
+  if (!desc) return -EINVAL;
+  if (desc->fStructSize<sizeof(AliHLTUInt32_t)) return -EINVAL;
+  if (!gComponentHandler_C) return ENXIO;
+
+  AliHLTRunDesc internalDesc=kAliHLTVoidRunDesc;
+  memcpy(&internalDesc, desc, desc->fStructSize<sizeof(internalDesc)?desc->fStructSize:sizeof(internalDesc));
+  return gComponentHandler_C->SetRunDescription(&internalDesc, runType);
+}
+
 int AliHLT_C_ProcessEvent( AliHLTComponentHandle handle, const AliHLTComponentEventData* evtData, const AliHLTComponentBlockData* blocks, 
                            AliHLTComponentTriggerData* trigData, AliHLTUInt8_t* outputPtr,
                            AliHLTUInt32_t* size, AliHLTUInt32_t* outputBlockCnt,