1 #ifndef ALIFMDRAWWRITER_H
2 #define ALIFMDRAWWRITER_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
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
16 //____________________________________________________________________
18 // Class to writer ADC values to a Raw File
19 // Uses general ALTRO class - which is wrong
20 // Should make it right!
26 //____________________________________________________________________
33 //____________________________________________________________________
34 /** @class AliFMDRawWriter
35 @brief Class to write ALTRO formated raw data from an array of
38 AliFMDRawWriter* fmdWriter = new AliFMDRawWriter(0);
39 TClonesArray* array = fmd->DigitArray();
40 fmdWriter->WriteDigits(array);
44 class AliFMDRawWriter : public TTask
48 @param fmd Pointer to detector object. */
49 AliFMDRawWriter(AliFMD* fmd);
51 virtual ~AliFMDRawWriter() {}
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
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;
70 AliFMDRawWriter(const AliFMDRawWriter& o)
73 fSampleRate(o.fSampleRate),
74 fChannelsPerAltro(o.fChannelsPerAltro),
75 fThreshold(o.fThreshold)
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
83 ClassDef(AliFMDRawWriter, 0) // Write FMD raw data to a DDL file
87 //____________________________________________________________________