added agent for libAliHLTTrigger with HLTOUT handlers for HLTRDLST and HLTTRGDT blocks
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Sep 2008 04:27:26 +0000 (04:27 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Sep 2008 04:27:26 +0000 (04:27 +0000)
HLT/libAliHLTTrigger.pkg
HLT/trigger/AliHLTTriggerAgent.cxx [new file with mode: 0644]
HLT/trigger/AliHLTTriggerAgent.h [new file with mode: 0644]

index a5153e3..baa35c6 100644 (file)
@@ -10,6 +10,7 @@
 # will be created from the names of the header files
 CLASS_HDRS:= \
                 AliHLTTrigger.h                             \
+                AliHLTTriggerAgent.h                        \
                 AliHLTEventSummary.h                        \
                 AliHLTEventSummaryProducerComponent.h       \
                 AliHLTRunSummary.h                          \
diff --git a/HLT/trigger/AliHLTTriggerAgent.cxx b/HLT/trigger/AliHLTTriggerAgent.cxx
new file mode 100644 (file)
index 0000000..1b9fa4a
--- /dev/null
@@ -0,0 +1,99 @@
+// $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   AliHLTTriggerAgent.cxx
+    @author Matthias Richter
+    @date   
+    @brief  Agent of the libAliHLTTrigger library
+*/
+
+#include <cassert>
+#include "AliHLTTriggerAgent.h"
+
+// header files of library components
+#include "AliHLTEventSummaryProducerComponent.h"
+#include "AliHLTRunSummaryProducerComponent.h"
+
+/** global instance for agent registration */
+AliHLTTriggerAgent gAliHLTTriggerAgent;
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTTriggerAgent)
+
+AliHLTTriggerAgent::AliHLTTriggerAgent()
+  :
+  AliHLTModuleAgent("Trigger")
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTTriggerAgent::~AliHLTTriggerAgent()
+{
+  // see header file for class documentation
+}
+
+int AliHLTTriggerAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
+{
+  // see header file for class documentation
+  assert(pHandler);
+  if (!pHandler) return -EINVAL;
+  //pHandler->AddComponent(new );
+  return 0;
+}
+
+int AliHLTTriggerAgent::GetHandlerDescription(AliHLTComponentDataType dt,
+                                          AliHLTUInt32_t /*spec*/,
+                                         AliHLTOUTHandlerDesc& desc) const
+{
+  // see header file for class documentation
+
+  // handler for the HLT readou list and trigger data data blocks {'HLTRDLST':'HLT '}
+  if (dt==AliHLTComponentDataTypeInitializer("HLTRDLST", kAliHLTDataOriginOut) ||
+      dt==AliHLTComponentDataTypeInitializer("HLTTRGDT", kAliHLTDataOriginOut)) {
+      desc=AliHLTOUTHandlerDesc(kProprietary, dt, GetModuleId());
+      return 1;
+  }
+
+  return 0;
+}
+
+AliHLTOUTHandler* AliHLTTriggerAgent::GetOutputHandler(AliHLTComponentDataType dt,
+                                                  AliHLTUInt32_t /*spec*/)
+{
+  // see header file for class documentation
+
+  // handler for the HLT readou list and trigger data data blocks {'HLTRDLST':'HLT '}
+  if (dt==AliHLTComponentDataTypeInitializer("HLTRDLST", kAliHLTDataOriginOut) ||
+      dt==AliHLTComponentDataTypeInitializer("HLTTRGDT", kAliHLTDataOriginOut)) {
+    return NULL;
+  }
+
+  return NULL;
+}
+
+int AliHLTTriggerAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
+{
+  // see header file for class documentation
+  if (pInstance==NULL) return -EINVAL;
+
+  return 0;
+}
diff --git a/HLT/trigger/AliHLTTriggerAgent.h b/HLT/trigger/AliHLTTriggerAgent.h
new file mode 100644 (file)
index 0000000..2d69f7a
--- /dev/null
@@ -0,0 +1,56 @@
+// $Id$
+
+#ifndef ALIHLTTRIGGERAGENT_H
+#define ALIHLTTRIGGERAGENT_H
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               */
+
+/** @file   AliHLTTriggerAgent.h
+    @author Matthias Richter
+    @date   
+    @brief  Agent of the libAliHLTTrigger library
+*/
+
+#include "AliHLTModuleAgent.h"
+
+class AliHLTOUTHandler;
+
+/**
+ * @class AliHLTTriggerAgent
+ * This is the agent for the AliHLTTrigger library.
+ *
+ * @ingroup alihlt_system
+ */
+class AliHLTTriggerAgent : public AliHLTModuleAgent {
+ public:
+  /**
+   * standard constructor. The agent is automatically registered in the
+   * global agent manager
+   */
+  AliHLTTriggerAgent();
+  /** destructor */
+  virtual ~AliHLTTriggerAgent();
+
+  int RegisterComponents(AliHLTComponentHandler* pHandler) const;
+
+  int GetHandlerDescription(AliHLTComponentDataType dt,
+                           AliHLTUInt32_t spec,
+                           AliHLTOUTHandlerDesc& desc) const;
+
+  AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, AliHLTUInt32_t spec);
+
+  int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
+
+ protected:
+
+ private:
+  /** copy constructor prohibited */
+  AliHLTTriggerAgent(const AliHLTTriggerAgent&);
+  /** assignment operator prohibited */
+  AliHLTTriggerAgent& operator=(const AliHLTTriggerAgent&);
+
+  ClassDef(AliHLTTriggerAgent, 0);
+};
+
+#endif