]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RAW/AliRawReaderDate.h
Set local coordinate for HasPad method (Ivana)
[u/mrichter/AliRoot.git] / RAW / AliRawReaderDate.h
1 #ifndef ALIRAWREADERDATE_H
2 #define ALIRAWREADERDATE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 ///
10 /// This is a class for reading raw data from a date file or event.
11 ///
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "AliRawReader.h"
15
16 struct eventHeaderStruct;
17 struct equipmentHeaderStruct;
18
19
20 class AliRawReaderDate: public AliRawReader {
21   public :
22     AliRawReaderDate(void* event);
23     AliRawReaderDate(const char* fileName, Int_t eventNumber = -1);
24     virtual ~AliRawReaderDate();
25
26     void             RequireHeader(Bool_t required = kTRUE)
27       {fRequireHeader = required;};
28
29     virtual UInt_t   GetType() const;
30     virtual UInt_t   GetRunNumber() const;
31     virtual const UInt_t* GetEventId() const;
32     virtual const UInt_t* GetTriggerPattern() const;
33     virtual const UInt_t* GetDetectorPattern() const;
34     virtual const UInt_t* GetAttributes() const;
35     virtual const UInt_t* GetSubEventAttributes() const;
36     virtual UInt_t   GetLDCId() const;
37     virtual UInt_t   GetGDCId() const;
38
39     virtual Int_t    GetEquipmentSize() const;
40     virtual Int_t    GetEquipmentType() const;
41     virtual Int_t    GetEquipmentId() const;
42     virtual const UInt_t* GetEquipmentAttributes() const;
43     virtual Int_t    GetEquipmentElementSize() const;
44
45     virtual Bool_t   ReadHeader();
46     virtual Bool_t   ReadNextData(UChar_t*& data);
47
48     virtual Bool_t   Reset();
49
50     virtual Bool_t   NextEvent();
51     virtual Bool_t   RewindEvents();
52
53     virtual Int_t    CheckData() const;
54
55   protected :
56     virtual Bool_t   ReadNext(UChar_t* data, Int_t size);
57
58     Bool_t           fRequireHeader; // if false, data without header is accepted
59
60     FILE*            fFile;         // DATE file
61     eventHeaderStruct* fEvent;      // raw data super event
62     eventHeaderStruct* fSubEvent;   // raw data sub event
63     equipmentHeaderStruct* fEquipment; // raw data equipment header
64
65     UChar_t*         fPosition;     // current position in the raw data
66     UChar_t*         fEnd;          // end position of the current data block
67
68   private:
69     AliRawReaderDate(const AliRawReaderDate& rawReader);
70     AliRawReaderDate& operator = (const AliRawReaderDate& rawReader);
71
72     ClassDef(AliRawReaderDate, 0) // class for reading raw digits from a root file
73 };
74
75 #endif