]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding transparent access to AliDAQ, adding special HLTOUT kRawReader
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Oct 2008 09:29:23 +0000 (09:29 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Oct 2008 09:29:23 +0000 (09:29 +0000)
handler for detectors with less than 32 DDLs. In that case, data block
specification is a bit pattern where every bit describes a DDL.

HLT/BASE/AliHLTDAQ.cxx [new file with mode: 0644]
HLT/BASE/AliHLTDAQ.h [new file with mode: 0644]
HLT/BASE/AliHLTOUTHandlerDetectorDDL.cxx [new file with mode: 0644]
HLT/BASE/AliHLTOUTHandlerDetectorDDL.h [new file with mode: 0644]
HLT/libHLTbase.pkg
HLT/libHLTrec.pkg
HLT/rec/AliHLTDAQInterfaceImplementation.cxx [new file with mode: 0644]
HLT/rec/AliHLTDAQInterfaceImplementation.h [new file with mode: 0644]

diff --git a/HLT/BASE/AliHLTDAQ.cxx b/HLT/BASE/AliHLTDAQ.cxx
new file mode 100644 (file)
index 0000000..ffcc96b
--- /dev/null
@@ -0,0 +1,177 @@
+// $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   AliHLTDAQ.cxx
+    @author Matthias Richter
+    @date   24.10.2008
+    @brief  Virtual Interface to the AliDAQ class.
+*/
+
+#include "AliHLTDAQ.h"
+#include "AliHLTLogging.h"
+#include "TClass.h"
+#include "TSystem.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTDAQ)
+
+AliHLTDAQ::AliHLTDAQ()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTDAQ* AliHLTDAQ::fgpInstance=NULL;
+const char* AliHLTDAQ::fgkImplName="AliHLTDAQInterfaceImplementation";
+const char* AliHLTDAQ::fgkImplLibrary="libHLTrec.so";
+
+AliHLTDAQ::~AliHLTDAQ()
+{
+  // see header file for class documentation
+}
+
+Int_t       AliHLTDAQ::DetectorID(const char *detectorName)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDetectorID(detectorName);
+  return -1;
+}
+
+const char *AliHLTDAQ::DetectorName(Int_t detectorID)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDetectorName(detectorID);
+  return NULL;
+}
+
+Int_t       AliHLTDAQ::DdlIDOffset(const char *detectorName)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlIDOffset(detectorName);
+  return -1;
+}
+
+Int_t       AliHLTDAQ::DdlIDOffset(Int_t detectorID)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlIDOffset(detectorID);
+  return -1;
+}
+
+const char *AliHLTDAQ::DetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDetectorNameFromDdlID(ddlID, ddlIndex);
+  return NULL;
+}
+
+Int_t       AliHLTDAQ::DetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDetectorIDFromDdlID(ddlID, ddlIndex);
+  return -1;
+}
+
+Int_t       AliHLTDAQ::DdlID(const char *detectorName, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlID(detectorName, ddlIndex);
+  return -1;
+}
+
+Int_t       AliHLTDAQ::DdlID(Int_t detectorID, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlID(detectorID, ddlIndex);
+  return -1;
+}
+
+const char *AliHLTDAQ::DdlFileName(const char *detectorName, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlFileName(detectorName, ddlIndex);
+  return NULL;
+}
+
+const char *AliHLTDAQ::DdlFileName(Int_t detectorID, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtDdlFileName(detectorID, ddlIndex);
+  return NULL;
+}
+
+Int_t       AliHLTDAQ::NumberOfDdls(const char *detectorName)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtNumberOfDdls(detectorName);
+  return -1;
+}
+
+Int_t       AliHLTDAQ::NumberOfDdls(Int_t detectorID)
+{
+  // see header file for class documentation
+  if (!fgpInstance) GetInstance();
+  if (fgpInstance) return fgpInstance->VirtNumberOfDdls(detectorID);
+  return -1;
+}
+
+AliHLTDAQ* AliHLTDAQ::GetInstance()
+{
+  // see header file for class documentation
+  int iLibResult=0;
+  if (!fgpInstance) {
+    AliHLTLogging log;
+    TClass* pCl=NULL;
+    ROOT::NewFunc_t pNewFunc=NULL;
+    do {
+      pCl=TClass::GetClass(fgkImplName);
+    } while (!pCl && (iLibResult=gSystem->Load(fgkImplLibrary))==0);
+    if (iLibResult>=0) {
+      if (pCl && (pNewFunc=pCl->GetNew())!=NULL) {
+       void* p=(*pNewFunc)(NULL);
+       if (p) {
+         fgpInstance=reinterpret_cast<AliHLTDAQ*>(p);
+         if (!fgpInstance) {
+           log.Logging(kHLTLogError, "AliHLTDAQ::Instance", "HLT Analysis", "type cast to AliHLTDAQ instance failed");
+         }
+       } else {
+         log.Logging(kHLTLogError, "AliHLTDAQ::Instance", "HLT Analysis", "can not create AliHLTDAQ instance from class descriptor");
+       }
+      } else {
+       log.Logging(kHLTLogError, "AliHLTDAQ::Instance", "HLT Analysis", "can not find AliHLTDAQ class descriptor");
+      }
+    } else {
+      log.Logging(kHLTLogError, "AliHLTDAQ::Instance", "HLT Analysis", "can not load libHLTrec library");
+    }
+  }
+  return fgpInstance;
+}
diff --git a/HLT/BASE/AliHLTDAQ.h b/HLT/BASE/AliHLTDAQ.h
new file mode 100644 (file)
index 0000000..3cf64d4
--- /dev/null
@@ -0,0 +1,75 @@
+//-*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTDAQ_H
+#define ALIHLTDAQ_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   AliHLTDAQ.h
+    @author Matthias Richter
+    @date   24.10.2008
+    @brief  Virtual Interface to the AliDAQ class.
+*/
+
+#include "Rtypes.h"
+
+/**
+ * Virtual interface to the AliDAQ class.
+ * In order to keep the libHLTbase free of AliRoot dependencies, the
+ * implementation has been separated from libHLTbase.
+ * Implementation in libHLTrec.
+ */
+class AliHLTDAQ {
+ public:
+  AliHLTDAQ();
+  virtual ~AliHLTDAQ();
+  static  Int_t       DetectorID(const char *detectorName);
+  static  const char *DetectorName(Int_t detectorID);
+
+  static  Int_t       DdlIDOffset(const char *detectorName);
+  static  Int_t       DdlIDOffset(Int_t detectorID);
+
+  static  const char *DetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex);
+  static  Int_t       DetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex);
+
+  static  Int_t       DdlID(const char *detectorName, Int_t ddlIndex);
+  static  Int_t       DdlID(Int_t detectorID, Int_t ddlIndex);
+  static  const char *DdlFileName(const char *detectorName, Int_t ddlIndex);
+  static  const char *DdlFileName(Int_t detectorID, Int_t ddlIndex);
+
+  static  Int_t       NumberOfDdls(const char *detectorName);
+  static  Int_t       NumberOfDdls(Int_t detectorID);
+
+  static AliHLTDAQ* GetInstance();
+
+ private:
+  virtual  Int_t       VirtDetectorID(const char *detectorName)=0;
+  virtual  const char *VirtDetectorName(Int_t detectorID)=0;
+
+  virtual  Int_t       VirtDdlIDOffset(const char *detectorName)=0;
+  virtual  Int_t       VirtDdlIDOffset(Int_t detectorID)=0;
+
+  virtual  const char *VirtDetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0;
+  virtual  Int_t       VirtDetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0;
+
+  virtual  Int_t       VirtDdlID(const char *detectorName, Int_t ddlIndex)=0;
+  virtual  Int_t       VirtDdlID(Int_t detectorID, Int_t ddlIndex)=0;
+  virtual  const char *VirtDdlFileName(const char *detectorName, Int_t ddlIndex)=0;
+  virtual  const char *VirtDdlFileName(Int_t detectorID, Int_t ddlIndex)=0;
+
+  virtual  Int_t       VirtNumberOfDdls(const char *detectorName)=0;
+  virtual  Int_t       VirtNumberOfDdls(Int_t detectorID)=0;
+
+  /** global instance */
+  static AliHLTDAQ* fgpInstance; //!
+
+  /** the name of the actual implementation */
+  static const char* fgkImplName; //!
+
+  /** the library of the implementation */
+  static const char* fgkImplLibrary; //!
+};
+
+#endif //AliHLTDAQ
diff --git a/HLT/BASE/AliHLTOUTHandlerDetectorDDL.cxx b/HLT/BASE/AliHLTOUTHandlerDetectorDDL.cxx
new file mode 100644 (file)
index 0000000..cb38b9e
--- /dev/null
@@ -0,0 +1,97 @@
+// $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   AliHLTOUTHandlerDetectorDDL.cxx
+    @author Matthias Richter
+    @date   2008-09-09
+    @brief  HLTOUT handler returning equipment id from data type and spec.
+*/
+
+#include "AliHLTOUTHandlerDetectorDDL.h"
+#include "AliHLTOUT.h"
+#include "AliHLTDAQ.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTOUTHandlerDetectorDDL)
+
+AliHLTOUTHandlerDetectorDDL::AliHLTOUTHandlerDetectorDDL(const char* detector, AliHLTComponentDataType dt)
+  :
+  fDDLOffset(-1),
+  fNumberOfDDLs(-1),
+  fDt(dt)
+{ 
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+  
+  fDDLOffset=AliHLTDAQ::DdlIDOffset(detector);
+  fNumberOfDDLs=AliHLTDAQ::NumberOfDdls(detector);
+}
+
+AliHLTOUTHandlerDetectorDDL::~AliHLTOUTHandlerDetectorDDL()
+{
+  // see header file for class documentation
+}
+
+int AliHLTOUTHandlerDetectorDDL::ProcessData(AliHLTOUT* pData)
+{
+  // see header file for class documentation
+  if (!pData) return -EINVAL;
+  if (fDDLOffset<0 || fNumberOfDDLs<0) return -ENODEV;
+
+  static int errorCount=0;
+  const int maxErrorCount=10;
+  AliHLTComponentDataType dt=kAliHLTVoidDataType;
+  AliHLTUInt32_t spec=kAliHLTVoidDataSpec;
+  int iResult=pData->GetDataBlockDescription(dt, spec);
+  if (iResult>=0 && dt!=kAliHLTVoidDataType && spec!=kAliHLTVoidDataSpec) {
+    if (dt==fDt) {
+      int ddlNo=0;
+      for (;ddlNo<32 && ddlNo<fNumberOfDDLs; ddlNo++) {
+       if (spec&(0x1<<ddlNo)) break;
+      }
+      if (ddlNo>=32 || ddlNo>=fNumberOfDDLs) {
+       HLTError("invalid specification 0x%08x: can not extract DDL id for data block %s", spec, AliHLTComponent::DataType2Text(dt).c_str());
+       iResult=-ENODEV;
+      } else if (spec^(0x1<<ddlNo)) {
+       iResult=-EEXIST;
+       HLTError("multiple links set in specification 0x%08x: can not extract DDL id for data block %s", spec, AliHLTComponent::DataType2Text(dt).c_str());
+      } else {
+       iResult=fDDLOffset+ddlNo;
+      }
+    } else {
+      if (errorCount++<10) {
+       HLTError("wrong data type: expecting %s, got %s%s",
+                AliHLTComponent::DataType2Text(fDt).c_str(),
+                AliHLTComponent::DataType2Text(dt).c_str(),
+                errorCount==maxErrorCount?"; suppressing further error messages":"");
+      }
+      iResult=-EBADF;
+    }
+  } else {
+    if (errorCount++<10) {
+      HLTError("can not get a valid data type and specification from HLTOUT: type %s, specification 0x%08x%s",
+              AliHLTComponent::DataType2Text(dt).c_str(), spec,
+              errorCount==maxErrorCount?"; suppressing further error messages":"");
+    }
+    iResult=-ENODATA;
+  }
+  return iResult;
+}
diff --git a/HLT/BASE/AliHLTOUTHandlerDetectorDDL.h b/HLT/BASE/AliHLTOUTHandlerDetectorDDL.h
new file mode 100644 (file)
index 0000000..150ddf9
--- /dev/null
@@ -0,0 +1,73 @@
+//-*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTOUTHANDLERDETECTORDDL_H
+#define ALIHLTOUTHANDLERDETECTORDDL_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   AliHLTOUTHandlerDetectorDDL.h
+    @author Matthias Richter
+    @date   2008-09-09
+    @brief  Default HLTOUT handler returning equipment id from data type and
+            bit pattern in spec.
+*/
+
+#include "AliHLTOUTHandlerEquId.h"
+
+/**
+ * @class AliHLTOUTHandlerDetectorDDL
+ * A default handler class for DDL raw data redirection handlers.
+ *
+ * This class implements an AliHLTOUTHandlerEquId which extracts the
+ * equipment Id from the bit pattern in the specification. All detectors
+ * with up to 32 DDL links follow this convention. The bit no in the
+ * data specification word corresponds to the DDL number within the
+ * sub-detector.
+ *
+ * DDL offsets for sub-detectors can be fetched by means of AliDAQ.
+ * The class must be initialized with the detector identification and the
+ * data type it should be used for. 
+ * @note The detector identification is according to AliDAQ. E.g. for ITS
+ * and MUON there are ITSSPD, ITSSDD, ITSSSD, and MUONTRK and MUONTRG
+ * respectively.
+ *
+ * @ingroup alihlt_aliroot_reconstruction
+ */
+class AliHLTOUTHandlerDetectorDDL : public AliHLTOUTHandlerEquId {
+ public:
+  /** constructor 
+   * the class is initialized with the detector identification and the
+   * data type it should be used for. Note: the detector identification
+   * is according to AliDAQ. E.g. for ITS and MUON there are ITSSPD,
+   * ITSSDD, ITSSSD, and MUONTRK and MUONTRG respectively.
+   */
+  AliHLTOUTHandlerDetectorDDL(const char* detector, AliHLTComponentDataType dt);
+  /** standard destructor */
+  virtual ~AliHLTOUTHandlerDetectorDDL();
+
+  /**
+   * Process a data block.
+   * Derives the eqipment ID from the DDL offset of the detector and
+   * the DDL no within the detector which corresponds to a bit in the
+   * data specification. Only one bit is allowed to be set.
+   * @return equipment id the block should be used for.
+   */
+  virtual int ProcessData(AliHLTOUT* pData);
+
+ private:
+  /** standard constructor prohibited */
+  AliHLTOUTHandlerDetectorDDL();
+  /** copy constructor prohibited */
+  AliHLTOUTHandlerDetectorDDL(const AliHLTOUTHandlerDetectorDDL&);
+  /** assignment operator prohibited */
+  AliHLTOUTHandlerDetectorDDL& operator=(const AliHLTOUTHandlerDetectorDDL&);
+
+  int fDDLOffset; //!transient
+  int fNumberOfDDLs; //!transient
+  AliHLTComponentDataType fDt; //!transient
+
+  ClassDef(AliHLTOUTHandlerDetectorDDL, 0)
+};
+#endif
index 62250ad2e63e0a0def16096174a1d582d3ac45b5..6e3281b66394ef5332caa796985e5851ca36d20f 100644 (file)
@@ -29,11 +29,13 @@ CLASS_HDRS:=        AliHLTComponent.h \
                AliHLTHOMERBlockDesc.h \
                AliHLTHOMERSourceDesc.h \
                AliHLTEsdManager.h \
+               AliHLTDAQ.h \
                AliHLTOUT.h \
                AliHLTOUTHomerBuffer.h \
                AliHLTOUTTask.h \
                AliHLTOUTHandler.h \
                AliHLTOUTHandlerEquId.h \
+               AliHLTOUTHandlerDetectorDDL.h \
                AliHLTOUTHandlerChain.h \
                AliHLTMemoryFile.h \
                AliHLTMessage.h \
index 88bbde4710ce2f7cdea0e774a4dd85f9c01b47df..9a3d74fece29135c172f6a5a5da0611b7638eaea 100644 (file)
@@ -7,6 +7,7 @@ CLASS_HDRS:=    AliHLTReconstructor.h \
                AliRawReaderHLT.h \
                AliHLTOUTHomerCollection.h \
                AliHLTEsdManagerImplementation.h \
+               AliHLTDAQInterfaceImplementation.h \
                AliHLTOUTDigitReader.h \
                AliHLTOUTRawReader.h
 
diff --git a/HLT/rec/AliHLTDAQInterfaceImplementation.cxx b/HLT/rec/AliHLTDAQInterfaceImplementation.cxx
new file mode 100644 (file)
index 0000000..3267033
--- /dev/null
@@ -0,0 +1,116 @@
+// $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   AliHLTDAQInterfaceImplementation.cxx
+    @author Matthias Richter
+    @date   
+    @brief  Interface to the AliDAQ class
+*/
+
+#include "AliHLTDAQInterfaceImplementation.h"
+#include "AliDAQ.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTDAQInterfaceImplementation)
+
+AliHLTDAQInterfaceImplementation::AliHLTDAQInterfaceImplementation()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTDAQInterfaceImplementation::~AliHLTDAQInterfaceImplementation()
+{
+}
+  // see header file for class documentation
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDetectorID(const char *detectorName)
+{
+  // see header file for class documentation
+  return AliDAQ::DetectorID(detectorName);
+}
+
+const char *AliHLTDAQInterfaceImplementation::VirtDetectorName(Int_t detectorID)
+{
+  // see header file for class documentation
+  return AliDAQ::DetectorName(detectorID);
+}
+
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDdlIDOffset(const char *detectorName)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlIDOffset(detectorName);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDdlIDOffset(Int_t detectorID)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlIDOffset(detectorID);
+}
+
+const char *AliHLTDAQInterfaceImplementation::VirtDetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DetectorNameFromDdlID(ddlID, ddlIndex);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DetectorIDFromDdlID(ddlID, ddlIndex);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDdlID(const char *detectorName, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlID(detectorName, ddlIndex);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtDdlID(Int_t detectorID, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlID(detectorID, ddlIndex);
+}
+
+const char *AliHLTDAQInterfaceImplementation::VirtDdlFileName(const char *detectorName, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlFileName(detectorName, ddlIndex);
+}
+
+const char *AliHLTDAQInterfaceImplementation::VirtDdlFileName(Int_t detectorID, Int_t ddlIndex)
+{
+  // see header file for class documentation
+  return AliDAQ::DdlFileName(detectorID, ddlIndex);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtNumberOfDdls(const char *detectorName)
+{
+  // see header file for class documentation
+  return AliDAQ::NumberOfDdls(detectorName);
+}
+
+Int_t       AliHLTDAQInterfaceImplementation::VirtNumberOfDdls(Int_t detectorID)
+{
+  // see header file for class documentation
+  return AliDAQ::NumberOfDdls(detectorID);
+}
diff --git a/HLT/rec/AliHLTDAQInterfaceImplementation.h b/HLT/rec/AliHLTDAQInterfaceImplementation.h
new file mode 100644 (file)
index 0000000..7dfce00
--- /dev/null
@@ -0,0 +1,65 @@
+//-*- Mode: C++ -*-
+// $Id$
+
+#ifndef ALIHLTDAQINTERFACEIMPLEMENTATION_H
+#define ALIHLTDAQINTERFACEIMPLEMENTATION_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   AliHLTDAQInterfaceImplementation.h
+    @author Matthias Richter
+    @date   
+    @brief  Implementation of the AliHLTDAQInterfaceImplementation
+*/
+
+#include "AliHLTDAQ.h"
+
+/**
+ * @class AliHLTDAQInterfaceImplementation
+ * Implementation of the AliHLTDAQVirtualInterface
+ *
+ * For the sake of library (in)dependencies, AliDAQ can not be used directly in
+ * libHLTbase as this would  introduce dependencies to AliRoot libraries.
+ * The AliHLTDAQVirtualInterface provides a virtual interface to AliDAQ with
+ * the implementation in libHLTrec.so.
+ * See AliHLTDAQVirtualInterface for usage.
+ *
+ * @ingroup alihlt_aliroot_reconstruction
+ */
+class AliHLTDAQInterfaceImplementation : public AliHLTDAQ {
+ public:
+  /** constructor */
+  AliHLTDAQInterfaceImplementation();
+  /** destructor */
+  virtual ~AliHLTDAQInterfaceImplementation();
+
+  Int_t       VirtDetectorID(const char *detectorName);
+  const char *VirtDetectorName(Int_t detectorID);
+
+  Int_t       VirtDdlIDOffset(const char *detectorName);
+  Int_t       VirtDdlIDOffset(Int_t detectorID);
+
+  const char *VirtDetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex);
+  Int_t       VirtDetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex);
+
+  Int_t       VirtDdlID(const char *detectorName, Int_t ddlIndex);
+  Int_t       VirtDdlID(Int_t detectorID, Int_t ddlIndex);
+  const char *VirtDdlFileName(const char *detectorName, Int_t ddlIndex);
+  const char *VirtDdlFileName(Int_t detectorID, Int_t ddlIndex);
+
+  Int_t       VirtNumberOfDdls(const char *detectorName);
+  Int_t       VirtNumberOfDdls(Int_t detectorID);
+
+ protected:
+
+ private:
+  /** copy constructor prohibited */
+  AliHLTDAQInterfaceImplementation(const AliHLTDAQInterfaceImplementation&);
+  /** assignment operator prohibited */
+  AliHLTDAQInterfaceImplementation& operator=(const AliHLTDAQInterfaceImplementation&);
+
+  ClassDef(AliHLTDAQInterfaceImplementation, 0)
+};
+
+#endif