Register(this);
}
+const char* AliHLTModuleAgent::GetQAPlugins() const
+{
+ // default implementation, childs can overload
+ return "";
+}
+
const AliHLTModuleAgent::AliHLTOUTHandlerDesc AliHLTModuleAgent::fgkVoidHandlerDesc;
AliHLTModuleAgent::~AliHLTModuleAgent()
return fgCurrent;
}
+string AliHLTModuleAgent::GetAgentIds()
+{
+ // see header file for function documentation
+ string ids;
+ ids.clear();
+ for (AliHLTModuleAgent* pCurrent=fgAnchor;
+ pCurrent;
+ pCurrent=pCurrent->fpNext) {
+ if (ids.size()>0) ids+=" ";
+ ids+=pCurrent->GetModuleId();
+ }
+
+ return ids;
+}
+
int AliHLTModuleAgent::Register(AliHLTModuleAgent* pAgent)
{
// see header file for function documentation
AliHLTLogging log;
if (!pAgent) return -EINVAL;
+ // The following check is for extra protection. In some strange cases the agent might
+ // try to register itself more than once. So we need to check for that and prevent it.
+ // Otherwise we create a cycle in our linked list and go into an infinite loop.
+ AliHLTModuleAgent* current=fgAnchor;
+ while (current!=NULL) {
+ if (current == pAgent) return 0;
+ current = current->fpNext;
+ }
if (fgAnchor==NULL) {
fgAnchor=pAgent;
} else {