]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added RawReader for HLT data
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jan 2008 09:31:00 +0000 (09:31 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jan 2008 09:31:00 +0000 (09:31 +0000)
HLT/libHLTrec.pkg
HLT/rec/AliRawReaderHLT.cxx [new file with mode: 0644]
HLT/rec/AliRawReaderHLT.h [new file with mode: 0644]

index c4803b07e5c32d8e3ca5744879518550a2273988..7bef44a5ee5ac4616ea7d5a86607f4f137ff0cd7 100644 (file)
@@ -6,6 +6,7 @@ include $(MODDIR)/hlt.conf
 LIBHLTREC_VERSION := 0
 
 CLASS_HDRS:=   AliHLTReconstructor.h \
+               AliRawReaderHLT.h \
                AliHLTOUTRawReader.h
 
 MODULE_SRCS:=  AliHLTDynamicAliLog.cxx \
diff --git a/HLT/rec/AliRawReaderHLT.cxx b/HLT/rec/AliRawReaderHLT.cxx
new file mode 100644 (file)
index 0000000..0e677fe
--- /dev/null
@@ -0,0 +1,210 @@
+// $Id: AliRawReaderHLT.cxx,v 1.3 2007/11/15 18:12:44 szostak Exp $
+
+/**************************************************************************
+ * 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   AliRawReaderHLT.cxx
+    @author Matthias Richter
+    @date   
+    @brief  AliRawReader implementation which replaces original input of
+            detectors with the appropriate HLT output.                    */
+
+// 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 "AliRawReaderHLT.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliRawReaderHLT)
+
+AliRawReaderHLT::AliRawReaderHLT(AliRawReader* pRawreader, const char* options)
+  :
+  AliRawReader(),
+  fpParentReader(pRawreader),
+  fOptions()
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+  fOptions=options;
+}
+
+AliRawReaderHLT::~AliRawReaderHLT()
+{
+  // see header file for class documentation
+}
+
+UInt_t AliRawReaderHLT::GetType() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetType();
+}
+
+UInt_t AliRawReaderHLT::GetRunNumber() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetRunNumber();
+}
+
+const UInt_t* AliRawReaderHLT::GetEventId() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEventId();
+}
+
+const UInt_t* AliRawReaderHLT::GetTriggerPattern() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetTriggerPattern();
+}
+
+const UInt_t* AliRawReaderHLT::GetDetectorPattern() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetDetectorPattern();
+}
+
+const UInt_t* AliRawReaderHLT::GetAttributes() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetAttributes();
+}
+
+const UInt_t* AliRawReaderHLT::GetSubEventAttributes() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetSubEventAttributes();
+}
+
+UInt_t AliRawReaderHLT::GetLDCId() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetLDCId();
+}
+
+UInt_t AliRawReaderHLT::GetGDCId() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetGDCId();
+}
+
+UInt_t AliRawReaderHLT::GetTimestamp() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetTimestamp();
+}
+
+const UInt_t* AliRawReaderHLT::GetEquipmentAttributes() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentAttributes();
+}
+
+Int_t    AliRawReaderHLT::GetEquipmentElementSize() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentElementSize();
+}
+
+Int_t    AliRawReaderHLT::GetEquipmentHeaderSize() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentHeaderSize();
+}
+
+Int_t    AliRawReaderHLT::GetEquipmentSize() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentSize();
+}
+
+Int_t    AliRawReaderHLT::GetEquipmentType() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentType();
+}
+
+Int_t    AliRawReaderHLT::GetEquipmentId() const
+{
+  // see header file for class documentation
+  return fpParentReader->GetEquipmentId();
+}
+
+Bool_t   AliRawReaderHLT::ReadHeader()
+{
+  // see header file for class documentation
+  return fpParentReader->ReadHeader();
+}
+
+Bool_t   AliRawReaderHLT::ReadNextData(UChar_t*& data)
+{
+  // see header file for class documentation
+  return fpParentReader->ReadNextData(data);
+}
+
+Bool_t   AliRawReaderHLT::ReadNextInt(UInt_t& data)
+{
+  // see header file for class documentation
+  return fpParentReader->ReadNextInt(data);
+}
+
+Bool_t   AliRawReaderHLT::ReadNextShort(UShort_t& data)
+{
+  // see header file for class documentation
+  return fpParentReader->ReadNextShort(data);
+
+}
+
+Bool_t   AliRawReaderHLT::ReadNextChar(UChar_t& data)
+{
+  // see header file for class documentation
+  return fpParentReader->ReadNextChar(data);
+}
+
+Bool_t   AliRawReaderHLT::ReadNext(UChar_t* data, Int_t size)
+{
+  // see header file for class documentation
+  return fpParentReader->ReadNext(data, size);
+}
+
+Bool_t   AliRawReaderHLT::Reset()
+{
+  // see header file for class documentation
+  return fpParentReader->Reset();
+}
+
+Bool_t   AliRawReaderHLT::NextEvent()
+{
+  // see header file for class documentation
+  fpParentReader-NextEvent();
+}
+
+Bool_t   AliRawReaderHLT::RewindEvents()
+{
+  // see header file for class documentation
+  return fpParentReader->RewindEvents();
+}
+
+AliRawReader* AliRawReaderHLTCreateInstance(AliRawReader* pParentReader, const char* options)
+{
+  // see header file for class documentation
+  return new AliRawReaderHLT(pParentReader, options);
+}
diff --git a/HLT/rec/AliRawReaderHLT.h b/HLT/rec/AliRawReaderHLT.h
new file mode 100644 (file)
index 0000000..044cd27
--- /dev/null
@@ -0,0 +1,102 @@
+//-*- Mode: C++ -*-
+// @(#) $Id: AliRawReaderHLT.h,v 1.1 2007/10/29 19:01:06 richterm Exp $
+
+#ifndef ALIRAWREADERHLT_H
+#define ALIRAWREADERHLT_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   AliRawReaderHLT.h
+    @author Matthias Richter
+    @date   
+    @brief  AliRawReader implementation which replaces original input of
+            detectors with the appropriate HLT output.                    */
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "AliRawReader.h"
+#include "TString.h"
+
+/**
+ * @class AliRawReaderHLT
+ * Handler of HLTOUT data for AliRawReader input.
+ */
+class AliRawReaderHLT : public AliRawReader {
+ public:
+  /** constructor */
+  AliRawReaderHLT(AliRawReader* pParentReader, const char* options=NULL);
+  /** destructor */
+  virtual ~AliRawReaderHLT();
+
+  // interface methods of AliRawReader
+  UInt_t   GetType() const;
+  UInt_t   GetRunNumber() const;
+  const UInt_t* GetEventId() const;
+  const UInt_t* GetTriggerPattern() const;
+  const UInt_t* GetDetectorPattern() const;
+  const UInt_t* GetAttributes() const;
+  const UInt_t* GetSubEventAttributes() const;
+  UInt_t   GetLDCId() const;
+  UInt_t   GetGDCId() const;
+  UInt_t   GetTimestamp() const;
+
+  const UInt_t* GetEquipmentAttributes() const;
+  Int_t    GetEquipmentElementSize() const;
+  Int_t    GetEquipmentHeaderSize() const;
+
+  Int_t    GetEquipmentSize() const;
+  Int_t    GetEquipmentType() const;
+  Int_t    GetEquipmentId() const;
+  Bool_t   ReadHeader();
+  Bool_t   ReadNextData(UChar_t*& data);
+  Bool_t   ReadNextInt(UInt_t& data);
+  Bool_t   ReadNextShort(UShort_t& data);
+  Bool_t   ReadNextChar(UChar_t& data);
+  Bool_t   ReadNext(UChar_t* data, Int_t size);
+
+  Bool_t   Reset();
+
+  Bool_t   NextEvent();
+  Bool_t   RewindEvents();
+
+ protected:
+
+ private:
+  /** standard constructor prohibited */
+  AliRawReaderHLT();
+  /** copy constructor prohibited */
+  AliRawReaderHLT(const AliRawReaderHLT&);
+  /** assignment operator prohibited */
+  AliRawReaderHLT& operator=(const AliRawReaderHLT&);
+
+  /** the rawreader */
+  AliRawReader* fpParentReader; //!transient
+
+  /** options */
+  TString fOptions; //!transient
+  
+  ClassDef(AliRawReaderHLT, 0)
+};
+
+#define ALIHLTREC_LIBRARY                   "libHLTrec.so"
+#define ALIHLTREC_LIBRARY_VERSION           0
+#define ALIRAWREADERHLT_CREATE_INSTANCE     "AliRawReaderHLTCreateInstance"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  typedef AliRawReader* (*AliRawReaderHLTCreateInstance_t)(AliRawReader* pParentReader, const char* options);
+
+  /**
+   * Create an instance of the AliRawReader class
+   */
+  AliRawReader* AliRawReaderHLTCreateInstance(AliRawReader* pParentReader, const char* options);
+#ifdef __cplusplus
+}
+#endif
+#endif