// @(#) $Id$
/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
* *
- * Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
- * for The ALICE Off-line Project. *
+ * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+ * for The ALICE HLT Project. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
*/
#include "AliHLTModuleAgent.h"
+#include "AliHLTOUTHandler.h"
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTModuleAgent)
AliHLTModuleAgent::AliHLTModuleAgent()
+ :
+ fpNext(NULL),
+ fpComponentHandler(NULL)
{
// see header file for class documentation
// or
Register(this);
}
-AliHLTModuleAgent::AliHLTModuleAgent(const AliHLTModuleAgent&)
- :
- TObject(),
- AliHLTLogging()
-{
- // see header file for function documentation
-}
-
-AliHLTModuleAgent& AliHLTModuleAgent::operator=(const AliHLTModuleAgent&)
-{
- // see header file for function documentation
- return *this;
-}
-
AliHLTModuleAgent::~AliHLTModuleAgent()
{
// see header file for function documentation
}
}
-int AliHLTModuleAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
- AliRunLoader* runloader) const
+int AliHLTModuleAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
+ AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// default method, nothing to be done, child classes can overload
- if (handler==NULL && runloader==NULL) {
- // get rid of 'unused parameter' warning
- }
return 0;
}
-const char* AliHLTModuleAgent::GetLocalRecConfigurations(AliRunLoader* runloader) const
+const char* AliHLTModuleAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// default method, nothing to be done, child classes can overload
- if (runloader==NULL) {
- // get rid of 'unused parameter' warning
- }
return NULL;
}
-const char* AliHLTModuleAgent::GetEventRecConfigurations(AliRunLoader* runloader) const
+const char* AliHLTModuleAgent::GetRequiredComponentLibraries() const
{
// default method, nothing to be done, child classes can overload
- if (runloader==NULL) {
- // get rid of 'unused parameter' warning
- }
return NULL;
}
-const char* AliHLTModuleAgent::GetRequiredComponentLibraries() const
+int AliHLTModuleAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
+ AliHLTUInt32_t /*spec*/,
+ AliHLTOUTHandlerDesc* /*pDesc*/) const
+{
+ // default method, nothing to be done, child classes can overload
+ return 0;
+}
+
+AliHLTOUTHandler* AliHLTModuleAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
+ AliHLTUInt32_t /*spec*/)
{
// default method, nothing to be done, child classes can overload
return NULL;
}
-int AliHLTModuleAgent::RegisterComponents(AliRunLoader* runloader) const
+int AliHLTModuleAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
+{
+ // default method, simply deletes object
+ if (pInstance) return -EINVAL;
+ delete pInstance;
+ return 0;
+}
+
+
+// likely to be moved to AliHLTOUTHandler
+// AliRawStream* AliHLTModuleAgent::GetRawStream(AliHLTComponentDataType /*dt*/,
+// AliHLTUInt32_t /*spec*/,
+// const AliHLTOUT* /*pData*/) const
+// {
+// // default method, nothing to be done, child classes can overload
+// return NULL;
+// }
+
+int AliHLTModuleAgent::ActivateComponentHandler(AliHLTComponentHandler* pHandler)
{
- if (runloader==NULL) {
- // get rid of 'unused parameter' warning
+ int iResult=0;
+ if (pHandler==NULL) {
+ if (fpComponentHandler!=NULL) {
+ // reset and think about deregistration
+ fpComponentHandler=NULL;
+ HLTWarning("deregistration of components not yet implemented");
+ }
+ return 0;
+ }
+ if (fpComponentHandler!=NULL) {
+ if (pHandler!=fpComponentHandler) {
+ HLTError("only one component handler can be activated per agent");
+ return -EINVAL;
+ }
+ return 0;
}
+ if ((iResult=RegisterComponents(pHandler))>=0) {
+ fpComponentHandler=pHandler;
+ }
+ return iResult;
+}
+
+int AliHLTModuleAgent::RegisterComponents(AliHLTComponentHandler* /*pHandler*/) const
+{
// default method, nothing to be done, child classes can overload
return 0;
}
+AliHLTModulePreprocessor* AliHLTModuleAgent::GetPreprocessor()
+{
+ // default method, nothing to be done, child classes can overload
+ return NULL;
+}
+
AliHLTModuleAgent* AliHLTModuleAgent::fAnchor=NULL;
AliHLTModuleAgent* AliHLTModuleAgent::fCurrent=NULL;
int AliHLTModuleAgent::fCount=0;