2 #ifndef ALIHLTEMCALAGENT_H
3 #define ALIHLTEMCALAGENT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /** @file AliHLTEMCALAgent.h
8 @author Federico Ronchetti
10 @brief Agent of the libAliHLTEMCAL library
13 #include "AliHLTModuleAgent.h"
14 #include "AliHLTOUTHandlerEquId.h"
17 class AliHLTOUTHandlerChain;
18 class AliHLTEMCALMapper;
21 * @class AliHLTEMCALAgent
22 * This is the agent for the AliHLTEMCAL library.
24 * @ingroup alihlt_system
26 class AliHLTEMCALAgent : public AliHLTModuleAgent {
29 * standard constructor. The agent is automatically registered in the
30 * global agent manager
34 virtual ~AliHLTEMCALAgent();
36 UInt_t GetDetectorMask() const;
39 * Register all configurations belonging to this module with the
40 * AliHLTConfigurationHandler. The agent can adapt the configurations
41 * to be registered to the current AliRoot setup by checking the
43 * @param handler the configuration handler
44 * @param rawReader AliRawReader instance
45 * @param runloader AliRoot runloader
46 * @return neg. error code if failed
48 int CreateConfigurations(AliHLTConfigurationHandler* handler,
49 AliRawReader* rawReader=NULL,
50 AliRunLoader* runloader=NULL) const;
53 * Get the top configurations belonging to this module.
54 * A top configuration describes a processing chain. It can simply be
55 * described by the last configuration(s) in the chain.
56 * The agent can adapt the configurations to be registered to the current
57 * AliRoot setup by checking the runloader.
58 * @param rawReader AliRawReader instance
59 * @param runloader AliRoot runloader
60 * @return number of configurations, neg. error code if failed
62 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
63 AliRunLoader* runloader=NULL) const;
66 * Component libraries which the configurations of this agent depend on.
67 * @return list of component libraries as a blank-separated string.
69 const char* GetRequiredComponentLibraries() const;
72 * Register components for the AliHLTEMCAL library.
73 * @param pHandler [in] instance of the component handler
75 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
78 * Get handler decription for EMCAL data in the HLTOUT data stream.
79 * @param dt [in] data type of the block
80 * @param spec [in] specification of the block
81 * @param desc [out] handler description
82 * @return 1 if the agent can provide a handler, 0 if not
84 int GetHandlerDescription(AliHLTComponentDataType dt,
86 AliHLTOUTHandlerDesc& desc) const;
89 * Get specific handler for EMCAL data in the HLTOUT data stream.
90 * @param dt [in] data type of the block
91 * @param spec [in] specification of the block
92 * @return pointer to handler
94 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
98 * Delete an HLTOUT handler.
99 * @param pInstance pointer to handler
101 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
104 * The handler for EMCAL RAW data in the HLTOUT stream.
106 class AliHLTEMCALRawDataHandler : public AliHLTOUTHandlerEquId {
109 AliHLTEMCALRawDataHandler(AliHLTEMCALAgent* pAgent=NULL);
111 ~AliHLTEMCALRawDataHandler();
114 * Process a data block.
115 * Decode specification and return equipment id of the data block.
116 * The data itsself i untouched.
117 * @return equipment id the block should be used for.
119 int ProcessData(AliHLTOUT* pData);
122 /// copy constructor prohibited
123 AliHLTEMCALRawDataHandler(const AliHLTEMCALRawDataHandler&);
124 /// assignment operator prohibited
125 AliHLTEMCALRawDataHandler& operator=(const AliHLTEMCALRawDataHandler&);
127 AliHLTEMCALAgent* fpAgent; //! agent instance to retrieve mapper
134 /** copy constructor prohibited */
135 AliHLTEMCALAgent(const AliHLTEMCALAgent&);
136 /** assignment operator prohibited */
137 AliHLTEMCALAgent& operator=(const AliHLTEMCALAgent&);
139 /// get mapper for a specification
140 AliHLTEMCALMapper* GetMapper(AliHLTUInt32_t spec) const;
142 /** handler for EMCAL raw data in the HLTOUT stream */
143 AliHLTEMCALRawDataHandler* fRawDataHandler; //!transient
145 // mappers for different specifications
146 std::map<AliHLTUInt32_t, AliHLTEMCALMapper*> fMappers; //! transient
148 ClassDef(AliHLTEMCALAgent, 0);