]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDRawReader.h
Removing MC position of the primary vertex (Jouri)
[u/mrichter/AliRoot.git] / FMD / AliFMDRawReader.h
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  */
10 //____________________________________________________________________
11 // 
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
15 // 
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 */
23 #ifndef ROOT_TTask
24 # include <TTask.h>
25 #endif
26
27 //____________________________________________________________________
28 class AliRawReader;
29 class TTree;
30 class TClonesArray;
31
32
33 //____________________________________________________________________
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 */
44 class AliFMDRawReader : public TTask 
45 {
46 public:
47   /** CTOR 
48       @param reader Raw reader
49       @param array  Output tree */
50   AliFMDRawReader(AliRawReader* reader, TTree* array);
51   /** DTOR */
52   virtual ~AliFMDRawReader() {}
53   /** Read in, and store in output tree 
54       @param option Not used */
55   virtual void   Exec(Option_t* option="");
56   /** Read ADC's into a TClonesArray of AliFMDDigit objects. 
57       @param array Array to read into 
58       @return @c true on success */
59   virtual Bool_t ReadAdcs(TClonesArray* array);
60 protected:
61   AliFMDRawReader(const AliFMDRawReader& o) 
62     : TTask(o), 
63       fTree(0), 
64       fReader(0), 
65       fSampleRate(0)
66   {}
67   AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
68   TTree*        fTree;       //! Pointer to tree to read into 
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 //