1 #ifndef ALIFMDRAWREADER_H
2 #define ALIFMDRAWREADER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
8 * See cxx source for full Copyright notice
10 //____________________________________________________________________
12 // Class to read ADC values from a AliRawReader object.
13 // Note, that it uses an ALTRO reader, which is wrong.
14 // Perhaps we need to implement it our selves
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
27 //____________________________________________________________________
32 class AliFMDCalibSampleRate;
33 class AliFMDCalibStripRange;
35 //____________________________________________________________________
36 /** @brief Class to read ALTRO formated raw data from an AliRawReader
39 AliRawReader* reader = new AliRawReaderFile(0);
40 AliFMDRawReader* fmdReader = new AliFMDRawReader(reader);
41 TClonesArray* array = new TClonesArray("AliFMDDigit");
42 fmdReader->ReadAdcs(array);
46 class AliFMDRawReader : public TTask
50 @param reader Raw reader
51 @param array Output tree */
52 AliFMDRawReader(AliRawReader* reader, TTree* array);
54 virtual ~AliFMDRawReader() {}
55 /** Read in, and store in output tree
56 @param option Not used */
57 virtual void Exec(Option_t* option="");
58 /** Read ADC's into a TClonesArray of AliFMDDigit objects.
59 @param array Array to read into
60 @return @c true on success */
61 virtual Bool_t ReadAdcs(TClonesArray* array);
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,
68 TArrayS &pulseLength);
70 AliFMDRawReader(const AliFMDRawReader& o)
78 AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
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);
82 TTree* fTree; //! Pointer to tree to read into
83 AliRawReader* fReader; //! Pointer to raw reader
84 UShort_t fSampleRate; // The sample rate (if 0, inferred from data)
88 ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache
92 //____________________________________________________________________