]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added agent for AliHLTComp library
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Oct 2007 07:21:56 +0000 (07:21 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Oct 2007 07:21:56 +0000 (07:21 +0000)
HLT/comp/AliHLTCompAgent.cxx [new file with mode: 0644]
HLT/comp/AliHLTCompAgent.h [new file with mode: 0644]
HLT/libAliHLTComp.pkg

diff --git a/HLT/comp/AliHLTCompAgent.cxx b/HLT/comp/AliHLTCompAgent.cxx
new file mode 100644 (file)
index 0000000..2fc7a91
--- /dev/null
@@ -0,0 +1,87 @@
+// @(#) $Id$
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * 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   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/** @file   AliHLTCompAgent.cxx
+    @author Matthias Richter
+    @date   
+    @brief  Agent of the libHLTsim library
+*/
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include <cassert>
+#include <cerrno>
+#include "AliHLTCompAgent.h"
+#include "AliHLTConfiguration.h"
+
+// header files of library components
+// ....
+
+/** global instance for agent registration */
+AliHLTCompAgent gAliHLTCompAgent;
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTCompAgent)
+
+AliHLTCompAgent::AliHLTCompAgent()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTCompAgent::~AliHLTCompAgent()
+{
+  // see header file for class documentation
+}
+
+int AliHLTCompAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
+                                         AliRawReader* /*rawReader*/,
+                                         AliRunLoader* /*runloader*/) const
+{
+  // see header file for class documentation
+  return 0;
+}
+
+const char* AliHLTCompAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+                                                    AliRunLoader* /*runloader*/) const
+{
+  // see header file for class documentation
+  return NULL;
+}
+
+const char* AliHLTCompAgent::GetRequiredComponentLibraries() const
+{
+  // see header file for class documentation
+  return NULL;
+}
+
+int AliHLTCompAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
+{
+  // see header file for class documentation
+  assert(pHandler);
+  if (!pHandler) return -EINVAL;
+  //pHandler->AddComponent(new ...);
+  return 0;
+}
diff --git a/HLT/comp/AliHLTCompAgent.h b/HLT/comp/AliHLTCompAgent.h
new file mode 100644 (file)
index 0000000..31ee336
--- /dev/null
@@ -0,0 +1,81 @@
+// @(#) $Id$
+
+#ifndef ALIHLTCOMPAGENT_H
+#define ALIHLTCOMPAGENT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/** @file   AliHLTCompAgent.h
+    @author Matthias Richter
+    @date   
+    @brief  Agent of the libAliHLTComp library
+*/
+
+// see class description below
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "AliHLTModuleAgent.h"
+
+/**
+ * @class AliHLTCompAgent
+ * This is the agent for the AliHLTComp library.
+ *
+ * @ingroup alihlt_system
+ */
+class AliHLTCompAgent : public AliHLTModuleAgent {
+ public:
+  /**
+   * standard constructor. The agent is automatically registered in the
+   * global agent manager
+   */
+  AliHLTCompAgent();
+  /** destructor */
+  virtual ~AliHLTCompAgent();
+
+  /**
+   * Register all configurations belonging to this module with the
+   * AliHLTConfigurationHandler. The agent can adapt the configurations
+   * to be registered to the current AliRoot setup by checking the
+   * runloader.
+   * @param handler   [in] the configuration handler
+   * @param rawReader [in] AliRoot RawReader instance 
+   * @param runloader [in] AliRoot runloader
+   * @return neg. error code if failed
+   */
+  int CreateConfigurations(AliHLTConfigurationHandler* handler,
+                          AliRawReader* rawReader=NULL,
+                          AliRunLoader* runloader=NULL) const;
+
+  /**
+   * Get the top configurations belonging to this module.
+   * A top configuration describes a processing chain. It can simply be
+   * described by the last configuration(s) in the chain. 
+   * The agent can adapt the configurations to be registered to the current
+   * AliRoot setup by checking the runloader.
+   * @param rawReader [in] AliRoot RawReader instance 
+   * @param runloader [in] AliRoot runloader
+   * @return string containing the top configurations separated by blanks
+   */
+  const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+                                     AliRunLoader* runloader=NULL) const;
+  /**
+   * Component libraries which the configurations of this agent depend on.
+   * @return list of component libraries as a blank-separated string.
+   */
+  const char* GetRequiredComponentLibraries() const;
+
+  /**
+   * Register components for the AliHLTSim library.
+   * @param pHandler  [in] instance of the component handler          
+   */
+  int RegisterComponents(AliHLTComponentHandler* pHandler) const;
+ protected:
+
+ private:
+  ClassDef(AliHLTCompAgent, 0);
+};
+
+#endif
index 7e0d3ba32ecfb22c075a7ad93868830a7026637a..77bec0caa5382a6de5cd55907bec84b2cb8c8276 100644 (file)
@@ -3,7 +3,7 @@
 
 include $(MODDIR)/hlt.conf
 
 
 include $(MODDIR)/hlt.conf
 
-CLASS_HDRS:=   
+CLASS_HDRS:=   AliHLTCompAgent.h
 
 MODULE_SRCS:=  $(CLASS_HDRS:.h=.cxx)
 
 
 MODULE_SRCS:=  $(CLASS_HDRS:.h=.cxx)