3 #ifndef ALIHLTMODULEAGENT_H
4 #define ALIHLTMODULEAGENT_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /** @file AliHLTModuleAgent.h
9 @author Matthias Richter
11 @brief Agent helper class for component libraries.
12 @note The class is used in Offline (AliRoot) context
17 #include "AliHLTLogging.h"
18 #include "AliHLTConfiguration.h"
19 #include "AliHLTConfigurationHandler.h"
24 * @class AliHLTModuleAgent
25 * @brief Agent helper class for HLT sub modules, e.g. PHOS, TPC, Trigger
27 * This class describes
29 * There must be only one agent per module/library.
31 * @ingroup alihlt_system
33 class AliHLTModuleAgent : public TObject, public AliHLTLogging {
36 * standard constructor. The agent is automatically registered in the
37 * global agent manager
40 /** not a valid copy constructor, defined according to effective C++ style */
41 AliHLTModuleAgent(const AliHLTModuleAgent&);
42 /** not a valid assignment op, but defined according to effective C++ style */
43 AliHLTModuleAgent& operator=(const AliHLTModuleAgent&);
45 virtual ~AliHLTModuleAgent();
49 * Short summary on registered agents. This function acts globally on the list
50 * of agents if no specific agent is specified.
52 static void PrintStatus(const char* agent=NULL);
55 * Get the first agent in the list
56 * @return pointer to first agent in the list, NULL if empty
58 static AliHLTModuleAgent* GetFirstAgent();
61 * Get the next agent in the list
62 * @return pointer to next agent in the list, NULL if end of list
64 static AliHLTModuleAgent* GetNextAgent();
67 * Register all configurations belonging to this module with the
68 * AliHLTConfigurationHandler. The agent can adapt the configurations
69 * to be registered to the current AliRoot setup by checking the
71 * @param handler [in] the configuration handler
72 * @param runloader [in] AliRoot runloader
73 * @return neg. error code if failed
75 virtual int CreateConfigurations(AliHLTConfigurationHandler* handler,
76 AliRunLoader* runloader=NULL) const;
79 * Get the top configurations belonging to this module.
80 * A top configuration describes a processing chain. It can simply be
81 * described by the last configuration(s) in the chain.
82 * The agent can adapt the configurations to be registered to the current
83 * AliRoot setup by checking the runloader.
84 * @param runloader [in] AliRoot runloader
85 * @return string containing the top configurations separated by blanks
87 virtual const char* GetTopConfigurations(AliRunLoader* runloader=NULL) const;
90 * Component libraries which the configurations of this agent depend on.
91 * @return list of component libraries as a blank-separated string.
93 virtual const char* GetRequiredComponentLibraries() const;
97 * This method can be used to register components for the module instead
98 * of the 'static object approach'. Registration is don by passing a
99 * sample object to @ref AliHLTComponentHandler::RegisterComponent<br>
100 * \em Note: The sample object is owned by the agent, make sure to delete
103 virtual int RegisterComponents(AliRunLoader* runloader=NULL) const;
109 * Register agent in the global list.
110 * @return neg. error code if failed
112 static int Register(AliHLTModuleAgent* pAgent);
115 * Unregister agent in the global list.
116 * @return neg. error code if failed
118 static int Unregister(AliHLTModuleAgent* pAgent);
120 /** the list of active agents */
121 static TList fgAgentList;
123 /** the current object link (list position) */
124 static TObjLink* fgCurrentLnk;
126 ClassDef(AliHLTModuleAgent, 0);