2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
6 * Primary Authors: Per Thomas Hille, Oystein Djuvsland *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
18 #ifndef ALIHLTPHOSRAWANALYZERCOMPONENTV3_H
19 #define ALIHLTPHOSRAWANALYZERCOMPONENTV3_H
23 * Raw data analyzer component base class for PHOS HLT
25 * @file AliHLTPHOSRawAnalyzerComponentv3.h
26 * @author Oystein Djuvsland
28 * @brief A clusterizer component for PHOS HLT
31 // see below for class documentation
33 // refer to README to build package
35 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
37 #include "AliHLTPHOSRcuProcessor.h"
40 class AliHLTPHOSRawAnalyzer;
41 class AliHLTPHOSRcuCellEnergyDataStruct;
42 class AliHLTPHOSMapper;
43 class AliHLTPHOSSanityInspector;
44 class AliHLTPHOSDigitMaker;
45 class AliHLTPHOSDigitContainerDataStruct;
46 class AliRawReaderMemory;
47 class AliAltroRawStreamV3;
50 * @class AliHLTPHOSRawAnalyzerComponentv3
51 * This the new and fast version of the component taking care of the decoding and energy and timing
52 * extraction of the raw data from PHOS.
54 * <h2>General properties:</h2>
56 * Component ID: \b PhosRawAnalyzerv3 <br>
57 * Library: \b libAliHLTPHOS.so <br>
58 * Input Data Types: @ref <br>
59 * Output Data Types: @ref AliHLTPHOSDefinitions::fgkChannelDataType<br>
61 * <h2>Mandatory arguments:</h2>
62 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
63 * \li No mandatory arguments for component <br>
65 * <h2>Optional arguments:</h2>
66 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
67 * \li -offset <i> value </i> <br>
68 * gives the offset added to the data during zero suppression (default value: 0)
69 * \li -bunchsizecut <i> value </i> <br>
70 * minimum number of samples a bunch must contain to be considered (default value: 0)
71 * \li -minpeakposition <i> value </i> <br>
72 * cut on minimum postion of the peak in the bunch (defaul value: 0)
73 * \li -maxpeakposition <i> value </i> <br>
74 * cut on maximum postion of the peak in the bunch (defaul value: 100)
76 * <h2>Configuration:</h2>
77 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
78 * \li No configuration arguments
80 * <h2>Default CDB entries:</h2>
81 * \li No CDB entry yet, will come.
83 * <h2>Performance:</h2>
84 * Pretty good (~ 3 kHz), depends on amount of data...
86 * <h2>Memory consumption:</h2>
87 * Depends on the amount of data, but pretty godd
89 * <h2>Output size:</h2>
90 * Depends on the amount of data...
92 * More detailed description. (Soon)
94 * @ingroup alihlt_phos
98 class AliHLTPHOSRawAnalyzerComponentv3 : public AliHLTPHOSRcuProcessor
102 /** Standard constructor */
103 AliHLTPHOSRawAnalyzerComponentv3();
106 virtual ~AliHLTPHOSRawAnalyzerComponentv3();
108 /** interface function, see @ref AliHLTComponent for description */
109 virtual int DoInit(int argc =0, const char** argv = 0);
111 /** interface function, see @ref AliHLTComponent for description */
112 virtual int Deinit();
114 /** interface function, see @ref AliHLTComponent for description */
115 virtual const char* GetComponentID() = 0;
117 /** interface function, see @ref AliHLTComponent for description */
118 virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
120 /** interface function, see @ref AliHLTComponent for description */
121 virtual AliHLTComponentDataType GetOutputDataType();
123 /** interface function, see @ref AliHLTComponent for description */
124 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
126 /** interface function, see @ref AliHLTComponent for description */
127 virtual AliHLTComponent* Spawn() = 0;
131 /** interface function, see @ref AliHLTComponent for description */
132 using AliHLTPHOSRcuProcessor::DoEvent;
134 /** interface function, see @ref AliHLTComponent for description */
135 virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
136 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
137 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
140 * Do the real processing in the component
141 * @param iter is the pointer to the data blocks
142 * @param outputPtr is the pointer to the output buffer
143 * @param size is the available size for output
144 * @param totSize is the total size used for output
145 * @return the size output size used
147 virtual Int_t DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr, const AliHLTUInt32_t size, UInt_t& totSize);
150 /** Pointer to an analyzer object used for raw data anlysis */
151 AliHLTPHOSRawAnalyzer *fAnalyzerPtr; //COMMENT
155 /** Keep the copy constructor private since it should not be used */
156 AliHLTPHOSRawAnalyzerComponentv3(const AliHLTPHOSRawAnalyzerComponentv3 & );
158 /** Keep the assignement operator private since it should not be used */
159 AliHLTPHOSRawAnalyzerComponentv3 & operator = (const AliHLTPHOSRawAnalyzerComponentv3 &);
161 /** Mapping from harware address to geometrical address */
162 AliHLTPHOSMapper *fMapperPtr; //!transient
164 /** Pointer to object which may check the integrity of the data */
165 AliHLTPHOSSanityInspector *fSanityInspectorPtr; //!transient
167 /** Pointer to the raw data reader which reads from memory */
168 AliRawReaderMemory* fRawReaderMemoryPtr; //!transient
170 /** Pointer to the raw stream */
171 AliAltroRawStreamV3* fAltroRawStreamPtr; //!transient
173 /** Describing which algorithm we are using */
174 Short_t fAlgorithm; //COMMENT
176 /** The offset applied before ZS */
177 Int_t fOffset; //COMMENT
179 /** The minimum length a bunch can have to be considered */
180 Int_t fBunchSizeCut; //COMMENT
182 /** The lowest position a peak can have to be considered */
183 Int_t fMinPeakPosition; //COMMENT
185 /** The maximum position a peak can have to be considered */
186 Int_t fMaxPeakPosition; //COMMENT