]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/HWCFemulator/AliHLTTPCHWCFConsistencyControlComponent.h
Emulation of FPGA clusterfinder
[u/mrichter/AliRoot.git] / HLT / TPCLib / HWCFemulator / AliHLTTPCHWCFConsistencyControlComponent.h
1 #ifndef ALIHLTTPCHWCFCONSISTENCYCONTROLCOMPONENT_H
2 #define ALIHLTTPCHWCFCONSISTENCYCONTROLCOMPONENT_H
3
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //* See cxx source for full Copyright notice                               *
7
8 //  @file   AliHLTTPCHWCFConsistencyControlComponent.h
9 //  @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
10 //  @author Torsten Alt <talt@cern.ch> 
11 //  @brief  Comparison of TPC clusters produced by FPGA clusterfinder and by FPGA Emulator 
12 //  @brief  ( see AliHLTTPCHWCFEmulator class )
13 //  @note
14
15
16
17 #include "AliHLTProcessor.h"
18 #include "AliHLTComponentBenchmark.h"
19
20 /**
21  * @class AliHLTTPCHWCFConsistencyControlComponent
22  * The FPGA clusterfinder emulator for TPC
23  * Comparison of TPC clusters produced by FPGA clusterfinder and by FPGA Emulator
24  * ( see AliHLTTPCHWCFEmulator class )
25  *
26  * <h2>General properties:</h2>
27  *
28  * Component ID: \b TPCHWCFConsistenyControl <br>
29  * Library: \b libAliHLTTPC
30  * Input Data Types: @ref  AliHLTTPCDefinitions::fgkHWClustersDataType <br>
31  * Output Data Types: @ref  <br> 
32  *
33  *
34  * Mandatory arguments: <br>
35  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36  *
37  * Optional arguments: <br>
38  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
39  *
40  * <h2>Default CDB entries:</h2>
41  * None
42  *
43  * @ingroup alihlt_tpc_components
44  */
45 class AliHLTTPCHWCFConsistencyControlComponent : public AliHLTProcessor
46 {
47  public:      
48   /**
49    * constructor 
50    */
51   AliHLTTPCHWCFConsistencyControlComponent();
52   /** destructor */
53   virtual ~AliHLTTPCHWCFConsistencyControlComponent();
54   
55   // Public functions to implement AliHLTComponent's interface.
56   // These functions are required for the registration process
57
58   /** interface function, see AliHLTComponent for description */
59   const char* GetComponentID();
60
61   /** interface function, see AliHLTComponent for description */
62   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
63
64   /** interface function, see AliHLTComponent for description */
65   AliHLTComponentDataType GetOutputDataType();
66
67   /** interface function, see AliHLTComponent for description */
68   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
69
70   /** interface function, see AliHLTComponent for description */
71   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
72
73   /** interface function, see AliHLTComponent for description */
74   AliHLTComponent* Spawn();
75
76   /** interface function, see @ref AliHLTComponent for description */
77   void GetOCDBObjectDescription( TMap* const targetMap);
78
79  protected:
80   
81   // Protected functions to implement AliHLTComponent's interface.
82   // These functions provide initialization as well as the actual processing
83   // capabilities of the component. 
84   
85      /** @copydoc AliHLTComponent::DoInit
86       */
87     int DoInit( int argc, const char **argv );
88
89     /** @copydoc AliHLTComponent::DoDeinit
90      */
91     int DoDeinit();
92
93     /**  @copydoc @ref AliHLTComponent::Reconfigure
94      */
95     int Reconfigure( const char* cdbEntry, const char* chainId );
96
97     /**  @copydoc @ref AliHLTComponent::ScanConfigurationArgument
98      */
99     int ScanConfigurationArgument(int argc, const char** argv);
100
101     /** @copydoc @ref AliHLTProcessor::DoEvent
102      */
103     int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
104                  AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
105                  AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
106
107      
108     using AliHLTProcessor::DoEvent;
109   
110  private:
111
112   /** copy constructor prohibited */
113   AliHLTTPCHWCFConsistencyControlComponent(const AliHLTTPCHWCFConsistencyControlComponent&);
114
115   /** assignment operator prohibited */
116   AliHLTTPCHWCFConsistencyControlComponent& operator=(const AliHLTTPCHWCFConsistencyControlComponent&);
117
118   /** Set default configuration */
119   void SetDefaultConfiguration();
120
121   /** scan configuration string */
122   int ReadConfigurationString(  const char* arguments );
123
124   /** read configuration from OCDB */
125   int ReadCDBEntry( const char* cdbEntry, const char* chainId );
126
127   /** read configuration from multiple sources */
128   int Configure( const char* cdbEntry, const char* chainId, const char *commandLine );
129
130   AliHLTUInt64_t fNDismatch;// N inconsistent data blocks
131   AliHLTUInt64_t fNBlocks;// N of data blocks processed
132   AliHLTComponentBenchmark fBenchmark; // benchmark
133 };
134 #endif