]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCNoiseMapComponent.h
Coding violations
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCNoiseMapComponent.h
index 38f95965d705bb45e50bd9f8d8630ca63f81fe78..e4e02e5f9eb0006a86d277abbfa48c85318b5169 100644 (file)
+// -*- Mode: C++ -*-
+// $Id$
+
 #ifndef ALIHLTTPCNOISEMAPCOMPONENT_H
 #define ALIHLTTPCNOISEMAPCOMPONENT_H
 
-/* This file is property of and copyright by the ALICE HLT Project        * 
- * ALICE Experiment at CERN, All rights reserved.                         *
- * See cxx source for full Copyright notice                               */
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//* See cxx source for full Copyright notice                               *
 
 /** @file   AliHLTTPCNoiseMapComponent.h
     @author Kalliopi Kanaki
     @date   
-    @brief  Component for Noise Map
+    @brief  Component for plotting TPC data and applying noise map
 */
 
-// see below for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
 #include "AliHLTProcessor.h"
-#include "TH2.h"
 
+//forward declarations
 class AliHLTTPCDigitReader;
+class TH1;
+class TH2;
+class AliTPCCalPad;
 
 /**
  * @class AliHLTTPCNoiseMapComponent
- * Implementation of the component to fill histograms with TPC noise by request.
+ * 
+ * Implementation of a component to fill histograms with TPC raw output 
+ * and read the noise map from HCDB by request.
+ * 
  * The component implements the interface methods of the @ref AliHLTProcessor.
- * It reads the data pad by pad and fills histograms. The output is unpacked and 
- * sent to the clulsterfinder.
+ * It reads the raw data pad by pad and fills histograms per partition
  * 
  * The component has the following component arguments:
- * - adc-threshold   ADC count threshold for zero suppression.
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b TPCNoiseMap <br>
+ * Library: \b libAliHLTTPC.so     <br>
+ * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
+ * Output Data Types: @ref kAliHLTDataTypeHistogram <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -read-noisemap      <i> teststring   </i> <br>
+ *      Reads the noise map from the HCDB (and plots it in a histogram)
+ *
+ * \li -reset-histograms       <br>
+ *      Resets histograms
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -config1      <i> teststring   </i> <br>
+ *      a configuration argument with one parameter
+ * \li -config2                            <br>
+ *      a configuration argument without parameters
  *
- * - rms-threshold   RMS threshold for zero suppression.
- *          
- * - first-timebin   The first timebin for zero suppression
+ * <h2>Default CDB entries:</h2>
+ * The component has two CDB entries in
+ * <tt>HLT/ConfigTPC/TPCNoiseMapComponent</tt>.
+ * It does not load any configuration from the global <tt>ConfigHLT</tt>
+ * folder.
+ * \li -TObjString object holding a string with the configuration parameters
+ *      explained above
  *
- * - last-timebin    The last timebin for zero suppression
+ * <h2>Performance:</h2>
+ * No clue
  *
- * - occupancy-limit Minimum number of timebins with signal
+ * <h2>Memory consumption:</h2>
+ * No clue
  *
- * - sort-pads Flag to switch on pad sorting(needed by the SORTED clusterfinder)
+ * <h2>Output size:</h2>
+ * Much data
  *
- * @ingroup alihlt_tpc
- */
+ * More detailed description.
+ *
+ * @ingroup alihlt_tpc_components
+ */ 
+
 class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
     
    public:
-        
-   AliHLTTPCNoiseMapComponent();          //constructor           
-   virtual ~AliHLTTPCNoiseMapComponent(); //destructor
-
+   
+   /** standard constructor */    
+   AliHLTTPCNoiseMapComponent();           
+   /** destructor */
+   virtual ~AliHLTTPCNoiseMapComponent();
 
       // Public functions to implement AliHLTComponent's interface.
       // These functions are required for the registration process
       
-      const char* GetComponentID();                                                       //interface function, see @ref AliHLTComponent for description  
-      void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                     //interface function, see @ref AliHLTComponent for description  
-      AliHLTComponentDataType GetOutputDataType();                                        //interface function, see @ref AliHLTComponent for description  
-      int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                       //interface function, see @ref AliHLTComponent for description
-      virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); //interface function, see @ref AliHLTComponent for description
-      AliHLTComponent* Spawn();                                                           //interface function, see @ref AliHLTComponent for description
-      void SaveAndResetHistograms();
+      /** interface function, see AliHLTComponent for description */
+      const char* GetComponentID();                                                         
+      /** interface function, see AliHLTComponent for description */
+      void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                       
+      /** interface function, see AliHLTComponent for description */
+      AliHLTComponentDataType GetOutputDataType();                                          
+      /** interface function, see AliHLTComponent for description */
+      int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                       
+      /** interface function, see AliHLTComponent for description */
+      virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); 
+      /** interface function, see AliHLTComponent for description */
+      AliHLTComponent* Spawn();                                                           
+      /** function for acting on the saving and cleaning histograms, after they are filled */
+      void MakeHistosPublic();
   
    protected:
        
@@ -70,9 +112,7 @@ class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
 
       int DoInit( int argc, const char** argv );
       int DoDeinit();
-      int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
-                  AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
-                  AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+      int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
       int Reconfigure(const char* cdbEntry, const char* chainId);
 
       using AliHLTProcessor::DoEvent;
@@ -80,35 +120,37 @@ class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
    private:
    
       int Configure(const char* arguments);
-
+          
       /** copy constructor prohibited */
       AliHLTTPCNoiseMapComponent(const AliHLTTPCNoiseMapComponent&);
 
       /** assignment operator prohibited */
       AliHLTTPCNoiseMapComponent& operator=(const AliHLTTPCNoiseMapComponent&);
+      
+      void InitializeHistograms(UInt_t minSlice, UInt_t maxSlice, UInt_t minPartition, UInt_t maxPartition);
+      void ResetHistograms();
+      
+      AliHLTUInt32_t fSpecification;  //!transient
 
-      /** the reader object for data decoding */
-      AliHLTTPCDigitReader* fDigitReader;  //!transient
-      AliHLTUInt32_t fSpecification;       //!transient
-      AliHLTUInt8_t fMinPatch;             //!transient
-      AliHLTUInt8_t fMaxPatch;             //!transient
+      Bool_t fReadNoiseMap;    //!transient
+      Bool_t fResetHistograms; //!transient      
+      Bool_t fInitHist;        //!transient
 
-      UInt_t fFirstTimeBin;
-      UInt_t fLastTimeBin;
-      UInt_t fNSigmaThreshold;
-      UInt_t fSignalThreshold;
-      UInt_t fMinimumNumberOfSignals;
-      UInt_t fOldRCUFormat;
-      Bool_t fSortPads;
-      Bool_t fNoiseMap;
-      Bool_t fIsPacked;    
-      Bool_t fIsUnpacked;
-      Int_t  fCurrentPatch;
-      Int_t  fCurrentRow;
+      Int_t fCurrentRow; //!transient
       
-      TH2F *hPatch;     
-
-      ClassDef(AliHLTTPCNoiseMapComponent, 0)  
+      TH1 *fHistSignal;     //!transient 
+     
+      TH2 *fHistSideAMaxSignal;  //!transient 
+      TH2 *fHistSideATotSignal;  //!transient 
+      TH2 *fHistSideAPadRMS;     //!transient 
+     
+      TH2 *fHistSideCMaxSignal;  //!transient 
+      TH2 *fHistSideCTotSignal;  //!transient 
+      TH2 *fHistSideCPadRMS;    //!transient 
+     
+      TH2 *fHistCDBMap;     //!transient 
+           
+      ClassDef(AliHLTTPCNoiseMapComponent, 4)
     };
 
 #endif