adapting dndeta analysis to new AliCorrection schema
[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
117 /* run the task list
118 */
119 int Run();
120
121 protected:
122 int ProcessTask();
123 int StartEvent();
124 int ProcessEvent();
125 int StopEvent();
126
127 private:
85869391 128/* TList fConfList; */
129/* int fbListChanged; */
5ec8e281 130
131 TList fTaskList;
f23a6e1a 132
5ec8e281 133 private:
134 ClassDef(AliHLTSystem, 0);
f23a6e1a 135};
136#endif
137