initialization of CDB in wrapper interface;added treatment of reconfiguration event
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLT_C_Component_WrapperInterface.cxx
index f53f65a4e241a3d3b62d1ea51fd10eb7c29d1ec8..e4329d96659bcdba214ff22cafaa387ba9f040b8 100644 (file)
@@ -90,6 +90,11 @@ int AliHLT_C_CreateComponent( const char* componentType, void* environ_param, in
   if ( !handle ) return EINVAL;
   AliHLTComponent* comp;
   int ret = gComponentHandler_C->CreateComponent( componentType, environ_param, argc, argv, comp );
+  if (comp) {
+    const char* cdbPath = getenv("ALIHLT_HCDBDIR");
+    if (!cdbPath) cdbPath = getenv("ALICE_ROOT");
+    if (cdbPath) comp->InitCDB(cdbPath);
+  }
   *handle = reinterpret_cast<AliHLTComponentHandle>( comp );
 
   return ret;