]>
Commit | Line | Data |
---|---|---|
e802be3e | 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$ */ | |
c2fc1258 | 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 | */ | |
e802be3e | 16 | //____________________________________________________________________ |
17 | // | |
18 | // Class to writer ADC values to a Raw File | |
088f8e79 | 19 | // Uses general ALTRO class - which is wrong |
20 | // Should make it right! | |
e802be3e | 21 | // |
22 | #ifndef ROOT_TTask | |
23 | # include <TTask.h> | |
24 | #endif | |
25 | ||
26 | //____________________________________________________________________ | |
27 | class AliFMD; | |
7684b53c | 28 | class AliAltroBuffer; |
29 | class TArrayI; | |
cce354f6 | 30 | class TArrayF; |
1e8f773e | 31 | class TClonesArray; |
e802be3e | 32 | |
33 | //____________________________________________________________________ | |
9f662337 | 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 | */ | |
e802be3e | 44 | class AliFMDRawWriter : public TTask |
45 | { | |
46 | public: | |
9f662337 | 47 | /** Constructor |
48 | @param fmd Pointer to detector object. */ | |
e802be3e | 49 | AliFMDRawWriter(AliFMD* fmd); |
9f662337 | 50 | /** Destructor */ |
088f8e79 | 51 | virtual ~AliFMDRawWriter() {} |
e802be3e | 52 | |
9f662337 | 53 | /** Write the output from AliFMD object. |
54 | @param option Not used */ | |
e802be3e | 55 | virtual void Exec(Option_t* option=""); |
9f662337 | 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. */ | |
1e8f773e | 59 | virtual void WriteDigits(TClonesArray* digits); |
cce354f6 | 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; | |
9f662337 | 69 | protected: |
b5ee4425 | 70 | AliFMDRawWriter(const AliFMDRawWriter& o) |
71 | : TTask(o), | |
cce354f6 | 72 | fFMD(o.fFMD), |
73 | fSampleRate(o.fSampleRate), | |
74 | fChannelsPerAltro(o.fChannelsPerAltro), | |
75 | fThreshold(o.fThreshold) | |
b5ee4425 | 76 | {} |
02a27b50 | 77 | AliFMDRawWriter& operator=(const AliFMDRawWriter&) { return *this; } |
7684b53c | 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 | |
cce354f6 | 82 | |
e802be3e | 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 | // |