]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/SampleLib/AliHLTSampleRawAnalysisComponent.h
adding new sample component for RAW data analysis
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTSampleRawAnalysisComponent.h
CommitLineData
79965b8c 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTSAMPLERAWANALYSISCOMPONENT_H
4#define ALIHLTSAMPLERAWANALYSISCOMPONENT_H
5
6//* This file is property of and copyright by the ALICE HLT Project *
7//* ALICE Experiment at CERN, All rights reserved. *
8//* See cxx source for full Copyright notice */
9
10/// @file AliHLTSampleRawAnalysisComponent.h
11/// @author Matthias Richter
12/// @date 2010-08-29
13/// @brief A sample processing component for raw data
14/// @ingroup alihlt_tutorial
15
16#include "AliHLTProcessor.h"
17
18class AliRawReaderMemory;
19
20/**
21 * @class AliHLTSampleRawAnalysisComponent
22 * An example how to implement an HLT analysis component for raw data.
23 * The class features the AliHLTComponent interface for HLT processing
24 * components. The interface allows to run such components in either
25 * the (sequential) AliSimulation/AliReconstruction framework or the
26 * parallel HLT online processing framework.
27 *
28 * An example to run the component can be found in macro sampleRawAnalysis.C
29 * in the folder HLT/exa.
30 *
31 * Component fetches raw data input objects in DDL format and prints
32 * some basic properties of the CommonDataHeader. It also instantiates a
33 * RawReader in order to be used with some reconstruction.
34 *
35 * Raw data (DDL) bloxks are sent within the HLT chain with data type
36 * kAliHLTDataTypeDDLRaw (see AliHLTComponentDataType). E.g Raw data
37 * from TPC has data type kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC,
38 * and from SPD kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSPD. A 32 bit
39 * data specification allows to differentiate between the DDL numbers
40 * for one detector. For all detectors having not more than 32 links
41 * the link is indicated by the corresponding bit in the specification
42 * word. E.g. for link #3 bit #3 is set which gives 8 (Please note that
43 * counting starts at 0).
44 *
45 * <h2>General properties:</h2>
46 *
47 * Component ID: \b SampleRawAnalysis <br>
48 * Library: \b libAliHLTSample.so <br>
49 * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
50 * Output Data Types: @ref kAliHLTDataType|kAliHLTDataOriginSample
51 * {ROOTOBAR:SMPL} <br>
52 *
53 * <h2>Mandatory arguments:</h2>
54 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
55 * Argument scan is implemented in the function ScanConfigurationArgument().
56 * see @ref alihltcomponent-initialization-ocdb.
57 * Please provide specific descriptions and implementations.
58 * \li -mandatory <i> teststring </i> <br>
59 *
60 *
61 * <h2>Optional arguments:</h2>
62 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
63 * \li -oprional1 <i> teststring </i> <br>
64 * an argument with one parameter
65 * \li -verbose <br>
66 * print some comments
67 *
68 * <h2>Configuration:</h2>
69 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
70 *
71 * <h2>Default CDB entries:</h2>
72 * The component has just one default CDB entry in
73 * <tt>HLT/ConfigSample/SampleRawAnalysis</tt>.
74 * It does not load any configuration from the global <tt>ConfigHLT</tt>
75 * folder.
76 * \li -TObjString object holding a string with the configuration parameters
77 * explained above
78 *
79 * <h2>Performance:</h2>
80 * The component does not any event data processing.
81 *
82 * <h2>Memory consumption:</h2>
83 * The component does not any event data processing.
84 *
85 * <h2>Output size:</h2>
86 * The component has no output data.
87 *
88 * @ingroup alihlt_tutorial
89 */
90class AliHLTSampleRawAnalysisComponent : public AliHLTProcessor {
91public:
92 AliHLTSampleRawAnalysisComponent();
93 virtual ~AliHLTSampleRawAnalysisComponent();
94
95 // AliHLTComponent interface functions
96 const char* GetComponentID();
97 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
98 AliHLTComponentDataType GetOutputDataType();
99 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
100 void GetOCDBObjectDescription( TMap* const targetMap);
101
102 // Spawn function, return new class instance
103 AliHLTComponent* Spawn();
104
105 protected:
106 // AliHLTComponent interface functions
107 int DoInit( int argc, const char** argv );
108 int DoDeinit();
109 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
110 int ScanConfigurationArgument(int argc, const char** argv);
111 int Reconfigure(const char* cdbEntry, const char* chainId);
112 int ReadPreprocessorValues(const char* modules);
113
114 using AliHLTProcessor::DoEvent;
115
116private:
117 /** copy constructor prohibited */
118 AliHLTSampleRawAnalysisComponent(const AliHLTSampleRawAnalysisComponent&);
119 /** assignment operator prohibited */
120 AliHLTSampleRawAnalysisComponent& operator=(const AliHLTSampleRawAnalysisComponent&);
121
122 /// verbosity level
123 int fVerbosity; //! transient
124
125 /// rawreader instance
126 AliRawReaderMemory* fRawReader; //! transient
127
128 ClassDef(AliHLTSampleRawAnalysisComponent, 0)
129};
130#endif