]>
Commit | Line | Data |
---|---|---|
5578cf60 | 1 | // @(#) $Id$ |
2 | ||
3 | #ifndef ALIHLTTPCAGENT_H | |
4 | #define ALIHLTTPCAGENT_H | |
5 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * See cxx source for full Copyright notice */ | |
7 | ||
8 | /** @file AliHLTTPCAgent.h | |
9 | @author Matthias Richter | |
10 | @date | |
11 | @brief Agent of the libAliHLTTPC library | |
12 | */ | |
13 | ||
14 | #include "AliHLTModuleAgent.h" | |
626bfcc1 | 15 | #include "AliHLTOUTHandlerEquId.h" |
5578cf60 | 16 | |
17 | /** | |
18 | * @class AliHLTTPCAgent | |
19 | * This is the agent for the AliHLTTPC library. | |
20 | * | |
21 | * @ingroup alihlt_system | |
22 | */ | |
23 | class AliHLTTPCAgent : public AliHLTModuleAgent { | |
24 | public: | |
25 | /** | |
26 | * standard constructor. The agent is automatically registered in the | |
27 | * global agent manager | |
28 | */ | |
29 | AliHLTTPCAgent(); | |
30 | /** destructor */ | |
31 | virtual ~AliHLTTPCAgent(); | |
32 | ||
33 | /** | |
34 | * Register all configurations belonging to this module with the | |
35 | * AliHLTConfigurationHandler. The agent can adapt the configurations | |
36 | * to be registered to the current AliRoot setup by checking the | |
37 | * runloader. | |
38 | * @param handler the configuration handler | |
3a7c0444 | 39 | * @param rawReader AliRawReader instance |
5578cf60 | 40 | * @param runloader AliRoot runloader |
41 | * @return neg. error code if failed | |
42 | */ | |
43 | int CreateConfigurations(AliHLTConfigurationHandler* handler, | |
dee38f1b | 44 | AliRawReader* rawReader=NULL, |
5578cf60 | 45 | AliRunLoader* runloader=NULL) const; |
46 | ||
47 | /** | |
48 | * Get the top configurations belonging to this module. | |
49 | * A top configuration describes a processing chain. It can simply be | |
50 | * described by the last configuration(s) in the chain. | |
51 | * The agent can adapt the configurations to be registered to the current | |
52 | * AliRoot setup by checking the runloader. | |
3a7c0444 | 53 | * @param rawReader AliRawReader instance |
5578cf60 | 54 | * @param runloader AliRoot runloader |
55 | * @return number of configurations, neg. error code if failed | |
56 | */ | |
dee38f1b | 57 | const char* GetReconstructionChains(AliRawReader* rawReader=NULL, |
58 | AliRunLoader* runloader=NULL) const; | |
5578cf60 | 59 | |
60 | /** | |
61 | * Component libraries which the configurations of this agent depend on. | |
62 | * @return list of component libraries as a blank-separated string. | |
63 | */ | |
64 | const char* GetRequiredComponentLibraries() const; | |
65 | ||
f3506ea2 | 66 | /** |
67 | * Register components for the AliHLTTPC library. | |
68 | * @param pHandler [in] instance of the component handler | |
69 | */ | |
70 | int RegisterComponents(AliHLTComponentHandler* pHandler) const; | |
626bfcc1 | 71 | |
72 | /** | |
73 | * Get handler decription for TPC data in the HLTOUT data stream. | |
74 | * @param dt [in] data type of the block | |
75 | * @param spec [in] specification of the block | |
af2ed151 | 76 | * @param desc [out] handler description |
626bfcc1 | 77 | * @return 1 if the agent can provide a handler, 0 if not |
78 | */ | |
79 | int GetHandlerDescription(AliHLTComponentDataType dt, | |
80 | AliHLTUInt32_t spec, | |
81 | AliHLTOUTHandlerDesc& desc) const; | |
82 | ||
83 | /** | |
84 | * Get specific handler for TPC data in the HLTOUT data stream. | |
85 | * @param dt [in] data type of the block | |
86 | * @param spec [in] specification of the block | |
87 | * @return pointer to handler | |
88 | */ | |
89 | AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, | |
90 | AliHLTUInt32_t spec); | |
91 | ||
92 | /** | |
93 | * Delete an HLTOUT handler. | |
94 | * @param pInstance pointer to handler | |
95 | */ | |
96 | int DeleteOutputHandler(AliHLTOUTHandler* pInstance); | |
97 | ||
98 | /** | |
99 | * The handler for TPC RAW data in the HLTOUT stream. | |
100 | */ | |
101 | class AliHLTTPCRawDataHandler : public AliHLTOUTHandlerEquId { | |
102 | public: | |
103 | /** constructor */ | |
104 | AliHLTTPCRawDataHandler(); | |
105 | /** destructor */ | |
106 | ~AliHLTTPCRawDataHandler(); | |
107 | ||
108 | /** | |
109 | * Process a data block. | |
110 | * Decode specification and return equipment id of the data block. | |
111 | * The data itsself i untouched. | |
112 | * @return equipment id the block should be used for. | |
113 | */ | |
114 | int ProcessData(AliHLTOUT* pData); | |
115 | ||
116 | private: | |
117 | ||
118 | }; | |
119 | ||
5578cf60 | 120 | protected: |
121 | ||
122 | private: | |
626bfcc1 | 123 | /** copy constructor prohibited */ |
124 | AliHLTTPCAgent(const AliHLTTPCAgent&); | |
125 | /** assignment operator prohibited */ | |
126 | AliHLTTPCAgent& operator=(const AliHLTTPCAgent&); | |
127 | ||
128 | /** handler for TPC raw data in the HLTOUT stream */ | |
129 | AliHLTTPCRawDataHandler* fRawDataHandler; //!transient | |
130 | /** nof requests for TPC raw data handler */ | |
131 | int fNofRawDataHandler; //!transient | |
132 | ||
133 | ClassDef(AliHLTTPCAgent, 1); | |
5578cf60 | 134 | }; |
135 | ||
136 | #endif |