//#include <Riostream.h>
#include <TSystem.h>
#endif //HAVE_DLFCN_H
-#include "AliHLTStdIncludes.h"
+//#include "AliHLTStdIncludes.h"
#include "AliHLTComponentHandler.h"
#include "AliHLTComponent.h"
#include "AliHLTDataTypes.h"
-#include "AliHLTSystem.h"
+//#include "AliHLTSystem.h"
+#include "TString.h"
// the standard components
// #include "AliHLTFilePublisher.h"
AddStandardComponents();
}
+AliHLTComponentHandler::AliHLTComponentHandler(const AliHLTComponentHandler&)
+ :
+ fComponentList(),
+ fScheduleList(),
+ fLibraryList(),
+ fEnvironment(),
+ fStandardList()
+{
+ // see header file for class documentation
+ HLTFatal("copy constructor untested");
+}
+
+AliHLTComponentHandler& AliHLTComponentHandler::operator=(const AliHLTComponentHandler&)
+{
+ // see header file for class documentation
+ HLTFatal("assignment operator untested");
+ return *this;
+}
+
AliHLTComponentHandler::~AliHLTComponentHandler()
{
// see header file for class documentation
int AliHLTComponentHandler::DeregisterComponent( const char* componentID )
{
// see header file for class documentation
+
int iResult=0;
if (componentID) {
+ HLTWarning("not yet implemented, please notify the developers if you need this function");
} else {
iResult=-EINVAL;
}
const char* loadtype="";
#ifdef HAVE_DLFCN_H
// use interface to the dynamic linking loader
- hLib.handle=dlopen(libraryPath, RTLD_NOW);
+ hLib.fHandle=dlopen(libraryPath, RTLD_NOW);
loadtype="dlopen";
#else
// use ROOT dynamic loader
// 'failure' if the library was already loaded
AliHLTLibHandle* pLib=FindLibrary(libraryPath);
if (pLib) {
- int* pRootHandle=reinterpret_cast<int*>(pLib->handle);
+ int* pRootHandle=reinterpret_cast<int*>(pLib->fHandle);
(*pRootHandle)++;
HLTDebug("instance %d of library %s loaded", (*pRootHandle), libraryPath);
- hLib.handle=pRootHandle;
+ hLib.fHandle=pRootHandle;
}
- if (hLib.handle==NULL && gSystem->Load(libraryPath)==0) {
+ if (hLib.fHandle==NULL && gSystem->Load(libraryPath)==0) {
int* pRootHandle=new int;
if (pRootHandle) *pRootHandle=1;
- hLib.handle=pRootHandle;
+ hLib.fHandle=pRootHandle;
//HLTDebug("library %s loaded via gSystem", libraryPath);
}
loadtype="gSystem";
#endif //HAVE_DLFCN_H
- if (hLib.handle!=NULL) {
+ if (hLib.fHandle!=NULL) {
// create TString object to store library path and use pointer as handle
- hLib.name=new TString(libraryPath);
+ hLib.fName=new TString(libraryPath);
HLTInfo("library %s loaded (%s)", libraryPath, loadtype);
fLibraryList.insert(fLibraryList.begin(), hLib);
iResult=RegisterScheduledComponents();
if (libraryPath) {
vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
while (element!=fLibraryList.end()) {
- TString* pName=reinterpret_cast<TString*>((*element).name);
+ TString* pName=reinterpret_cast<TString*>((*element).fName);
if (pName->CompareTo(libraryPath)==0) {
UnloadLibrary(*element);
fLibraryList.erase(element);
// see header file for class documentation
int iResult=0;
fgAliLoggingFunc=NULL;
- TString* pName=reinterpret_cast<TString*>(handle.name);
+ TString* pName=reinterpret_cast<TString*>(handle.fName);
#ifdef HAVE_DLFCN_H
- dlclose(handle.handle);
+ dlclose(handle.fHandle);
#else
- int* pCount=reinterpret_cast<int*>(handle.handle);
+ int* pCount=reinterpret_cast<int*>(handle.fHandle);
if (--(*pCount)==0) {
if (pName) {
/** Matthias 26.04.2007
delete pCount;
}
#endif //HAVE_DLFCN_H
- handle.name=NULL;
- handle.handle=NULL;
+ handle.fName=NULL;
+ handle.fHandle=NULL;
if (pName) {
HLTDebug("unload library %s", pName->Data());
delete pName;
if (hLib==NULL) return NULL;
void* pFunc=NULL;
#ifdef HAVE_DLFCN_H
- pFunc=dlsym(hLib->handle, symbol);
+ pFunc=dlsym(hLib->fHandle, symbol);
#else
- TString* name=reinterpret_cast<TString*>(hLib->name);
+ TString* name=reinterpret_cast<TString*>(hLib->fName);
pFunc=gSystem->DynFindSymbol(name->Data(), symbol);
#endif
return pFunc;
AliHLTLibHandle* hLib=NULL;
vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
while (element!=fLibraryList.end()) {
- TString* name=reinterpret_cast<TString*>((*element).name);
+ TString* name=reinterpret_cast<TString*>((*element).fName);
if (name->CompareTo(library)==0) {
hLib=&(*element);
break;
int iResult=0;
vector<AliHLTComponent*>::iterator element=fStandardList.begin();
while (element!=fStandardList.end()) {
- DeregisterComponent((*element)->GetComponentID());
+ //DeregisterComponent((*element)->GetComponentID());
delete(*element);
fStandardList.erase(element);
element=fStandardList.begin();