]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/rec/AliRawReaderHLT.h
bugfix: get correct data header of parent reader
[u/mrichter/AliRoot.git] / HLT / rec / AliRawReaderHLT.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTReconstructor.cxx 21363 2007-10-12 13:24:47Z richterm $
3
4 #ifndef ALIRAWREADERHLT_H
5 #define ALIRAWREADERHLT_H
6 //* This file is property of and copyright by the ALICE HLT Project        * 
7 //* ALICE Experiment at CERN, All rights reserved.                         *
8 //* See cxx source for full Copyright notice                               *
9
10 /** @file   AliRawReaderHLT.h
11     @author Matthias Richter
12     @date   
13     @brief  AliRawReader implementation which replaces original input of
14             detectors with the appropriate HLT output.                    */
15
16 // see below for class documentation
17 // or
18 // refer to README to build package
19 // or
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
21
22 #include "AliRawReader.h"
23 #include "TString.h"
24
25 /**
26  * @class AliRawReaderHLT
27  * Handler of HLTOUT data for AliRawReader input.
28  */
29 class AliRawReaderHLT : public AliRawReader {
30  public:
31   /** constructor */
32   AliRawReaderHLT(AliRawReader* pParentReader, const char* options=NULL);
33   /** destructor */
34   virtual ~AliRawReaderHLT();
35
36   // interface methods of AliRawReader
37   void     Select(Int_t detectorID, 
38                   Int_t minDDLID = -1, Int_t maxDDLID = -1);
39 //   void     Select(const char *detectorName, 
40 //                Int_t minDDLID = -1, Int_t maxDDLID = -1);
41   void     SelectEquipment(Int_t equipmentType, 
42                            Int_t minEquipmentId = -1, 
43                            Int_t maxEquipmentId = -1);
44   void     SkipInvalid(Bool_t skip = kTRUE);
45   void     SelectEvents(Int_t type);
46
47   UInt_t   GetType() const;
48   UInt_t   GetRunNumber() const;
49   const UInt_t* GetEventId() const;
50   const UInt_t* GetTriggerPattern() const;
51   const UInt_t* GetDetectorPattern() const;
52   const UInt_t* GetAttributes() const;
53   const UInt_t* GetSubEventAttributes() const;
54   UInt_t   GetLDCId() const;
55   UInt_t   GetGDCId() const;
56   UInt_t   GetTimestamp() const;
57
58   const UInt_t* GetEquipmentAttributes() const;
59   Int_t    GetEquipmentElementSize() const;
60   Int_t    GetEquipmentHeaderSize() const;
61
62   Int_t    GetEquipmentSize() const;
63   Int_t    GetEquipmentType() const;
64   Int_t    GetEquipmentId() const;
65   Bool_t   ReadHeader();
66   Bool_t   ReadNextData(UChar_t*& data);
67   Bool_t   ReadNextInt(UInt_t& data);
68   Bool_t   ReadNextShort(UShort_t& data);
69   Bool_t   ReadNextChar(UChar_t& data);
70   Bool_t   ReadNext(UChar_t* data, Int_t size);
71
72   Bool_t   Reset();
73
74   Bool_t   NextEvent();
75   Bool_t   RewindEvents();
76
77  protected:
78
79  private:
80   /** standard constructor prohibited */
81   AliRawReaderHLT();
82   /** copy constructor prohibited */
83   AliRawReaderHLT(const AliRawReaderHLT&);
84   /** assignment operator prohibited */
85   AliRawReaderHLT& operator=(const AliRawReaderHLT&);
86
87   /** the rawreader */
88   AliRawReader* fpParentReader; //!transient
89
90   /** options */
91   TString fOptions; //!transient
92   
93   ClassDef(AliRawReaderHLT, 0)
94 };
95
96 #define ALIHLTREC_LIBRARY                   "libHLTrec.so"
97 #define ALIHLTREC_LIBRARY_VERSION           0
98 #define ALIRAWREADERHLT_CREATE_INSTANCE     "AliRawReaderHLTCreateInstance"
99
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103   typedef AliRawReader* (*AliRawReaderHLTCreateInstance_t)(AliRawReader* pParentReader, const char* options);
104
105   /**
106    * Create an instance of the AliRawReader class
107    */
108   AliRawReader* AliRawReaderHLTCreateInstance(AliRawReader* pParentReader, const char* options);
109 #ifdef __cplusplus
110 }
111 #endif
112 #endif