]>
Commit | Line | Data |
---|---|---|
6d17f6d5 | 1 | // -*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
c12197a2 | 4 | #ifndef ALIHLTTPCNOISEMAPCOMPONENT_H |
5 | #define ALIHLTTPCNOISEMAPCOMPONENT_H | |
6 | ||
6d17f6d5 | 7 | //* This file is property of and copyright by the ALICE HLT Project * |
8 | //* ALICE Experiment at CERN, All rights reserved. * | |
9 | //* See cxx source for full Copyright notice * | |
c12197a2 | 10 | |
11 | /** @file AliHLTTPCNoiseMapComponent.h | |
12 | @author Kalliopi Kanaki | |
13 | @date | |
21f63108 | 14 | @brief Component for plotting TPC data and applying noise map |
c12197a2 | 15 | */ |
16 | ||
c12197a2 | 17 | #include "AliHLTProcessor.h" |
c12197a2 | 18 | |
6d17f6d5 | 19 | //forward declarations |
c12197a2 | 20 | class AliHLTTPCDigitReader; |
6d17f6d5 | 21 | class TH2; |
21f63108 | 22 | class AliTPCCalPad; |
c12197a2 | 23 | /** |
24 | * @class AliHLTTPCNoiseMapComponent | |
deeb9f12 | 25 | * Implementation of the component to fill histograms with TPC noise and read |
26 | * the noise map from OCDB by request. | |
c12197a2 | 27 | * The component implements the interface methods of the @ref AliHLTProcessor. |
28 | * It reads the data pad by pad and fills histograms. The output is unpacked and | |
29 | * sent to the clulsterfinder. | |
30 | * | |
31 | * The component has the following component arguments: | |
21f63108 | 32 | * |
33 | * The histograms are filled on partition level and no argument is foreseen for this. | |
34 | * | |
deeb9f12 | 35 | * -plot-side-a Histograms the TPC side A |
c12197a2 | 36 | * |
deeb9f12 | 37 | * -plot-side-c Histograms the TPC side C |
c12197a2 | 38 | * |
deeb9f12 | 39 | * -apply-noisemap Reads a noise map from a file and subtracts the value contained in every pad from the data |
21f63108 | 40 | * The above option is going to be removed, it makes no sense to read the noise map as |
41 | * many times as the partitions. | |
42 | * | |
43 | * -resetHistograms Resets histograms | |
44 | * | |
c12197a2 | 45 | * |
46 | * @ingroup alihlt_tpc | |
47 | */ | |
21f63108 | 48 | |
c12197a2 | 49 | class AliHLTTPCNoiseMapComponent : public AliHLTProcessor { |
50 | ||
51 | public: | |
6d17f6d5 | 52 | |
53 | /** standard constructor */ | |
54 | AliHLTTPCNoiseMapComponent(); | |
55 | /** destructor */ | |
56 | virtual ~AliHLTTPCNoiseMapComponent(); | |
c12197a2 | 57 | |
c12197a2 | 58 | // Public functions to implement AliHLTComponent's interface. |
59 | // These functions are required for the registration process | |
60 | ||
6d17f6d5 | 61 | /** interface function, see @ref AliHLTComponent for description */ |
62 | const char* GetComponentID(); | |
63 | /** interface function, see @ref AliHLTComponent for description */ | |
64 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
65 | /** interface function, see @ref AliHLTComponent for description */ | |
66 | AliHLTComponentDataType GetOutputDataType(); | |
67 | /** interface function, see @ref AliHLTComponent for description */ | |
68 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); | |
69 | /** interface function, see @ref AliHLTComponent for description */ | |
70 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
71 | /** interface function, see @ref AliHLTComponent for description */ | |
72 | AliHLTComponent* Spawn(); | |
73 | /** function for acting on the saving and cleaning histograms, after they are filled */ | |
deeb9f12 | 74 | void MakeHistosPublic(); |
c12197a2 | 75 | |
76 | protected: | |
77 | ||
78 | // Protected functions to implement AliHLTComponent's interface. | |
79 | // These functions provide initialization as well as the actual processing capabilities of the component. | |
80 | ||
81 | int DoInit( int argc, const char** argv ); | |
82 | int DoDeinit(); | |
deeb9f12 | 83 | int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); |
c12197a2 | 84 | int Reconfigure(const char* cdbEntry, const char* chainId); |
85 | ||
86 | using AliHLTProcessor::DoEvent; | |
87 | ||
88 | private: | |
89 | ||
90 | int Configure(const char* arguments); | |
6d17f6d5 | 91 | |
c12197a2 | 92 | /** copy constructor prohibited */ |
93 | AliHLTTPCNoiseMapComponent(const AliHLTTPCNoiseMapComponent&); | |
94 | ||
95 | /** assignment operator prohibited */ | |
96 | AliHLTTPCNoiseMapComponent& operator=(const AliHLTTPCNoiseMapComponent&); | |
97 | ||
21f63108 | 98 | void ResetHistograms(); |
99 | ||
c12197a2 | 100 | /** the reader object for data decoding */ |
6d17f6d5 | 101 | AliHLTUInt32_t fSpecification; //!transient |
21f63108 | 102 | AliTPCCalPad *noisePad; //!transient |
deeb9f12 | 103 | //AliHLTTPCDigitReader *pDigitReader; |
6d17f6d5 | 104 | |
deeb9f12 | 105 | Bool_t fPlotSideA; //!transient |
106 | Bool_t fPlotSideC; //!transient | |
107 | Bool_t fApplyNoiseMap; //!transient | |
21f63108 | 108 | Bool_t fResetHistograms;//!transient |
deeb9f12 | 109 | Bool_t fIsPacked; //!transient |
110 | Bool_t fIsUnpacked; //!transient | |
21f63108 | 111 | |
112 | Int_t fCurrentSlice; //!transient | |
113 | Int_t fCurrentPartition; //!transient | |
114 | Int_t fCurrentRow; //!transient | |
deeb9f12 | 115 | |
21f63108 | 116 | TH2 *fHistPartition; //!transient |
117 | TH2 *fHistSideA; //!transient | |
118 | TH2 *fHistSideC; //!transient | |
119 | TH2 *fHistCDBMap; //!transient | |
deeb9f12 | 120 | |
21f63108 | 121 | ClassDef(AliHLTTPCNoiseMapComponent, 2) |
c12197a2 | 122 | }; |
123 | ||
124 | #endif |