4 #ifndef ALIHLTTPCAGENT_H
5 #define ALIHLTTPCAGENT_H
6 //* This file is property of and copyright by the *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice *
10 // @file AliHLTTPCAgent.h
11 // @author Matthias Richter
13 // @brief Agent of the libAliHLTTPC library
16 #include "AliHLTModuleAgent.h"
17 #include "AliHLTOUTHandlerEquId.h"
19 class AliHLTOUTHandlerChain;
22 * @class AliHLTTPCAgent
23 * This is the agent for the AliHLTTPC library.
25 * Defined reconstruction chains:
34 * Default reconstruction chains:
35 * - simulation: TPC-compression
36 * - reconstruction: TPC-compression-emulation
38 * @ingroup alihlt_system
40 class AliHLTTPCAgent : public AliHLTModuleAgent {
43 * standard constructor. The agent is automatically registered in the
44 * global agent manager
48 virtual ~AliHLTTPCAgent();
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
55 * @param handler the configuration handler
56 * @param rawReader AliRawReader instance
57 * @param runloader AliRoot runloader
58 * @return neg. error code if failed
60 int CreateConfigurations(AliHLTConfigurationHandler* handler,
61 AliRawReader* rawReader=NULL,
62 AliRunLoader* runloader=NULL) const;
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.
70 * @param rawReader AliRawReader instance
71 * @param runloader AliRoot runloader
72 * @return number of configurations, neg. error code if failed
74 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
75 AliRunLoader* runloader=NULL) const;
78 * Component libraries which the configurations of this agent depend on.
79 * @return list of component libraries as a blank-separated string.
81 const char* GetRequiredComponentLibraries() const;
84 * Register components for the AliHLTTPC library.
85 * @param [in] pHandler instance of the component handler
87 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
90 * Get handler decription for TPC data in the HLTOUT data stream.
91 * @param [in] dt data type of the block
92 * @param [in] spec specification of the block
93 * @param [out] desc handler description
94 * @return 1 if the agent can provide a handler, 0 if not
96 int GetHandlerDescription(AliHLTComponentDataType dt,
98 AliHLTOUTHandlerDesc& desc) const;
101 * Get specific handler for TPC data in the HLTOUT data stream.
102 * @param [in] dt data type of the block
103 * @param [in] spec specification of the block
104 * @return pointer to handler
106 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
107 AliHLTUInt32_t spec);
110 * Delete an HLTOUT handler.
111 * @param pInstance pointer to handler
113 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
116 * The handler for TPC RAW data in the HLTOUT stream.
118 class AliHLTTPCRawDataHandler : public AliHLTOUTHandlerEquId {
121 AliHLTTPCRawDataHandler();
123 ~AliHLTTPCRawDataHandler();
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.
131 int ProcessData(AliHLTOUT* pData);
138 // indicate cluster id data blocks in the HLTOUT
139 kHaveCompressedClusterIdDataBlock = BIT(15)
145 /** copy constructor prohibited */
146 AliHLTTPCAgent(const AliHLTTPCAgent&);
147 /** assignment operator prohibited */
148 AliHLTTPCAgent& operator=(const AliHLTTPCAgent&);
150 /** handler for TPC raw data in the HLTOUT stream */
151 AliHLTTPCRawDataHandler* fRawDataHandler; //!transient
153 /** afterburner for {'TRAKSEGS':'TPC '} in the HLTOUT stream */
154 AliHLTOUTHandlerChain* fTracksegsDataHandler; //! transient
156 /// handler for {'CLUSTERS':'TPC '}
157 AliHLTOUTHandlerChain* fClustersDataHandler; //! transient
159 /// handler for data blocks related to data compression
160 AliHLTOUTHandlerChain* fCompressionMonitorHandler; //! transient
162 ClassDef(AliHLTTPCAgent, 0);