Effective C++ changes
[u/mrichter/AliRoot.git] / RAW / AliRawReaderFile.h
CommitLineData
04fa961a 1#ifndef ALIRAWREADERFILE_H
2#define ALIRAWREADERFILE_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 files.
11///
12///////////////////////////////////////////////////////////////////////////////
13
04fa961a 14#include "AliRawReader.h"
cfe26801 15#ifdef __CINT__
16class fstream;
17#else
04fa961a 18#include <Riostream.h>
cfe26801 19#endif
04fa961a 20#include <TString.h>
21
22
23class AliRawReaderFile: public AliRawReader {
24 public :
dd9a70fe 25 AliRawReaderFile(Int_t eventNumber = -1);
26 AliRawReaderFile(const char* dirName, Int_t eventNumber = -1);
42d20574 27 AliRawReaderFile(const AliRawReaderFile& rawReader);
28 AliRawReaderFile& operator = (const AliRawReaderFile& rawReader);
04fa961a 29 virtual ~AliRawReaderFile();
30
299738b9 31 virtual void RequireHeader(Bool_t required);
32
42d20574 33 virtual UInt_t GetType() const {return 0;};
34 virtual UInt_t GetRunNumber() const {return 0;};
35 virtual const UInt_t* GetEventId() const {return 0;};
36 virtual const UInt_t* GetTriggerPattern() const {return 0;};
37 virtual const UInt_t* GetDetectorPattern() const {return 0;};
38 virtual const UInt_t* GetAttributes() const {return 0;};
e94ad92c 39 virtual const UInt_t* GetSubEventAttributes() const {return 0;};
39f9963f 40 virtual UInt_t GetLDCId() const {return 0;};
42d20574 41 virtual UInt_t GetGDCId() const {return 0;};
04fa961a 42
39f9963f 43 virtual Int_t GetEquipmentSize() const {return 0;};
44 virtual Int_t GetEquipmentType() const {return 0;};
45 virtual Int_t GetEquipmentId() const {return fEquipmentId;};
46 virtual const UInt_t* GetEquipmentAttributes() const {return NULL;};
47 virtual Int_t GetEquipmentElementSize() const {return 0;};
299738b9 48 virtual Int_t GetEquipmentHeaderSize() const {return 0;};
04fa961a 49
39f9963f 50 virtual Bool_t ReadHeader();
04fa961a 51 virtual Bool_t ReadNextData(UChar_t*& data);
bf22797a 52 virtual Bool_t ReadNext(UChar_t* data, Int_t size);
04fa961a 53
54 virtual Bool_t Reset();
55
dd9a70fe 56 virtual Bool_t NextEvent();
57 virtual Bool_t RewindEvents();
58
04fa961a 59 protected :
dd9a70fe 60 TString GetDirName() const;
61 void* OpenDirectory();
04fa961a 62 Bool_t OpenNextFile();
63
dd9a70fe 64 Int_t fEventIndex; // index of the event
39f9963f 65 TString fDirName; // name of the input directory
66 void* fDirectory; // pointer to the input directory
04fa961a 67 fstream* fStream; // stream of raw digits
39f9963f 68 Int_t fEquipmentId; // equipment ID from file name
04fa961a 69 UChar_t* fBuffer; // buffer for payload
70 Int_t fBufferSize; // size of fBuffer in bytes
71
72 ClassDef(AliRawReaderFile, 0) // class for reading raw digits from a file
73};
74
75#endif