]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDRawWriter.h
Moving the FMD offline trigger to its own class, AliFMDOfflineTrigger
[u/mrichter/AliRoot.git] / FMD / AliFMDRawWriter.h
index af2655eb2df4a46bd09533e255d8d9d131f0a1e3..d1c309fd3b62d76c41d3aa116cd22ea50e86ae09 100644 (file)
@@ -8,6 +8,11 @@
  * See cxx source for full Copyright notice                               
  */
 /* $Id$ */
+/** @file    AliFMDRawWriter.h
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @date    Mon Mar 27 12:45:56 2006
+    @brief   Class to write raw data 
+*/
 //____________________________________________________________________
 // 
 // Class to writer ADC values to a Raw File
@@ -22,6 +27,7 @@
 class AliFMD;
 class AliAltroBuffer;
 class TArrayI;
+class TArrayF;
 class TClonesArray;
 
 //____________________________________________________________________
@@ -51,15 +57,29 @@ public:
       @param digits Array of AliFMDDigit objects to convert to raw
       ALTRO data. */
   virtual void WriteDigits(TClonesArray* digits);
+  /** Do zero-suppression of channel data. 
+      @param data      Contain @a nWords of valid data.  On input, it 
+                       contains the full channel data.  On output it
+                       will contain the zero-suppresed data. 
+      @param peds      Contain @a nWords pedestals 
+      @param noise     Contain @a nWords pedestal widths 
+      @param threshold Zero suppression threshold. */
+  void ZeroSuppress(Int_t*& data, Int_t nWords, const Float_t* peds, 
+                   const Float_t* noise, UShort_t threshold) const;
 protected:
-  /* Write a single channel.  This member function is obsolete. */
-  // virtual void WriteChannel(AliAltroBuffer* altro, UShort_t strip, 
-  //                           UShort_t sector, Char_t ring, const TArrayI& d);
+  AliFMDRawWriter(const AliFMDRawWriter& o) 
+    : TTask(o), 
+      fFMD(o.fFMD), 
+      fSampleRate(o.fSampleRate), 
+      fChannelsPerAltro(o.fChannelsPerAltro), 
+      fThreshold(o.fThreshold)
+  {}
+  AliFMDRawWriter& operator=(const AliFMDRawWriter&) { return *this; }
   AliFMD*       fFMD;              //! Pointer to detector description 
   UShort_t      fSampleRate;       // The sample rate (0 -> inferred from data)
   UShort_t      fChannelsPerAltro; // Number of pre-amp. channels/adc channel 
   UShort_t      fThreshold;        // Threshold for zero-suppression
-  
+
   ClassDef(AliFMDRawWriter, 0) // Write FMD raw data to a DDL file
 };