added AliFlatExternalTrackParam to HLT global library
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCAgent.h
CommitLineData
51e9ec2a 1//-*- Mode: C++ -*-
2// $Id$
5578cf60 3
4#ifndef ALIHLTTPCAGENT_H
5#define ALIHLTTPCAGENT_H
e26c6356 6//* This file is property of and copyright by the *
51e9ec2a 7//* ALICE Experiment at CERN, All rights reserved. *
8//* See cxx source for full Copyright notice *
5578cf60 9
51e9ec2a 10// @file AliHLTTPCAgent.h
11// @author Matthias Richter
12// @date
13// @brief Agent of the libAliHLTTPC library
14// @note
5578cf60 15
16#include "AliHLTModuleAgent.h"
626bfcc1 17#include "AliHLTOUTHandlerEquId.h"
5578cf60 18
73449074 19class AliHLTOUTHandlerChain;
20
5578cf60 21/**
22 * @class AliHLTTPCAgent
23 * This is the agent for the AliHLTTPC library.
24 *
e26c6356 25 * Defined reconstruction chains:
26 * - TPC-raw-data
27 * - TPC-hwcfdata
28 * - TPC-raw-clusters
29 * - TPC-clusters
30 * - TPC-global-merger
31 * - TPC-mcTrackMarker
32 * - TPC-compression
33 *
34 * Default reconstruction chains:
35 * - simulation: TPC-compression
36 * - reconstruction: TPC-compression-emulation
37 *
5578cf60 38 * @ingroup alihlt_system
39 */
40class AliHLTTPCAgent : public AliHLTModuleAgent {
41 public:
42 /**
43 * standard constructor. The agent is automatically registered in the
44 * global agent manager
45 */
46 AliHLTTPCAgent();
47 /** destructor */
48 virtual ~AliHLTTPCAgent();
49
50 /**
51 * Register all configurations belonging to this module with the
52 * AliHLTConfigurationHandler. The agent can adapt the configurations
53 * to be registered to the current AliRoot setup by checking the
54 * runloader.
55 * @param handler the configuration handler
3a7c0444 56 * @param rawReader AliRawReader instance
5578cf60 57 * @param runloader AliRoot runloader
58 * @return neg. error code if failed
59 */
60 int CreateConfigurations(AliHLTConfigurationHandler* handler,
dee38f1b 61 AliRawReader* rawReader=NULL,
5578cf60 62 AliRunLoader* runloader=NULL) const;
63
64 /**
65 * Get the top configurations belonging to this module.
66 * A top configuration describes a processing chain. It can simply be
67 * described by the last configuration(s) in the chain.
68 * The agent can adapt the configurations to be registered to the current
69 * AliRoot setup by checking the runloader.
3a7c0444 70 * @param rawReader AliRawReader instance
5578cf60 71 * @param runloader AliRoot runloader
72 * @return number of configurations, neg. error code if failed
73 */
dee38f1b 74 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
75 AliRunLoader* runloader=NULL) const;
5578cf60 76
77 /**
78 * Component libraries which the configurations of this agent depend on.
79 * @return list of component libraries as a blank-separated string.
80 */
81 const char* GetRequiredComponentLibraries() const;
82
f3506ea2 83 /**
84 * Register components for the AliHLTTPC library.
f08578f1 85 * @param [in] pHandler instance of the component handler
f3506ea2 86 */
87 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
626bfcc1 88
89 /**
90 * Get handler decription for TPC data in the HLTOUT data stream.
f08578f1 91 * @param [in] dt data type of the block
92 * @param [in] spec specification of the block
93 * @param [out] desc handler description
626bfcc1 94 * @return 1 if the agent can provide a handler, 0 if not
95 */
96 int GetHandlerDescription(AliHLTComponentDataType dt,
97 AliHLTUInt32_t spec,
98 AliHLTOUTHandlerDesc& desc) const;
99
100 /**
101 * Get specific handler for TPC data in the HLTOUT data stream.
f08578f1 102 * @param [in] dt data type of the block
103 * @param [in] spec specification of the block
626bfcc1 104 * @return pointer to handler
105 */
106 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
107 AliHLTUInt32_t spec);
108
109 /**
110 * Delete an HLTOUT handler.
111 * @param pInstance pointer to handler
112 */
113 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
114
115 /**
116 * The handler for TPC RAW data in the HLTOUT stream.
117 */
118 class AliHLTTPCRawDataHandler : public AliHLTOUTHandlerEquId {
119 public:
120 /** constructor */
121 AliHLTTPCRawDataHandler();
122 /** destructor */
123 ~AliHLTTPCRawDataHandler();
124
125 /**
126 * Process a data block.
127 * Decode specification and return equipment id of the data block.
128 * The data itsself i untouched.
129 * @return equipment id the block should be used for.
130 */
131 int ProcessData(AliHLTOUT* pData);
132
133 private:
134
135 };
136
994a608f 137 enum EOptions {
138 // indicate cluster id data blocks in the HLTOUT
139 kHaveCompressedClusterIdDataBlock = BIT(15)
140 };
141
5578cf60 142 protected:
143
144 private:
626bfcc1 145 /** copy constructor prohibited */
146 AliHLTTPCAgent(const AliHLTTPCAgent&);
147 /** assignment operator prohibited */
148 AliHLTTPCAgent& operator=(const AliHLTTPCAgent&);
149
150 /** handler for TPC raw data in the HLTOUT stream */
151 AliHLTTPCRawDataHandler* fRawDataHandler; //!transient
626bfcc1 152
73449074 153 /** afterburner for {'TRAKSEGS':'TPC '} in the HLTOUT stream */
154 AliHLTOUTHandlerChain* fTracksegsDataHandler; //! transient
155
51e9ec2a 156 /// handler for {'CLUSTERS':'TPC '}
157 AliHLTOUTHandlerChain* fClustersDataHandler; //! transient
158
994a608f 159 /// handler for data blocks related to data compression
160 AliHLTOUTHandlerChain* fCompressionMonitorHandler; //! transient
161
22240104 162 ClassDef(AliHLTTPCAgent, 0);
5578cf60 163};
164
165#endif