]>
Commit | Line | Data |
---|---|---|
c38ba6f9 | 1 | // $Id$ |
2 | ||
3 | #ifndef ALIHLTCONFIGURATIONHANDLER_H | |
4 | #define ALIHLTCONFIGURATIONHANDLER_H | |
5 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * See cxx source for full Copyright notice */ | |
7 | ||
8 | /** @file AliHLTConfigurationHandler.h | |
9 | @author Matthias Richter | |
10 | @date | |
b22e91eb | 11 | @brief Global handling of HLT configurations. |
c38ba6f9 | 12 | */ |
13 | ||
14 | /* #include <cerrno> */ | |
15 | #include <TObject.h> | |
16 | #include <TList.h> | |
17 | /* #include "AliHLTDataTypes.h" */ | |
18 | /* #include "AliHLTLogging.h" */ | |
19 | /* #include "AliHLTDataBuffer.h" */ | |
20 | ||
b22e91eb | 21 | /** |
22 | * @class AliHLTConfigurationHandler | |
23 | * @brief Global Handling of HLT configurations. | |
24 | * | |
25 | * This class implements the global handling of @ref AliHLTConfiguration objects. | |
26 | * It is a list of all configuartion descriptor currently available in the system. | |
27 | * Each @ref AliHLTConfiguration object is registerd automatically with the | |
28 | * handler and put into the list. | |
29 | * | |
30 | * @note This class is only used for the @ref alihlt_system. | |
31 | * | |
32 | * @ingroup alihlt_system | |
33 | */ | |
c38ba6f9 | 34 | class AliHLTConfigurationHandler : public AliHLTLogging { |
35 | public: | |
b22e91eb | 36 | /** standard constructor */ |
c38ba6f9 | 37 | AliHLTConfigurationHandler(); |
b22e91eb | 38 | |
c38ba6f9 | 39 | //AliHLTConfigurationHandler(AliHLTConfiguration* pConf); |
b22e91eb | 40 | |
41 | /** destructor */ | |
c38ba6f9 | 42 | virtual ~AliHLTConfigurationHandler(); |
43 | ||
44 | /***************************************************************************** | |
45 | * registration | |
46 | */ | |
47 | ||
b22e91eb | 48 | /** |
49 | * Register a configuration to the global list of configurations. | |
50 | * @param pConf The configuration to register | |
51 | */ | |
c38ba6f9 | 52 | int RegisterConfiguration(AliHLTConfiguration* pConf); |
53 | ||
b22e91eb | 54 | /** |
55 | * Create a configuration and register it. | |
56 | * @param id | |
57 | * @param component | |
58 | * @param sources | |
59 | * @param arguments | |
60 | */ | |
c38ba6f9 | 61 | int CreateConfiguration(const char* id, const char* component, const char* sources, const char* arguments); |
62 | ||
b22e91eb | 63 | /** |
64 | * Remove a configuration from the global list. | |
65 | * @param pConf The configuration to remove | |
66 | */ | |
c38ba6f9 | 67 | int RemoveConfiguration(AliHLTConfiguration* pConf); |
b22e91eb | 68 | |
69 | /** | |
70 | * Remove a configuration from the global list. | |
71 | * @param id The configuration to remove | |
72 | */ | |
c38ba6f9 | 73 | int RemoveConfiguration(const char* id); |
74 | ||
b22e91eb | 75 | /** |
76 | * Find a configuration from the global list. | |
77 | * @param id Id of the configuration to find | |
78 | */ | |
c38ba6f9 | 79 | AliHLTConfiguration* FindConfiguration(const char* id); |
80 | ||
b22e91eb | 81 | /** |
82 | * Print the registered configurations to the logging function. | |
83 | */ | |
c38ba6f9 | 84 | void PrintConfigurations(); |
85 | ||
86 | ||
87 | private: | |
b22e91eb | 88 | /** the list of registered configurations */ |
89 | static TList fListConfigurations; | |
90 | /** the list of dynamic configurations (for proper cleanup) */ | |
91 | static TList fListDynamicConfigurations; | |
c38ba6f9 | 92 | |
93 | ClassDef(AliHLTConfigurationHandler, 0); | |
94 | }; | |
95 | ||
96 | #endif |