update of AltroChannelSelector component by Jason: added monitoring histograms, make...
[u/mrichter/AliRoot.git] / HLT / RCU / AliHLTAltroChannelSelectorComponent.h
index ffbd29624f5a21c6f7cb86f8bbab9df05c6aec15..04bb19c9a014d462fb4a0ff1ccc0df6b04a642ac 100644 (file)
@@ -1,5 +1,5 @@
 //-*- Mode: C++ -*-
-// @(#) $Id$
+// $Id$
 
 #ifndef ALIHLTALTROCHANNELSELECTORCOMPONENT_H
 #define ALIHLTALTROCHANNELSELECTORCOMPONENT_H
@@ -7,28 +7,35 @@
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               *
 
-/** @file   AliHLTAltroChannelSelectorComponent.h
-    @author Matthias Richter
-    @date   
-    @brief  A filter/selective readout component for Altro data.
-*/
+/// @file   AliHLTAltroChannelSelectorComponent.h
+/// @author Matthias Richter
+/// @date   
+/// @brief  A filter/selective readout component for Altro data.
+///
 
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
 
 #include "AliHLTProcessor.h"
 
+class TH1F;
+
 /**
  * @class AliHLTAltroChannelSelectorComponent
  * A selector component for ALTRO Raw data. The component subscribes
- * to the RAW data {***:DDL_RAW } and gets in addition a list of channels
- * to select. The list must be of identical specification as the RAW data
- * and can be of data type:
- * - {***:HWADDR16}: 16 bit hardware addresses
+ * to the RAW data {***:DDL_RAW }, and produces the same raw data block
+ * with only the selected ALTRO channels.                               <br>
+ * Three different modes are supported:
+ * - -signal-threshold                                                  <br>
+ *   the average of all signals in the channel is calculated and it is
+ *   selected when the maximum signal exceeds average+threshold
+ * - -rms-threshold                                                     <br>
+ *   the implemented logic needs to be checked, never been used
+ * - list of channels to select. 
+ *   The list must be of identical specification as the RAW data and of
+ *   data type {***:HWADDR16}: 16 bit hardware addresses
  *
- * In Oct 2008 the component has been extended in order to select channels
- * by calculating average/sigma and applying thresholds.
  *
- * TheAliAltroDecoder is used as input decoder to read and scan the
+ * The AliAltroRawStreamV3 is used as input decoder to read and scan the
  * Altro Raw data.
  * 
  * <h2>General properties:</h2>
@@ -91,19 +98,6 @@ class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
   /** assignment operator prohibited */
   AliHLTAltroChannelSelectorComponent& operator=(const AliHLTAltroChannelSelectorComponent&);
 
-  /**
-   * Copy a data block at the end of a buffer.
-   * The source buffer is inserted at given position relative to the buffer
-   * end.
-   * @param pTgt       target buffer
-   * @param capacity   capacity (size) of the buffer
-   * @param position   porition relative to the END of the buffer
-   * @param pSrc       source buffer to be copied
-   * @param size       size of the source buffer
-   * @return copied size, neg error code if failed
-   */
-  int CopyBlockToEnd(AliHLTUInt8_t* pTgt, unsigned capacity, unsigned position, void* pSrc, unsigned size);
-
   /** skip corrupted channels */
   bool fSkipCorrupted; //!transient
 
@@ -113,9 +107,13 @@ class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
   unsigned int fStartTimeBin; //!transient
   unsigned int fEndTimeBin; //!transient
   unsigned int fSignalThreshold; //!transient
-  unsigned int fRMSThreshold; //!transient
+  float fRMSThreshold; //!transient
+  bool fMakeHistogram; //!transient
+  
+  TH1F *fhThreshold;//! Histgram of the "threshold value" 
+  TH1F *fhRMS;//! Histgrams of the "RMS value"
 
-  ClassDef(AliHLTAltroChannelSelectorComponent, 2);
+  ClassDef(AliHLTAltroChannelSelectorComponent, 0);
 };
 
 #endif