]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/CALO/AliHLTCaloRawAnalyzerComponentv3.h
- removing obsolete file
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloRawAnalyzerComponentv3.h
CommitLineData
178dd351 1
2/**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
5 * *
6 * Primary Authors: Per Thomas Hille, Oystein Djuvsland *
7 * *
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 **************************************************************************/
16
17
18#ifndef ALIHLTCALORAWANALYZERCOMPONENTV3_H
19#define ALIHLTCALORAWANALYZERCOMPONENTV3_H
20
21
22/**
23 * Raw data analyzer component base class for PHOS HLT
24 *
25 * @file AliHLTCaloRawAnalyzerComponentv3.h
26 * @author Oystein Djuvsland
27 * @date
7fbe22e7 28 * @brief Extraction of Amplitude and Peak position for PHOS/EMCAL HLT
178dd351 29*/
30
31// see below for class documentation
32// or
33// refer to README to build package
34// or
35// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
36
178dd351 37
72a884c8 38class AliCaloRawAnalyzer;
178dd351 39class AliHLTCaloRcuCellEnergyDataStruct;
40class AliHLTCaloMapper;
41class AliHLTCaloSanityInspector;
42class AliHLTCaloDigitMaker;
43class AliHLTCaloDigitContainerDataStruct;
44class AliRawReaderMemory;
45class AliAltroRawStreamV3;
46
72a884c8 47
178dd351 48/**
49 * @class AliHLTCaloRawAnalyzerComponentv3
50 * This the new and fast version of the component taking care of the decoding and energy and timing
51 * extraction of the raw data from PHOS.
52 *
53 * <h2>General properties:</h2>
54 *
55 * Component ID: \b PhosRawAnalyzerv3 <br>
56 * Library: \b libAliHLTCalo.so <br>
57 * Input Data Types: @ref <br>
58 * Output Data Types: @ref AliHLTCaloDefinitions::fgkChannelDataType<br>
59 *
60 * <h2>Mandatory arguments:</h2>
61 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
62 * \li No mandatory arguments for component <br>
63 *
64 * <h2>Optional arguments:</h2>
65 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
66 * \li -offset <i> value </i> <br>
67 * gives the offset added to the data during zero suppression (default value: 0)
68 * \li -bunchsizecut <i> value </i> <br>
69 * minimum number of samples a bunch must contain to be considered (default value: 0)
70 * \li -minpeakposition <i> value </i> <br>
71 * cut on minimum postion of the peak in the bunch (defaul value: 0)
72 * \li -maxpeakposition <i> value </i> <br>
73 * cut on maximum postion of the peak in the bunch (defaul value: 100)
74 *
75 * <h2>Configuration:</h2>
76 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
77 * \li No configuration arguments
78 *
79 * <h2>Default CDB entries:</h2>
80 * \li No CDB entry yet, will come.
81 *
82 * <h2>Performance:</h2>
83 * Pretty good (~ 3 kHz), depends on amount of data...
84 *
85 * <h2>Memory consumption:</h2>
86 * Depends on the amount of data, but pretty godd
87 *
88 * <h2>Output size:</h2>
89 * Depends on the amount of data...
90 *
91 * More detailed description. (Soon)
92 *
93 * @ingroup alihlt_phos
94 */
95
3800a654 96
4bc4be28 97// #include "AliHLTProcessor.h"
98// #include "AliHLTCaloDefinitions.h"
99
4f4b7ba4 100#include "AliHLTCaloConstantsHandler.h"
7fbe22e7 101#include "AliHLTCaloProcessor.h"
097e19a7 102
baf0b40f 103
178dd351 104class AliHLTCaloMapper;
105
106
7fbe22e7 107class AliHLTCaloRawAnalyzerComponentv3 : public AliHLTCaloProcessor, protected AliHLTCaloConstantsHandler
178dd351 108{
109 public:
110
77f350f7 111 /** Constructor must be initialized to specific calorimeter */
112 AliHLTCaloRawAnalyzerComponentv3(TString det);
178dd351 113 virtual ~AliHLTCaloRawAnalyzerComponentv3();
a9705807 114 virtual int DoInit(int argc =0, const char** argv = 0) ;
c375e15d 115 virtual int DoDeinit();
178dd351 116 virtual const char* GetComponentID() = 0;
72a884c8 117 virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list) = 0;
72a884c8 118 virtual AliHLTComponentDataType GetOutputDataType() = 0;
f9baa094 119 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
178dd351 120 virtual AliHLTComponent* Spawn() = 0;
121
122 protected:
1e46316a 123 bool CheckInputDataType(const AliHLTComponentDataType &datatype);
178dd351 124 virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
baf0b40f 125 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
1e46316a 126 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
127
178dd351 128
129 /**
130 * Do the real processing in the component
131 * @param iter is the pointer to the data blocks
132 * @param outputPtr is the pointer to the output buffer
133 * @param size is the available size for output
134 * @param totSize is the total size used for output
135 * @return the size output size used
136 */
1e46316a 137 virtual Int_t DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr,
138 const AliHLTUInt32_t size, UInt_t& totSize);
178dd351 139
1e46316a 140
141 protected:
142 virtual void InitMapping(const int specification ) = 0;
143 void PrintDebugInfo();
72a884c8 144 AliCaloRawAnalyzer *fAnalyzerPtr; //COMMENT
4f4b7ba4 145 AliHLTCaloMapper *fMapperPtr; //COMMENT
1e46316a 146 AliHLTUInt32_t fCurrentSpec;
1e46316a 147 bool fDebug;
44175a17 148
178dd351 149 private:
77f350f7 150 AliHLTCaloRawAnalyzerComponentv3();
178dd351 151 AliHLTCaloRawAnalyzerComponentv3(const AliHLTCaloRawAnalyzerComponentv3 & );
178dd351 152 AliHLTCaloRawAnalyzerComponentv3 & operator = (const AliHLTCaloRawAnalyzerComponentv3 &);
baf0b40f 153 AliHLTCaloSanityInspector *fSanityInspectorPtr; //!transient /** Pointer to object which may check the integrity of the data */
178dd351 154
155 /** Pointer to the raw data reader which reads from memory */
156 AliRawReaderMemory* fRawReaderMemoryPtr; //!transient
157
158 /** Pointer to the raw stream */
159 AliAltroRawStreamV3* fAltroRawStreamPtr; //!transient
160
161 /** Describing which algorithm we are using */
162 Short_t fAlgorithm; //COMMENT
163
164 /** The offset applied before ZS */
165 Int_t fOffset; //COMMENT
166
167 /** The minimum length a bunch can have to be considered */
168 Int_t fBunchSizeCut; //COMMENT
169
170 /** The lowest position a peak can have to be considered */
171 Int_t fMinPeakPosition; //COMMENT
172
173 /** The maximum position a peak can have to be considered */
174 Int_t fMaxPeakPosition; //COMMENT
175
baf0b40f 176 /** Should we push the raw data when the channel is crazy? */
c6d582d5 177 Bool_t fDoPushBadRawData; //COMMENT
178
179 /** Should we push all raw data (using the raw data writer) */
baf0b40f 180 Bool_t fDoPushRawData; //COMMENT
1e46316a 181
178dd351 182 class RawDataWriter
183 {
184 public:
77f350f7 185 RawDataWriter(AliHLTCaloConstants* cConst);
1e46316a 186 virtual ~RawDataWriter();
178dd351 187 void NewChannel( );
188 void WriteBunchData(const UShort_t *bunchdata, const int length, const UInt_t starttimebin );
189 void ResetBuffer();
190 void SetChannelId( const UShort_t channeldid );
178dd351 191 int CopyBufferToSharedMemory(UShort_t *memPtr, const int sizetotal, const int sizeused );
192 void NewEvent();
1e46316a 193
f3e5fbc0 194 private:
77f350f7 195 RawDataWriter();
178dd351 196 RawDataWriter (const RawDataWriter & );
197 RawDataWriter & operator = (const RawDataWriter &);
198 void Init();
178dd351 199 UShort_t* fRawDataBuffer;
200 int fCurrentChannelSize;
201 int fBufferIndex;
202 int fBufferSize;
203 UShort_t *fCurrentChannelIdPtr;
204 UShort_t *fCurrentChannelSizePtr;
205 UShort_t *fCurrentChannelDataPtr;
206 int fTotalSize;
207 };
208
209 RawDataWriter *fRawDataWriter;
8daca632 210 ClassDef(AliHLTCaloRawAnalyzerComponentv3, 1)
4f4b7ba4 211
178dd351 212};
213
214#endif
215