// TODO: we have to think about the optional environment parameter,
// currently just set to NULL.
iResult=pCH->CreateComponent(fpConfiguration->GetComponentID(), NULL, argc, argv, fpComponent);
- if (fpComponent || iResult<=0) {
+ if (fpComponent && iResult>=0) {
//HLTDebug("component %s (%p) created", fpComponent->GetComponentID(), fpComponent);
} else {
//HLTError("can not find component \"%s\" (%d)", fpConfiguration->GetComponentID(), iResult);
HLTError("configuration object instance needed for task initialization");
iResult=-EINVAL;
}
+ if (iResult>=0) {
+ iResult=CustomInit(pCH);
+ }
return iResult;
}
{
// see header file for function documentation
int iResult=0;
+ CustomCleanup();
AliHLTComponent* pComponent=GetComponent();
fpComponent=NULL;
if (pComponent) {
HLTMessage(" task \"%s\" not initialized", GetName());
}
}
+
+int AliHLTTask::CustomInit(AliHLTComponentHandler* /*pCH*/)
+{
+ // default implementation nothing to do
+ return 0;
+}
+
+int AliHLTTask::CustomCleanup()
+{
+ // default implementation nothing to do
+ return 0;
+}