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