]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDRawWriter.h
DP:Misalignment of CPV added
[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 TClonesArray;
31
32 //____________________________________________________________________
33 /** @class AliFMDRawWriter
34     @brief Class to write ALTRO formated raw data from an array of
35     AliFMDDigit objects.
36     @code 
37     AliFMDRawWriter* fmdWriter = new AliFMDRawWriter(0);
38     TClonesArray*    array     = fmd->DigitArray();
39     fmdWriter->WriteDigits(array);
40     @endcode 
41     @ingroup FMD_sim
42 */
43 class AliFMDRawWriter : public TTask 
44 {
45 public:
46   /** Constructor 
47       @param fmd Pointer to detector object. */
48   AliFMDRawWriter(AliFMD* fmd);
49   /** Destructor */
50   virtual ~AliFMDRawWriter() {}
51
52   /** Write the output from AliFMD object. 
53       @param option Not used */
54   virtual void Exec(Option_t* option="");
55   /** Write an array of AliFMDDigit objects as raw ALTRO data. 
56       @param digits Array of AliFMDDigit objects to convert to raw
57       ALTRO data. */
58   virtual void WriteDigits(TClonesArray* digits);
59 protected:
60   AliFMDRawWriter(const AliFMDRawWriter& o) 
61     : TTask(o), 
62       fFMD(0), 
63       fSampleRate(0), 
64       fChannelsPerAltro(0), 
65       fThreshold(0)
66   {}
67   AliFMDRawWriter& operator=(const AliFMDRawWriter&) { return *this; }
68   AliFMD*       fFMD;              //! Pointer to detector description 
69   UShort_t      fSampleRate;       // The sample rate (0 -> inferred from data)
70   UShort_t      fChannelsPerAltro; // Number of pre-amp. channels/adc channel 
71   UShort_t      fThreshold;        // Threshold for zero-suppression
72   
73   ClassDef(AliFMDRawWriter, 0) // Write FMD raw data to a DDL file
74 };
75
76 #endif
77 //____________________________________________________________________
78 //
79 // Local Variables:
80 //   mode: C++
81 // End:
82 //
83 // EOF
84 //