]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDRawReader.h
correct usage of low p_T cut off, more options for background calculatiom (S. Jangal)
[u/mrichter/AliRoot.git] / FMD / AliFMDRawReader.h
index fa5cbdb85e9d347c4555b32c2893c41f6c335149..645f1c825eeb6e4af70b9c2e8dec0be6548c7f16 100644 (file)
@@ -27,6 +27,7 @@
 
 //____________________________________________________________________
 class AliRawReader;
+class AliAltroRawStreamV3;
 class TTree;
 class TClonesArray;
 class TArrayS;
@@ -154,26 +155,107 @@ public:
    */
   static Bool_t SelectSample(UShort_t samp, UShort_t rate);
 protected:
+  /** 
+   * Copy constructor 
+   * 
+   * @param o Object to construct from
+   */  
   AliFMDRawReader(const AliFMDRawReader& o) 
     : TTask(o), 
       fTree(0), 
       fReader(0), 
       fData(0),
       fNbytes(0), 
+      fMinStrip(0), 
+      fMaxStrip(127),
+      fPreSamp(14+5),
       fSeen(0)
   {}
+  /** 
+   * Assignment operator
+   * 
+   * @return Reference to this object
+   */
   AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
+  /** 
+   * Process a new DDL.  Sets the internal data members fZeroSuppress, 
+   * fSampleRate, and fNoiseFactor based on information in the RCU trailer. 
+   * 
+   * @param input Input stream
+   * @param det   On return, the detector number
+   * 
+   * @return negative value in case of problems, the DDL number otherwise
+   */
+  Int_t NewDDL(AliAltroRawStreamV3& input, UShort_t& det);
+  /** 
+   * Processs a new channel.  Sets the internal data members
+   * fMinStrip, fMaxStrip, and fPreSamp. 
+   * 
+   * @param input   Input stream
+   * @param det     Detector number
+   * @param ring    On return, the ring identifier 
+   * @param sec     On return, the sector number
+   * @param strbase On return, the strip base
+   * 
+   * @return negative value in case of problems, hardware address otherwise
+   */
+  Int_t NewChannel(const AliAltroRawStreamV3& input, 
+                  UShort_t det, Char_t&  ring, 
+                  UShort_t& sec, Short_t& strbase);
+
+  /** 
+   * Process a new timebin
+   * 
+   * @param input   Input stream
+   * @param i       Index into bunch data
+   * @param t       Time
+   * @param sec     Sector number
+   * @param strbase Base of strip numbers for this channel
+   * @param str     On return, the strip number
+   * @param samp    On return, the sample number
+   * 
+   * @return negative value in case of problems, ADC value otherwise
+   */  
+  Int_t NewSample(const AliAltroRawStreamV3& input, 
+                 Int_t i, UShort_t t, UShort_t sec,
+                 UShort_t  strbase, Short_t&  str, UShort_t& samp);
+
+  /** 
+   * 
+   * Get the number of words 
+   * 
+   * @return Number of 32bit words 
+   */
   ULong_t GetNwords() const {return fNbytes / 4;}
+  /** 
+   * Get the next 32bit word from payload
+   * 
+   * @param idx Which 32bit word to get
+   * 
+   * @return 
+   */
   UInt_t Get32bitWord(Int_t idx);
-  Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board);
-  TTree*          fTree;       //! Pointer to tree to read into 
-  AliRawReader*   fReader;     //! Pointer to raw reader 
-  UShort_t        fSampleRate[3]; // The sample rate (if 0, inferred from data)
-  UChar_t*        fData; 
-  ULong_t        fNbytes; 
-  Bool_t          fZeroSuppress[3];
-  UShort_t        fNoiseFactor[3];
-  AliFMDUShortMap fSeen;
+  /** 
+   * Get short index for a given half-ring
+   * 
+   * @param det   Detector number
+   * @param ring  Ring identifer
+   * @param board Board number
+   * 
+   * @return 
+   */
+  Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board) const;
+  TTree*          fTree;            //! Pointer to tree to read into 
+  AliRawReader*   fReader;          //! Pointer to raw reader 
+  UShort_t        fSampleRate[3];   // The sample rate (if 0,inferred from data)
+  UChar_t*        fData;            // Data pointer
+  ULong_t        fNbytes;          // Number of bytes
+  Bool_t          fZeroSuppress[3]; // Zero suppression flag
+  UShort_t        fNoiseFactor[3];  // Noise factor 
+  UShort_t        fMinStrip;        // Current minimum strip number (0)
+  UShort_t        fMaxStrip;        // Current maximum strip number (127)
+  UShort_t        fPreSamp;         // Current number of pre-samples (14+5)
+  AliFMDUShortMap fSeen;            // Seen strips 
   
   ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache 
 };
@@ -187,3 +269,4 @@ protected:
 //
 // EOF
 //
+