]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDRawStream.h
New offline PID code by Prashant
[u/mrichter/AliRoot.git] / TRD / AliTRDRawStream.h
CommitLineData
b864d801 1#ifndef ALITRDRAWSTREAM_H
2#define ALITRDRAWSTREAM_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 class provides access to TRD digits in raw data.
11///
12///////////////////////////////////////////////////////////////////////////////
13
14#include <TObject.h>
15
16class AliRawReader;
928e9fae 17class AliTRDparameter;
b864d801 18
19class AliTRDRawStream: public TObject {
20 public :
3551db50 21 AliTRDRawStream(AliRawReader* rawReader);
b864d801 22 virtual ~AliTRDRawStream();
23
24 virtual Bool_t Next();
25
26 Int_t GetDetector() const {return fDetector;};
27 Int_t GetPrevDetector() const {return fPrevDetector;};
28 Bool_t IsNewDetector() const {return fDetector != fPrevDetector;};
29 Int_t GetNPads() const {return fNPads;};
30 Int_t GetRow() const {return fRow;};
31 Int_t GetPrevRow() const {return fPrevRow;};
32 Bool_t IsNewRow() const {return (fRow != fPrevRow) || IsNewDetector();};
33 Int_t GetColumn() const {return fColumn;};
34 Int_t GetPrevColumn() const {return fPrevColumn;};
35 Bool_t IsNewColumn() const {return (fColumn != fPrevColumn) || IsNewRow();};
36 Int_t GetTime() const {return fTime-1;};
37 Int_t GetSignal() const {return fSignal;};
38
39 enum {kDDLOffset = 0x400}; // offset for DDL numbers
40
41 private :
42 AliTRDRawStream(const AliTRDRawStream& stream);
43 AliTRDRawStream& operator = (const AliTRDRawStream& stream);
44
45 AliRawReader* fRawReader; // object for reading the raw data
46
b864d801 47 Int_t fCount; // counter of bytes to be read for current detector
48
49 Int_t fDetector; // index of current detector
50 Int_t fPrevDetector; // index of previous detector
51 Int_t fNPads; // number of active pads
52 Int_t fRow; // index of current pad row
53 Int_t fPrevRow; // index of previous pad row
54 Int_t fColumn; // index of current pad column
55 Int_t fPrevColumn; // index of previous pad column
56 Int_t fTime; // index of current time bin
57 Int_t fSignal; // signal in ADC counts
58
3551db50 59 ClassDef(AliTRDRawStream, 1) // class for reading TRD raw digits
b864d801 60};
61
62#endif