Bug fixed (Christian)
[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
26
27//____________________________________________________________________
28class AliRawReader;
1a1fdef7 29class TTree;
d760ea03 30class TClonesArray;
e802be3e 31
32
33//____________________________________________________________________
9f662337 34/** @brief Class to read ALTRO formated raw data from an AliRawReader
35 object.
36 @code
37 AliRawReader* reader = new AliRawReaderFile(0);
38 AliFMDRawReader* fmdReader = new AliFMDRawReader(reader);
39 TClonesArray* array = new TClonesArray("AliFMDDigit");
40 fmdReader->ReadAdcs(array);
41 @endcode
42 @ingroup FMD_rec
43*/
e802be3e 44class AliFMDRawReader : public TTask
45{
46public:
9f662337 47 /** CTOR
48 @param reader Raw reader
49 @param array Output tree */
1a1fdef7 50 AliFMDRawReader(AliRawReader* reader, TTree* array);
9f662337 51 /** DTOR */
088f8e79 52 virtual ~AliFMDRawReader() {}
9f662337 53 /** Read in, and store in output tree
54 @param option Not used */
d760ea03 55 virtual void Exec(Option_t* option="");
9f662337 56 /** Read ADC's into a TClonesArray of AliFMDDigit objects.
57 @param array Array to read into
58 @return @c true on success */
d760ea03 59 virtual Bool_t ReadAdcs(TClonesArray* array);
e802be3e 60protected:
b5ee4425 61 AliFMDRawReader(const AliFMDRawReader& o)
62 : TTask(o),
63 fTree(0),
64 fReader(0),
65 fSampleRate(0)
66 {}
02a27b50 67 AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
1a1fdef7 68 TTree* fTree; //! Pointer to tree to read into
e802be3e 69 AliRawReader* fReader; //! Pointer to raw reader
70 UShort_t fSampleRate; // The sample rate (if 0, inferred from data)
71 ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache
72};
73
74#endif
75//____________________________________________________________________
76//
77// Local Variables:
78// mode: C++
79// End:
80//
81// EOF
82//