compilation warnings fixed
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDRawStream.h
CommitLineData
d2e2f542 1#ifndef ALIHMPIDRAWSTREAM_H
2#define ALIHMPIDRAWSTREAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6///////////////////////////////////////////////////////////////////////////////
7///
8/// This is a class for reading raw data digits for HMPID.
9/// The data format is taken from the document provided by Paolo Martinengo.
10///
11/// cvetan.cheshkov@cern.ch 19/07/2007
12///
13///////////////////////////////////////////////////////////////////////////////
14
15#include <TObject.h>
16
17class AliRawReader;
18
19class AliHMPIDRawStream: public TObject {
20 public :
21 AliHMPIDRawStream(AliRawReader* rawReader);
22 virtual ~AliHMPIDRawStream();
23
24 virtual void Reset();
25 virtual Bool_t Next();
26 void Init();
27
28 Int_t GetDDLNumber() const { return fDDLNumber; } // Provide current DDL number
29 Short_t GetCharge(Int_t row, Int_t dilogic, Int_t pad) const; // Provide the charge observed in certain row,dilogic,pad channel
30
31 enum EHMPIDRawStreamError {
32 kRawDataSizeErr = 1,
33 kRowMarkerErr = 2,
34 kWrongRowErr = 3,
35 kWrongDilogicErr = 4,
36 kWrongPadErr = 5,
37 kEoEFlagErr = 6,
38 kEoESizeErr = 7,
39 kEoEDILOGICErr = 8,
40 kEoERowErr = 9,
41 kBadSegWordErr = 10,
42 kWrongSegErr = 11
43 };
44
45 enum {
46 kNRows = 25, // Number of rows (starting from 1 !)
47 kNDILOGICAdd = 11, // Number of DILOGIC addresses in a row (starting from 1 !)
48 kNPadAdd = 48, // Number of
49 kNRowsPerSegment = 8 // Number of rows per segment
50 };
51
52 private :
53
54 AliHMPIDRawStream& operator = (const AliHMPIDRawStream& stream);
55 AliHMPIDRawStream(const AliHMPIDRawStream& stream);
56
57 UInt_t GetNextWord();
58
59 Short_t fCharge[kNRows][kNDILOGICAdd][kNPadAdd]; // Array for charge values for all channels in one DDL
60
61 Int_t fDDLNumber; // index of current DDL number
62
63 AliRawReader* fRawReader; // object for reading the raw data
64
65 UChar_t* fData; // raw data
66
67 Int_t fPosition; // current position in fData
68 // Int_t fCount; // counter of words to be read for current trailer
69
70 ClassDef(AliHMPIDRawStream, 0) // base class for reading HMPID raw digits
71};
72
73#endif