]>
Commit | Line | Data |
---|---|---|
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 | |
26 | ||
27 | //____________________________________________________________________ | |
28 | class AliRawReader; | |
1a1fdef7 | 29 | class TTree; |
d760ea03 | 30 | class TClonesArray; |
3effc6e7 | 31 | class TArrayS; |
32 | class AliFMDCalibSampleRate; | |
33 | class AliFMDCalibStripRange; | |
e802be3e | 34 | |
35 | //____________________________________________________________________ | |
9f662337 | 36 | /** @brief Class to read ALTRO formated raw data from an AliRawReader |
37 | object. | |
38 | @code | |
39 | AliRawReader* reader = new AliRawReaderFile(0); | |
40 | AliFMDRawReader* fmdReader = new AliFMDRawReader(reader); | |
41 | TClonesArray* array = new TClonesArray("AliFMDDigit"); | |
42 | fmdReader->ReadAdcs(array); | |
43 | @endcode | |
44 | @ingroup FMD_rec | |
45 | */ | |
e802be3e | 46 | class AliFMDRawReader : public TTask |
47 | { | |
48 | public: | |
9f662337 | 49 | /** CTOR |
50 | @param reader Raw reader | |
51 | @param array Output tree */ | |
1a1fdef7 | 52 | AliFMDRawReader(AliRawReader* reader, TTree* array); |
9f662337 | 53 | /** DTOR */ |
088f8e79 | 54 | virtual ~AliFMDRawReader() {} |
9f662337 | 55 | /** Read in, and store in output tree |
56 | @param option Not used */ | |
d760ea03 | 57 | virtual void Exec(Option_t* option=""); |
9f662337 | 58 | /** Read ADC's into a TClonesArray of AliFMDDigit objects. |
59 | @param array Array to read into | |
60 | @return @c true on success */ | |
d760ea03 | 61 | virtual Bool_t ReadAdcs(TClonesArray* array); |
3effc6e7 | 62 | /** Read SOD event into a container. |
63 | @param array Array to read into | |
64 | @return @c true on success */ | |
65 | virtual Bool_t ReadSODevent(AliFMDCalibSampleRate* samplerate, | |
66 | AliFMDCalibStripRange* striprange, | |
67 | TArrayS &pulseSize, | |
68 | TArrayS &pulseLength); | |
e802be3e | 69 | protected: |
b5ee4425 | 70 | AliFMDRawReader(const AliFMDRawReader& o) |
71 | : TTask(o), | |
72 | fTree(0), | |
73 | fReader(0), | |
3effc6e7 | 74 | fSampleRate(0), |
75 | fData(0), | |
76 | fNbytes(0) | |
b5ee4425 | 77 | {} |
02a27b50 | 78 | AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; } |
3effc6e7 | 79 | ULong_t GetNwords() const {return fNbytes / 4;} |
80 | UInt_t Get32bitWord(Int_t idx); | |
81 | Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board); | |
1a1fdef7 | 82 | TTree* fTree; //! Pointer to tree to read into |
e802be3e | 83 | AliRawReader* fReader; //! Pointer to raw reader |
84 | UShort_t fSampleRate; // The sample rate (if 0, inferred from data) | |
3effc6e7 | 85 | UChar_t* fData; |
86 | ULong_t fNbytes; | |
87 | ||
e802be3e | 88 | ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache |
89 | }; | |
90 | ||
91 | #endif | |
92 | //____________________________________________________________________ | |
93 | // | |
94 | // Local Variables: | |
95 | // mode: C++ | |
96 | // End: | |
97 | // | |
98 | // EOF | |
99 | // |