functionality of raw readers extended to read more than one event
[u/mrichter/AliRoot.git] / RAW / AliRawReaderRoot.h
CommitLineData
04fa961a 1#ifndef ALIRAWREADERROOT_H
2#define ALIRAWREADERROOT_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
bea6b2a4 6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9///
10/// This is a class for reading raw data from a root file.
11///
12///////////////////////////////////////////////////////////////////////////////
13
04fa961a 14#include "AliRawReader.h"
15
42d20574 16class AliRawEvent;
17class AliRawData;
18class TFile;
dd9a70fe 19class TBranch;
42d20574 20
04fa961a 21
22class AliRawReaderRoot: public AliRawReader {
23 public :
dd9a70fe 24 AliRawReaderRoot(const char* fileName, Int_t eventNumber = -1);
04fa961a 25 AliRawReaderRoot(AliRawEvent* event);
42d20574 26 AliRawReaderRoot(const AliRawReaderRoot& rawReader);
27 AliRawReaderRoot& operator = (const AliRawReaderRoot& rawReader);
04fa961a 28 virtual ~AliRawReaderRoot();
29
42d20574 30 virtual UInt_t GetType() const;
31 virtual UInt_t GetRunNumber() const;
32 virtual const UInt_t* GetEventId() const;
33 virtual const UInt_t* GetTriggerPattern() const;
34 virtual const UInt_t* GetDetectorPattern() const;
35 virtual const UInt_t* GetAttributes() const;
c946ab02 36 virtual UInt_t GetLDCId() const;
42d20574 37 virtual UInt_t GetGDCId() const;
04fa961a 38
c946ab02 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();
04fa961a 46 virtual Bool_t ReadNextData(UChar_t*& data);
47
48 virtual Bool_t Reset();
49
dd9a70fe 50 virtual Bool_t NextEvent();
51 virtual Bool_t RewindEvents();
52
b4857df7 53 virtual Int_t CheckData() const;
54
04fa961a 55 protected :
56 virtual Bool_t ReadNext(UChar_t* data, Int_t size);
57
58 TFile* fFile; // raw data root file
dd9a70fe 59 TBranch* fBranch; // branch of raw events
60 Int_t fEventIndex; // index of the event in the tree
04fa961a 61 AliRawEvent* fEvent; // (super) event
62 Int_t fSubEventIndex; // index of current sub event
63 AliRawEvent* fSubEvent; // current sub event
64 AliRawData* fRawData; // current raw data
65 UChar_t* fPosition; // current position in the raw data
66 UChar_t* fEnd; // end position of the current subevent
67
68 ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file
69};
70
71#endif