//* provided "as is" without express or implied warranty. *
//**************************************************************************
-/** @file AliHLT_C_Component_WrapperInterface.cxx
- @author Matthias Richter, Timm Steinbeck
- @date
- @brief Pure C interface to the AliRoot HLT component handler
-*/
-
-#if __GNUC__>= 3
-using namespace std;
-#endif
+// @file AliHLT_C_Component_WrapperInterface.cxx
+// @author Matthias Richter, Timm Steinbeck
+// @date
+// @brief Old C interface to the AliRoot HLT component handler
+// @note This interface is deprecated, the new interface is defined
+// in HLT/BASE/AliHLTExternalInterface
#include "AliHLT_C_Component_WrapperInterface.h"
#include "AliHLTComponentHandler.h"
#include "AliHLTComponent.h"
+#include "AliHLTMisc.h"
#include <errno.h>
+using namespace std;
+
static AliHLTComponentHandler *gComponentHandler_C = NULL;
static AliHLTRunDesc gRunDesc=kAliHLTVoidRunDesc;
static char* gRunType=NULL;
int AliHLT_C_Component_InitSystem( AliHLTComponentEnvironment* comenv )
{
+ // init the HLT system
if ( gComponentHandler_C )
{
return EINPROGRESS;
int AliHLT_C_Component_DeinitSystem()
{
+ // De-init the HLT system and clean-up internal memory
if ( gComponentHandler_C )
{
delete gComponentHandler_C;
int AliHLT_C_Component_LoadLibrary( const char* libraryPath )
{
+ // load a component library
if ( !gComponentHandler_C )
return ENXIO;
return gComponentHandler_C->LoadLibrary( libraryPath );
int AliHLT_C_Component_UnloadLibrary( const char* /*libraryPath*/ )
{
+ // unload a component library
if ( !gComponentHandler_C )
return ENXIO;
// Matthias 26.10.2007
int AliHLT_C_CreateComponent( const char* componentType, void* environParam, int argc, const char** argv, AliHLTComponentHandle* handle )
{
+ // create a component
if ( !gComponentHandler_C )
return ENXIO;
if ( !handle ) return EINVAL;
if (!cdbPath) cdbPath = getenv("ALICE_ROOT");
int ret = gComponentHandler_C->CreateComponent( componentType, comp);
if (ret>=0 && comp) {
- comp->InitCDB(cdbPath, gComponentHandler_C);
+ AliHLTMisc::Instance().InitCDB(cdbPath);
+ AliHLTMisc::Instance().SetCDBRunNo(gRunDesc.fRunNo);
comp->SetRunDescription(&gRunDesc, gRunType);
const AliHLTAnalysisEnvironment* comenv=gComponentHandler_C->GetEnvironment();
ret=comp->Init(comenv, environParam, argc, argv);
void AliHLT_C_DestroyComponent( AliHLTComponentHandle handle )
{
+ // destroy a component
if ( !handle )
return;
int AliHLT_C_SetRunDescription(const AliHLTRunDesc* desc, const char* runType)
{
+ // set run description
if (!desc) return -EINVAL;
if (desc->fStructSize<sizeof(AliHLTUInt32_t)) return -EINVAL;
if (!gComponentHandler_C) return ENXIO;
AliHLTComponentBlockData** outputBlocks,
AliHLTComponentEventDoneData** edd )
{
+ // process one event
if ( !handle )
return ENXIO;
AliHLTComponent* comp = reinterpret_cast<AliHLTComponent*>( handle );
int AliHLT_C_GetOutputDataType( AliHLTComponentHandle handle, AliHLTComponentDataType* dataType )
{
+ // get output data type of a component
if ( !handle )
return ENXIO;
AliHLTComponent* comp = reinterpret_cast<AliHLTComponent*>( handle );
int AliHLT_C_GetOutputSize( AliHLTComponentHandle handle, unsigned long* constBase, double* inputMultiplier )
{
+ // get output data size of a component
if ( !handle )
return ENXIO;
AliHLTComponent* comp = reinterpret_cast<AliHLTComponent*>( handle );