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();
37 * Register all configurations belonging to this module with the
38 * AliHLTConfigurationHandler. The agent can adapt the configurations
39 * to be registered to the current AliRoot setup by checking the
41 * @param handler the configuration handler
42 * @param rawReader AliRawReader instance
43 * @param runloader AliRoot runloader
44 * @return neg. error code if failed
46 int CreateConfigurations(AliHLTConfigurationHandler* handler,
47 AliRawReader* rawReader=NULL,
48 AliRunLoader* runloader=NULL) const;
51 * Get the top configurations belonging to this module.
52 * A top configuration describes a processing chain. It can simply be
53 * described by the last configuration(s) in the chain.
54 * The agent can adapt the configurations to be registered to the current
55 * AliRoot setup by checking the runloader.
56 * @param rawReader AliRawReader instance
57 * @param runloader AliRoot runloader
58 * @return number of configurations, neg. error code if failed
60 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
61 AliRunLoader* runloader=NULL) const;
64 * Component libraries which the configurations of this agent depend on.
65 * @return list of component libraries as a blank-separated string.
67 const char* GetRequiredComponentLibraries() const;
70 * Register components for the AliHLTEMCAL library.
71 * @param pHandler [in] instance of the component handler
73 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
76 * Get handler decription for EMCAL data in the HLTOUT data stream.
77 * @param dt [in] data type of the block
78 * @param spec [in] specification of the block
79 * @param desc [out] handler description
80 * @return 1 if the agent can provide a handler, 0 if not
82 int GetHandlerDescription(AliHLTComponentDataType dt,
84 AliHLTOUTHandlerDesc& desc) const;
87 * Get specific handler for EMCAL data in the HLTOUT data stream.
88 * @param dt [in] data type of the block
89 * @param spec [in] specification of the block
90 * @return pointer to handler
92 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
96 * Delete an HLTOUT handler.
97 * @param pInstance pointer to handler
99 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
102 * The handler for EMCAL RAW data in the HLTOUT stream.
104 class AliHLTEMCALRawDataHandler : public AliHLTOUTHandlerEquId {
107 AliHLTEMCALRawDataHandler(AliHLTEMCALAgent* pAgent=NULL);
109 ~AliHLTEMCALRawDataHandler();
112 * Process a data block.
113 * Decode specification and return equipment id of the data block.
114 * The data itsself i untouched.
115 * @return equipment id the block should be used for.
117 int ProcessData(AliHLTOUT* pData);
120 /// copy constructor prohibited
121 AliHLTEMCALRawDataHandler(const AliHLTEMCALRawDataHandler&);
122 /// assignment operator prohibited
123 AliHLTEMCALRawDataHandler& operator=(const AliHLTEMCALRawDataHandler&);
125 AliHLTEMCALAgent* fpAgent; //! agent instance to retrieve mapper
132 /** copy constructor prohibited */
133 AliHLTEMCALAgent(const AliHLTEMCALAgent&);
134 /** assignment operator prohibited */
135 AliHLTEMCALAgent& operator=(const AliHLTEMCALAgent&);
137 /// get mapper for a specification
138 AliHLTEMCALMapper* GetMapper(AliHLTUInt32_t spec) const;
140 /** handler for EMCAL raw data in the HLTOUT stream */
141 AliHLTEMCALRawDataHandler* fRawDataHandler; //!transient
143 // mappers for different specifications
144 std::map<AliHLTUInt32_t, AliHLTEMCALMapper*> fMappers; //! transient
146 ClassDef(AliHLTEMCALAgent, 0);