]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDRawWriter.h
Fixed warnings pointed out by FC
[u/mrichter/AliRoot.git] / FMD / AliFMDRawWriter.h
1 #ifndef ALIFMDRAWWRITER_H
2 #define ALIFMDRAWWRITER_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 /* $Id$ */
11 /** @file    AliFMDRawWriter.h
12     @author  Christian Holm Christensen <cholm@nbi.dk>
13     @date    Mon Mar 27 12:45:56 2006
14     @brief   Class to write raw data 
15 */
16 //____________________________________________________________________
17 // 
18 // Class to writer ADC values to a Raw File
19 // Uses general ALTRO class - which is wrong
20 // Should make it right!
21 //
22 #ifndef ROOT_TTask
23 # include <TTask.h>
24 #endif
25
26 //____________________________________________________________________
27 class AliFMD;
28 class AliAltroBuffer;
29 class TArrayI;
30 class TArrayF;
31 class TClonesArray;
32
33 //____________________________________________________________________
34 /** @class AliFMDRawWriter
35     @brief Class to write ALTRO formated raw data from an array of
36     AliFMDDigit objects.
37     @code 
38     AliFMDRawWriter* fmdWriter = new AliFMDRawWriter(0);
39     TClonesArray*    array     = fmd->DigitArray();
40     fmdWriter->WriteDigits(array);
41     @endcode 
42     @ingroup FMD_sim
43 */
44 class AliFMDRawWriter : public TTask 
45 {
46 public:
47   /** Constructor 
48       @param fmd Pointer to detector object. */
49   AliFMDRawWriter(AliFMD* fmd);
50   /** Destructor */
51   virtual ~AliFMDRawWriter() {}
52
53   /** Write the output from AliFMD object. 
54       @param option Not used */
55   virtual void Exec(Option_t* option="");
56   /** Write an array of AliFMDDigit objects as raw ALTRO data. 
57       @param digits Array of AliFMDDigit objects to convert to raw
58       ALTRO data. */
59   virtual void WriteDigits(TClonesArray* digits);
60   /** Do zero-suppression of channel data. 
61       @param data      Contain @a nWords of valid data.  On input, it 
62                        contains the full channel data.  On output it
63                        will contain the zero-suppresed data. 
64       @param peds      Contain @a nWords pedestals 
65       @param noise     Contain @a nWords pedestal widths 
66       @param threshold Zero suppression threshold. */
67   void ZeroSuppress(Int_t*& data, Int_t nWords, const Float_t* peds, 
68                     const Float_t* noise, UShort_t threshold) const;
69 protected:
70   AliFMDRawWriter(const AliFMDRawWriter& o) 
71     : TTask(o), 
72       fFMD(o.fFMD), 
73       fSampleRate(o.fSampleRate), 
74       fChannelsPerAltro(o.fChannelsPerAltro), 
75       fThreshold(o.fThreshold)
76   {}
77   AliFMDRawWriter& operator=(const AliFMDRawWriter&) { return *this; }
78   AliFMD*       fFMD;              //! Pointer to detector description 
79   UShort_t      fSampleRate;       // The sample rate (0 -> inferred from data)
80   UShort_t      fChannelsPerAltro; // Number of pre-amp. channels/adc channel 
81   UShort_t      fThreshold;        // Threshold for zero-suppression
82
83   ClassDef(AliFMDRawWriter, 0) // Write FMD raw data to a DDL file
84 };
85
86 #endif
87 //____________________________________________________________________
88 //
89 // Local Variables:
90 //   mode: C++
91 // End:
92 //
93 // EOF
94 //