Fixing compilation problem due to missing include file in Make*Table.C macros.
[u/mrichter/AliRoot.git] / FMD / AliFMDRawReader.h
CommitLineData
e802be3e 1#ifndef ALIFMDRAWREADER_H
2#define ALIFMDRAWREADER_H
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 */
e802be3e 10//____________________________________________________________________
11//
12// Class to read ADC values from a AliRawReader object.
088f8e79 13// Note, that it uses an ALTRO reader, which is wrong.
14// Perhaps we need to implement it our selves
e802be3e 15//
02a27b50 16/* $Id$ */
17/** @file AliFMDRawReader.h
18 @author Christian Holm Christensen <cholm@nbi.dk>
19 @date Mon Mar 27 12:45:23 2006
20 @brief Class to read raw data
21 @ingroup FMD_rec
22*/
e802be3e 23#ifndef ROOT_TTask
24# include <TTask.h>
25#endif
f38b1653 26#include "AliFMDUShortMap.h"
e802be3e 27
28//____________________________________________________________________
29class AliRawReader;
1a1fdef7 30class TTree;
d760ea03 31class TClonesArray;
3effc6e7 32class TArrayS;
33class AliFMDCalibSampleRate;
34class AliFMDCalibStripRange;
e802be3e 35
36//____________________________________________________________________
9f662337 37/** @brief Class to read ALTRO formated raw data from an AliRawReader
38 object.
39 @code
40 AliRawReader* reader = new AliRawReaderFile(0);
41 AliFMDRawReader* fmdReader = new AliFMDRawReader(reader);
42 TClonesArray* array = new TClonesArray("AliFMDDigit");
43 fmdReader->ReadAdcs(array);
44 @endcode
45 @ingroup FMD_rec
46*/
e802be3e 47class AliFMDRawReader : public TTask
48{
49public:
9f662337 50 /** CTOR
51 @param reader Raw reader
52 @param array Output tree */
1a1fdef7 53 AliFMDRawReader(AliRawReader* reader, TTree* array);
9f662337 54 /** DTOR */
088f8e79 55 virtual ~AliFMDRawReader() {}
9f662337 56 /** Read in, and store in output tree
57 @param option Not used */
d760ea03 58 virtual void Exec(Option_t* option="");
9f662337 59 /** Read ADC's into a TClonesArray of AliFMDDigit objects.
60 @param array Array to read into
61 @return @c true on success */
d760ea03 62 virtual Bool_t ReadAdcs(TClonesArray* array);
3effc6e7 63 /** Read SOD event into a container.
64 @param array Array to read into
65 @return @c true on success */
66 virtual Bool_t ReadSODevent(AliFMDCalibSampleRate* samplerate,
67 AliFMDCalibStripRange* striprange,
68 TArrayS &pulseSize,
69 TArrayS &pulseLength);
e802be3e 70protected:
b5ee4425 71 AliFMDRawReader(const AliFMDRawReader& o)
72 : TTask(o),
73 fTree(0),
74 fReader(0),
3effc6e7 75 fSampleRate(0),
76 fData(0),
f38b1653 77 fNbytes(0),
78 fSeen()
b5ee4425 79 {}
02a27b50 80 AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
3effc6e7 81 ULong_t GetNwords() const {return fNbytes / 4;}
82 UInt_t Get32bitWord(Int_t idx);
83 Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board);
f38b1653 84 TTree* fTree; //! Pointer to tree to read into
85 AliRawReader* fReader; //! Pointer to raw reader
86 UShort_t fSampleRate; // The sample rate (if 0, inferred from data)
87 UChar_t* fData;
88 ULong_t fNbytes;
89 AliFMDUShortMap fSeen;
3effc6e7 90
e802be3e 91 ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache
92};
93
94#endif
95//____________________________________________________________________
96//
97// Local Variables:
98// mode: C++
99// End:
100//
101// EOF
102//