Fixed some coding style violations.
[u/mrichter/AliRoot.git] / FMD / AliFMDRawStream.h
CommitLineData
4347b38f 1#ifndef ALIFMDRAWSTREAM_H
2#define ALIFMDRAWSTREAM_H
0d0e6995 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7 *
8 * See cxx source for full Copyright notice
9 */
4347b38f 10#ifndef ALIALTRORAWSTREAM_H
11# include <AliAltroRawStream.h>
12#endif
13
14
15// TPC to FMD translations
16//
17// TPC FMD
18// ----------+-----------
19// pad+time | strip
20// row | sector
21// sector | ring
22//
23class AliFMDRawStream : public AliAltroRawStream
24{
4347b38f 25public:
e802be3e 26 AliFMDRawStream(AliRawReader* reader, UShort_t sampleRate=0);
088f8e79 27 virtual ~AliFMDRawStream() {}
4347b38f 28
29 Short_t Sector() const { return fRow; }
30 Char_t Ring() const { return (fSector == 0 ? 'I' : 'O'); }
31 Short_t Strip() const { return fPad + fTime / fSampleRate; }
e802be3e 32 Short_t Sample() const { return fTime % fSampleRate; }
4347b38f 33 Short_t PrevSector() const { return fPrevRow; }
34 Char_t PrevRing() const { return (fPrevSector == 0 ? 'I' : 'O'); }
35 Short_t PrevStrip() const { return fPrevPad + fPrevTime/fSampleRate; }
e802be3e 36
4347b38f 37 Bool_t IsNewRing() const { return (fSector != fPrevSector); }
38 Bool_t IsNewSector() const { return (fRow != fPrevRow) || IsNewRing(); }
39 Bool_t IsNewStrip() const { return(Strip() != PrevStrip())||IsNewSector();}
40
e802be3e 41 Short_t Count() const { return fSignal; }
42 Short_t SampleRate() const { return fSampleRate; }
4347b38f 43
44 virtual Bool_t Next();
45
42403906 46private:
e802be3e 47 UShort_t fSampleRate; // # of ALTRO samples per VA1_ALICE clock
48 Int_t fPrevTime; // Last time bin
49 Bool_t fExplicitSampleRate; // True if the sample rate was set externally
50
4347b38f 51 ClassDef(AliFMDRawStream, 0) // Read raw FMD Altro data
52};
53
54#endif
0d0e6995 55//____________________________________________________________________
56//
57// Local Variables:
58// mode: C++
59// End:
60//
61// EOF
62//