]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
a sample component library
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2005 09:34:03 +0000 (09:34 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2005 09:34:03 +0000 (09:34 +0000)
HLT/SampleLib/AliHLTSampleComponent1.cxx [new file with mode: 0644]
HLT/SampleLib/AliHLTSampleComponent1.h [new file with mode: 0644]
HLT/SampleLib/AliHLTSampleComponent2.cxx [new file with mode: 0644]
HLT/SampleLib/AliHLTSampleComponent2.h [new file with mode: 0644]
HLT/SampleLib/AliHLTSampleLinkDef.h [new file with mode: 0644]
HLT/SampleLib/Makefile [new file with mode: 0644]

diff --git a/HLT/SampleLib/AliHLTSampleComponent1.cxx b/HLT/SampleLib/AliHLTSampleComponent1.cxx
new file mode 100644 (file)
index 0000000..0dc6765
--- /dev/null
@@ -0,0 +1,63 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Matthias Richter <Matthias.Richter@ift.uib.no>                *
+ *          Timm Steinbeck <timm@kip.uni-heidelberg.de>                   *
+ *          for The ALICE Off-line 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.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// a sample processing component for the HLT                                 //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#if __GNUC__== 3
+using namespace std;
+#endif
+
+#include "AliL3StandardIncludes.h"
+#include "AliHLTSampleComponent1.h"
+
+// this is a global object used for automatic component registration, do not use this
+AliHLTSampleComponent1 gAliHLTSampleComponent1;
+
+ClassImp(AliHLTSampleComponent1)
+
+const AliHLTComponent_DataType AliHLTSampleComponent1::inputDataTypes[]={{0,0}, {0,0}}; //'zero' terminated array
+const AliHLTComponent_DataType AliHLTSampleComponent1::outputDataType={0,0};
+
+AliHLTSampleComponent1::AliHLTSampleComponent1()
+{
+}
+
+AliHLTSampleComponent1::~AliHLTSampleComponent1()
+{
+}
+
+int AliHLTSampleComponent1::DoInit( int argc, const char** argv ){
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component1, DoInit");
+  return 0;
+}
+
+int AliHLTSampleComponent1::DoDeinit(){
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component1, DoDeinit");
+  return 0;
+}
+
+int AliHLTSampleComponent1::DoEvent( AliHLTComponent_EventData evtData, AliHLTComponent_BlockData* blocks, 
+                                     AliHLTComponent_TriggerData trigData, AliHLTUInt8_t* outputPtr, 
+                                     AliHLTUInt32_t* size, vector<AliHLTComponent_BlockData>& outputBlocks ) {
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component1, DoEvent");
+  return 0;
+}
diff --git a/HLT/SampleLib/AliHLTSampleComponent1.h b/HLT/SampleLib/AliHLTSampleComponent1.h
new file mode 100644 (file)
index 0000000..e55c935
--- /dev/null
@@ -0,0 +1,45 @@
+// @(#) $Id$
+
+#ifndef ALIHLTSAMPLECOMPONENT1_H
+#define ALIHLTSAMPLECOMPONENT1_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* AliHLTSampleComponent1
+ */
+
+#include "AliHLTProcessor.h"
+
+class AliHLTSampleComponent1 : public AliHLTProcessor {
+public:
+  AliHLTSampleComponent1();
+  virtual ~AliHLTSampleComponent1();
+
+  const char* GetComponentID() { return "Sample-component1";}
+  void GetInputDataTypes( vector<AliHLTComponent_DataType>& list) {
+    const AliHLTComponent_DataType* pType=inputDataTypes;
+    while (pType->fID!=0) {
+      list.push_back(*pType);
+      pType++;
+    }
+  }
+  AliHLTComponent_DataType GetOutputDataType() {return outputDataType;}
+
+  // Spawn function, return new class instance
+  AliHLTComponent* Spawn() {return new AliHLTSampleComponent1;};
+
+ protected:
+  
+  int DoInit( int argc, const char** argv );
+  int DoDeinit();
+  int DoEvent( AliHLTComponent_EventData evtData, AliHLTComponent_BlockData* blocks, 
+                      AliHLTComponent_TriggerData trigData, AliHLTUInt8_t* outputPtr, 
+                      AliHLTUInt32_t* size, vector<AliHLTComponent_BlockData>& outputBlocks );
+
+private:
+  static const AliHLTComponent_DataType inputDataTypes[];
+  static const AliHLTComponent_DataType outputDataType;
+
+  ClassDef(AliHLTSampleComponent1, 0)
+};
+#endif
diff --git a/HLT/SampleLib/AliHLTSampleComponent2.cxx b/HLT/SampleLib/AliHLTSampleComponent2.cxx
new file mode 100644 (file)
index 0000000..8e07c40
--- /dev/null
@@ -0,0 +1,63 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Matthias Richter <Matthias.Richter@ift.uib.no>                *
+ *          Timm Steinbeck <timm@kip.uni-heidelberg.de>                   *
+ *          for The ALICE Off-line 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.                  *
+ **************************************************************************/
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// a sample processing component for the HLT                                 //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#if __GNUC__== 3
+using namespace std;
+#endif
+
+#include "AliL3StandardIncludes.h"
+#include "AliHLTSampleComponent2.h"
+
+// this is a global object used for automatic component registration, do not use this
+AliHLTSampleComponent2 gAliHLTSampleComponent2;
+
+ClassImp(AliHLTSampleComponent2)
+
+const AliHLTComponent_DataType AliHLTSampleComponent2::inputDataTypes[]={{0,0}, {0,0}}; //'zero' terminated array
+const AliHLTComponent_DataType AliHLTSampleComponent2::outputDataType={0,0};
+
+AliHLTSampleComponent2::AliHLTSampleComponent2()
+{
+}
+
+AliHLTSampleComponent2::~AliHLTSampleComponent2()
+{
+}
+
+int AliHLTSampleComponent2::DoInit( int argc, const char** argv ){
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component2, DoInit");
+  return 0;
+}
+
+int AliHLTSampleComponent2::DoDeinit(){
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component2, DoDeinit");
+  return 0;
+}
+
+int AliHLTSampleComponent2::DoEvent( AliHLTComponent_EventData evtData, AliHLTComponent_BlockData* blocks, 
+                                     AliHLTComponent_TriggerData trigData, AliHLTUInt8_t* outputPtr, 
+                                     AliHLTUInt32_t* size, vector<AliHLTComponent_BlockData>& outputBlocks ) {
+  Logging(kHLTLogInfo, "HLT", "Sample", "Sample component2, DoEvent");
+  return 0;
+}
diff --git a/HLT/SampleLib/AliHLTSampleComponent2.h b/HLT/SampleLib/AliHLTSampleComponent2.h
new file mode 100644 (file)
index 0000000..ef5e612
--- /dev/null
@@ -0,0 +1,45 @@
+// @(#) $Id$
+
+#ifndef ALIHLTSAMPLECOMPONENT2_H
+#define ALIHLTSAMPLECOMPONENT2_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* AliHLTSampleComponent2
+ */
+
+#include "AliHLTProcessor.h"
+
+class AliHLTSampleComponent2 : public AliHLTProcessor {
+public:
+  AliHLTSampleComponent2();
+  virtual ~AliHLTSampleComponent2();
+
+  const char* GetComponentID() { return "Sample-component2";}
+  void GetInputDataTypes( vector<AliHLTComponent_DataType>& list) {
+    const AliHLTComponent_DataType* pType=inputDataTypes;
+    while (pType->fID!=0) {
+      list.push_back(*pType);
+      pType++;
+    }
+  }
+  AliHLTComponent_DataType GetOutputDataType() {return outputDataType;}
+
+  // Spawn function, return new class instance
+  AliHLTComponent* Spawn() {return new AliHLTSampleComponent2;};
+
+ protected:
+  
+  int DoInit( int argc, const char** argv );
+  int DoDeinit();
+  int DoEvent( AliHLTComponent_EventData evtData, AliHLTComponent_BlockData* blocks, 
+                      AliHLTComponent_TriggerData trigData, AliHLTUInt8_t* outputPtr, 
+                      AliHLTUInt32_t* size, vector<AliHLTComponent_BlockData>& outputBlocks );
+
+private:
+  static const AliHLTComponent_DataType inputDataTypes[];
+  static const AliHLTComponent_DataType outputDataType;
+
+  ClassDef(AliHLTSampleComponent2, 0)
+};
+#endif
diff --git a/HLT/SampleLib/AliHLTSampleLinkDef.h b/HLT/SampleLib/AliHLTSampleLinkDef.h
new file mode 100644 (file)
index 0000000..0f623bf
--- /dev/null
@@ -0,0 +1,13 @@
+// @(#) $Id$
+
+#ifdef __CINT__
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliHLTSampleComponent1;
+#pragma link C++ class AliHLTSampleComponent2;
+
+#endif
+
diff --git a/HLT/SampleLib/Makefile b/HLT/SampleLib/Makefile
new file mode 100644 (file)
index 0000000..162983b
--- /dev/null
@@ -0,0 +1,21 @@
+#$Id$
+##########################################
+# Makefile for AliRoot HLT Sample        #
+#                                        #
+# Author: Matthias Richter,              #                     
+##########################################
+
+MODNAME = AliHLTSample
+
+ifndef ALIHLT_TOPDIR
+ALIHLT_TOPDIR = $(shell pwd)/..
+endif
+
+include $(ALIHLT_TOPDIR)/Makefile.conf
+
+SRCS   = AliHLTSampleComponent1.cxx AliHLTSampleComponent2.cxx 
+
+SRCS += $(EXTRA_SRCS)
+
+
+include $(ALIHLT_TOPDIR)/Makefile.rules