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