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 //____________________________________________________________________
29 class AliAltroBufferV3;
34 //____________________________________________________________________
35 /** @class AliFMDRawWriter
36 @brief Class to write ALTRO formated raw data from an array of
39 AliFMDRawWriter* fmdWriter = new AliFMDRawWriter(0);
40 TClonesArray* array = fmd->DigitArray();
41 fmdWriter->WriteDigits(array);
45 class AliFMDRawWriter : public TTask
49 @param fmd Pointer to detector object. */
50 AliFMDRawWriter(AliFMD* fmd);
52 virtual ~AliFMDRawWriter() {}
54 /** Write the output from AliFMD object.
55 @param option Not used */
56 virtual void Exec(Option_t* option="");
57 /** Write an array of AliFMDDigit objects as raw ALTRO data.
58 @param digits Array of AliFMDDigit objects to convert to raw
60 virtual Long_t WriteDigits(TClonesArray* digits);
61 /** Do zero-suppression of channel data.
62 @param data Contain @a nWords of valid data. On input, it
63 contains the full channel data. On output it
64 will contain the zero-suppresed data.
65 @param peds Contain @a nWords pedestals
66 @param noise Contain @a nWords pedestal widths
67 @param threshold Zero suppression threshold. */
68 void ZeroSuppress(Int_t*& data, Int_t nWords, const Float_t* peds,
69 const Float_t* noise, UShort_t threshold) const;
71 AliFMDRawWriter(const AliFMDRawWriter& o)
74 fSampleRate(o.fSampleRate),
75 fChannelsPerAltro(o.fChannelsPerAltro),
76 fThreshold(o.fThreshold)
78 AliFMDRawWriter& operator=(const AliFMDRawWriter&) { return *this; }
79 void WriteRCUTrailer(AliAltroBufferV3* altro,
84 AliFMD* fFMD; //! Pointer to detector description
85 UShort_t fSampleRate; // The sample rate (0 -> inferred from data)
86 UShort_t fChannelsPerAltro; // Number of pre-amp. channels/adc channel
87 UShort_t fThreshold; // Threshold for zero-suppression
89 ClassDef(AliFMDRawWriter, 0) // Write FMD raw data to a DDL file
93 //____________________________________________________________________