minor fix in function definition; missing header files added to Makefile.am
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTSystem.h
CommitLineData
f23a6e1a 1// @(#) $Id$
2
3#ifndef ALIHLTSYSTEM_H
4#define ALIHLTSYSTEM_H
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
b22e91eb 8/** @file AliHLTSystem.h
9 @author Matthias Richter
10 @date
11 @brief Global HLT module management and AliRoot integration.
12 @note The class is used in Offline (AliRoot) context
13*/
f23a6e1a 14
b22e91eb 15/**
16 * @defgroup alihlt_system HLT integration into AliRoot
17 * This section describes the HLT integration into AliRoot.
18 */
f23a6e1a 19
5ec8e281 20#include "AliHLTLogging.h"
21#include <TList.h>
f23a6e1a 22
5ec8e281 23class AliHLTComponentHandler;
24class AliHLTConfiguration;
85465857 25class AliHLTConfigurationHandler;
5ec8e281 26class AliHLTTask;
f23a6e1a 27
bfccbf68 28/**
29 * @class AliHLTSystem
30 * Main class for the HLT integration into AliRoot.
31 * The class handles a list of configurations. Configurations are translated
32 * into task lists which can be executed.
33 *
b22e91eb 34 * @note This class is only used for the @ref alihlt_system.
35 *
36 * @ingroup alihlt_system
bfccbf68 37 */
5ec8e281 38class AliHLTSystem : public AliHLTLogging {
39 public:
bfccbf68 40 /** default constructor */
f23a6e1a 41 AliHLTSystem();
85869391 42 /** not a valid copy constructor, defined according to effective C++ style */
43 AliHLTSystem(const AliHLTSystem&);
44 /** not a valid assignment op, but defined according to effective C++ style */
45 AliHLTSystem& operator=(const AliHLTSystem&);
bfccbf68 46 /** destructor */
f23a6e1a 47 virtual ~AliHLTSystem();
48
bfccbf68 49 /**
50 * Pointer to an instance of @ref AliHLTComponentHandler.
3b35e87c 51 */
f23a6e1a 52 AliHLTComponentHandler* fpComponentHandler;
bfccbf68 53
54 /**
55 * Pointer to an instance of @ref AliHLTConfigurationHandler.
56 */
85465857 57 AliHLTConfigurationHandler* fpConfigurationHandler;
f23a6e1a 58
bfccbf68 59 /**
60 * Add a configuration to the end of the list.
61 * @param pConf pointer to configuration to add
5ec8e281 62 */
63 int AddConfiguration(AliHLTConfiguration* pConf);
64
bfccbf68 65 /**
66 * Insert a configuration to the end of the list after the specified configuration.
67 * @param pConf pointer to configuration to insert
68 * @param pPrec pointer to configuration to insert the new one after
5ec8e281 69 */
70 int InsertConfiguration(AliHLTConfiguration* pConf, AliHLTConfiguration* pPrec);
71
bfccbf68 72 /**
73 * Remove a configuration from the list.
74 * @param pConf pointer to configuration to delete
5ec8e281 75 */
76 int DeleteConfiguration(AliHLTConfiguration* pConf);
77
bfccbf68 78 /**
79 * Build a task list from a configuration object.
3b35e87c 80 * This method is used to build the tasks from the 'master' configuration
81 * objects which are added to the HLT system handler. This is an iterative
82 * process since the task might depend upon other configurations. For each
83 * configuration object which has not yet been converted into a task, the
84 * method will be called iteratively. Finally, after building all tasks which
85 * the current one depends on have been created, the task is inserted to the
86 * list of tasks with the InsertTask method.
bfccbf68 87 * @param pConf pointer to configuration to build the task list from
5ec8e281 88 */
89 int BuildTaskList(AliHLTConfiguration* pConf);
90
bfccbf68 91 /**
92 * Clean the list of tasks and delete all the task objects.
3b35e87c 93 */
5ec8e281 94 int CleanTaskList();
95
bfccbf68 96 /**
97 * Insert a task to the task list.
98 * The method first checks whether all dependencies are resolved (i.e. exist
3b35e87c 99 * already in the task list). During this iteration the cross links between the
100 * tasks are set as well. If all dependencies are resolved, the task is added
101 * at the end of the list.
bfccbf68 102 * @param pTask pointer to task to add
3b35e87c 103 */
5ec8e281 104 int InsertTask(AliHLTTask* pTask);
105
bfccbf68 106 /**
107 * Find a task with an id.
108 * @param id CONFIGURATION id (not a COMPONENT id!)
3b35e87c 109 */
5ec8e281 110 AliHLTTask* FindTask(const char* id);
111
bfccbf68 112 /**
113 * Print the task list.
3b35e87c 114 */
5ec8e281 115 void PrintTaskList();
116
53feaef5 117 /**
2d7ff710 118 * Print info on an AliHLTComponentDataType structure
119 */
120 void PrintComponentDataTypeInfo(const AliHLTComponentDataType& dt);
121
122 /**
53feaef5 123 * Run the task list.
124 * All tasks of the list will be subsequently processed for each event.
125 * @param iNofEvents number of events
126 * @return neg error code if failed
127 */
128 int Run(Int_t iNofEvents=1);
129
130 /**
131 * Start task list.
132 * The @ref AliHLTTask::StartRun method is called for each task, the components
133 * will be prepared for event processing.
134 * @return neg error code if failed
135 */
136 int StartTasks();
137
138 /**
139 * Process task list.
140 * The @ref AliHLTTask::ProcessTask method is called for each task.
141 * @return neg error code if failed
142 */
143 int ProcessTasks(Int_t eventNo);
144
145 /**
146 * Stop task list.
147 * The @ref AliHLTTask::EndRun method is called for each task, the components
148 * will be cleaned after event processing.
149 * @return neg error code if failed
5ec8e281 150 */
53feaef5 151 int StopTasks();
5ec8e281 152
153 protected:
154 int ProcessTask();
155 int StartEvent();
156 int ProcessEvent();
157 int StopEvent();
158
159 private:
85869391 160/* TList fConfList; */
161/* int fbListChanged; */
5ec8e281 162
163 TList fTaskList;
f23a6e1a 164
5ec8e281 165 private:
53feaef5 166 ClassDef(AliHLTSystem, 1);
f23a6e1a 167};
168#endif
169