endif
SUBDIRS = BASE \
+ sim \
+ rec \
$(SAMPLE_DIR) \
$(TPC_DIR) \
$(PHOS_DIR) \
EXTRA_DIST = libHLTbase.pkg \
libHLTinterface.pkg \
+ libHLTsim.pkg \
+ libHLTrec.pkg \
+ libAliHLTHOMER.pkg \
libAliHLTUtil.pkg \
libAliHLTSample.pkg \
libAliHLTPHOS.pkg \
BASE/HOMER/Makefile
BASE/util/Makefile
BASE/interface/Makefile
+ sim/Makefile
+ rec/Makefile
SampleLib/Makefile
TPCLib/Makefile
TPCLib/mapping2array.cxx
--- /dev/null
+#-*- Mode: Makefile -*-
+# $Id$
+
+include $(MODDIR)/hlt.conf
+
+LIBHLTREC_VERSION := 0
+
+MODULE_SRCS:= AliHLTReconstructor.cxx
+
+CLASS_HDRS:= $(MODULE_SRCS:.cxx=.h)
+
+MODULE_HDRS:= $(CLASS_HDRS)
+
+MODULE_DHDR:=
+
+SRCS:=$(patsubst %,rec/%,$(MODULE_SRCS))
+CINTHDRS:=$(patsubst %,rec/%,$(CLASS_HDRS))
+HDRS:=$(patsubst %,rec/%,$(MODULE_HDRS))
+DHDR:=$(patsubst %,rec/%,$(MODULE_DHDR))
+CINTAUTOLINK:= $(shell test "x$(MODULE_DHDR)" = "x" && echo 1)
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS} -DLIBHLTREC_VERSION=$(LIBHLTREC_VERSION)
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
+EINCLUDE := HLT/rec HLT/BASE STEER
--- /dev/null
+#-*- Mode: Makefile -*-
+# $Id$
+
+include $(MODDIR)/hlt.conf
+
+LIBHLTSIM_VERSION := 0
+
+MODULE_SRCS= AliHLTSimulation.cxx
+
+CLASS_HDRS:= $(MODULE_SRCS:.cxx=.h)
+
+MODULE_HDRS:= $(CLASS_HDRS)
+
+MODULE_DHDR:=
+
+SRCS:=$(patsubst %,sim/%,$(MODULE_SRCS))
+CINTHDRS:=$(patsubst %,sim/%,$(CLASS_HDRS))
+HDRS:=$(patsubst %,sim/%,$(MODULE_HDRS))
+DHDR:=$(patsubst %,sim/%,$(MODULE_DHDR))
+CINTAUTOLINK:= $(shell test "x$(MODULE_DHDR)" = "x" && echo 1)
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS} -DLIBHLTSIM_VERSION=$(LIBHLTSIM_VERSION)
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
+EINCLUDE := HLT/sim HLT/BASE STEER
--- /dev/null
+// $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 AliHLTSimulation.cxx
+ @author Matthias Richter
+ @date
+ @brief Binding class for HLT simulation in AliRoot. */
+
+#include <cassert>
+#include <cerrno>
+#include "AliHLTSimulation.h"
+#include "AliLog.h"
+#include "AliRunLoader.h"
+#include "AliHLTSystem.h"
+
+#if ALIHLTSIMULATION_LIBRARY_VERSION != LIBHLTSIM_VERSION
+#error library version in header file and lib*.pkg do not match
+#endif
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTSimulation);
+
+AliHLTSimulation::AliHLTSimulation()
+ :
+ fOptions(),
+ fpSystem(NULL)
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTSimulation::~AliHLTSimulation()
+{
+ // see header file for function documentation
+ if (fpSystem) {
+ delete fpSystem;
+ }
+ fpSystem=NULL;
+}
+
+AliHLTSimulation* AliHLTSimulation::CreateInstance()
+{
+ // see header file for function documentation
+ return new AliHLTSimulation;
+}
+
+int AliHLTSimulation::DeleteInstance(AliHLTSimulation* pSim)
+{
+ // see header file for function documentation
+ assert(pSim!=NULL);
+ delete pSim;
+ return 0;
+}
+
+int AliHLTSimulation::Init(AliRunLoader* pRunLoader, const char* options)
+{
+ // init the simulation
+ fOptions=options;
+
+ if (!fpSystem) fpSystem=new AliHLTSystem;
+ if (!fpSystem) {
+ AliError("can not create AliHLTSystem object");
+ return -ENOMEM;
+ }
+ if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
+ AliError("HLT system in error state");
+ return -EFAULT;
+ }
+
+ if (fpSystem->ScanOptions(options)<0) {
+ AliError("error setting options for HLT system");
+ return -EINVAL;
+ }
+
+ if (!fpSystem->CheckStatus(AliHLTSystem::kReady)) {
+ if ((fpSystem->Configure(pRunLoader))<0) {
+ AliError("error during HLT system configuration");
+ return -EFAULT;
+ }
+ }
+
+ return 0;
+}
+
+
+int AliHLTSimulation::Run(AliRunLoader* pRunLoader)
+{
+ // HLT reconstruction for simulated data
+ if(!pRunLoader) {
+ AliError("Missing RunLoader! 0x0");
+ return -EINVAL;
+ }
+
+ Int_t nEvents = pRunLoader->GetNumberOfEvents();
+ int iResult=0;
+
+ if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
+ AliError("HLT system in error state");
+ return -EFAULT;
+ }
+ if ((iResult=fpSystem->Reconstruct(nEvents, pRunLoader, NULL))>=0) {
+ }
+ return iResult;
+}
+
+
+AliHLTSimulation* AliHLTSimulationCreateInstance()
+{
+ // see header file for function documentation
+ return AliHLTSimulation::CreateInstance();
+}
+
+int AliHLTSimulationDeleteInstance(AliHLTSimulation* pSim)
+{
+ // see header file for function documentation
+ return AliHLTSimulation::DeleteInstance(pSim);
+}
+
+int AliHLTSimulationInit(AliHLTSimulation* pSim, AliRunLoader* pRunLoader, const char* options)
+{
+ assert(pSim!=NULL);
+ if (pSim) {
+ return pSim->Init(pRunLoader, options);
+ }
+ return -ENODEV;
+}
+
+int AliHLTSimulationRun(AliHLTSimulation* pSim, AliRunLoader* pRunLoader)
+{
+ assert(pSim!=NULL);
+ if (pSim) {
+ return pSim->Run(pRunLoader);
+ }
+ return -ENODEV;
+}
+
+int AliHLTSimulationGetLibraryVersion()
+{
+ // see header file for function documentation
+ return LIBHLTSIM_VERSION;
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// @(#) $Id$
+
+#ifndef ALIHLTSIMULATION_H
+#define ALIHLTSIMULATION_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 AliHLTSimulation.h
+ @author Matthias Richter
+ @date
+ @brief Binding class for HLT simulation in AliRoot
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ */
+/**
+ * @defgroup alihlt_simulation HLT simulation in AliRoot
+ * This section describes the the simulation of the HLT in AliRoot.
+ */
+
+#include "TObject.h"
+#include "TString.h"
+class AliRunLoader;
+class AliHLTSystem;
+
+/**
+ * @class AliHLTSimulation
+ * Base class of HLT data processing simulations.
+ */
+class AliHLTSimulation : public TObject {
+ public:
+ /** create an instance of the class */
+ static AliHLTSimulation* CreateInstance();
+
+ /** delete an instance */
+ static int DeleteInstance(AliHLTSimulation* pSim);
+
+ /** init simulation */
+ int Init(AliRunLoader* pRunLoader, const char* options);
+
+ /** run simulation with an instance of the run loader */
+ int Run(AliRunLoader* pRunLoader);
+
+ private:
+ /** standard constructor */
+ AliHLTSimulation();
+ /** copy constructor prohibited */
+ AliHLTSimulation(const AliHLTSimulation&);
+ /** assignment operator prohibited */
+ AliHLTSimulation& operator=(const AliHLTSimulation&);
+ /** standard destructor */
+ ~AliHLTSimulation();
+
+ /* current options */
+ TString fOptions; //!transient
+
+ /* HLT steering object */
+ AliHLTSystem* fpSystem; //!transient
+
+ ClassDef(AliHLTSimulation, 0)
+};
+
+#define ALIHLTSIMULATION_LIBRARY "libHLTsim.so"
+#define ALIHLTSIMULATION_LIBRARY_VERSION 0
+#define ALIHLTSIMULATION_CREATE_INSTANCE "AliHLTSimulationCreateInstance"
+#define ALIHLTSIMULATION_DELETE_INSTANCE "AliHLTSimulationDeleteInstance"
+#define ALIHLTSIMULATION_INIT "AliHLTSimulationInit"
+#define ALIHLTSIMULATION_RUN "AliHLTSimulationRun"
+#define ALIHLTSIMULATION_GET_LIBRARY_VERSION "AliHLTSimulationGetLibraryVersion"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ typedef AliHLTSimulation* (*AliHLTSimulationCreateInstance_t)();
+ typedef int (*AliHLTSimulationDeleteInstance_t)(AliHLTSimulation* pSim);
+ typedef int (*AliHLTSimulationInit_t)(AliHLTSimulation* pSim, AliRunLoader* pRunLoader, const char* options);
+ typedef int (*AliHLTSimulationRun_t)(AliHLTSimulation* pSim, AliRunLoader* pRunLoader);
+ typedef int (*AliHLTSimulationGetLibraryVersion_t)();
+
+ /**
+ * Create an instance of the AliHLTSimulation class
+ */
+ AliHLTSimulation* AliHLTSimulationCreateInstance();
+ /**
+ * Delete an instance of the AliHLTSimulation class
+ */
+ int AliHLTSimulationDeleteInstance(AliHLTSimulation* pSim);
+ /**
+ * Set options for an instance
+ */
+ int AliHLTSimulationInit(AliHLTSimulation* pSim, AliRunLoader* pRunLoader, const char* options);
+ /**
+ * Run simulation for an instance and run loader
+ */
+ int AliHLTSimulationRun(AliHLTSimulation* pSim, AliRunLoader* pRunLoader);
+ /**
+ * Get version no of the library/class interface
+ */
+ int AliHLTSimulationGetLibraryVersion();
+#ifdef __cplusplus
+}
+#endif
+
+#endif