Line data Source code
1 : //-*- Mode: C++ -*-
2 : // $Id$
3 :
4 : #ifndef ALIHLTSYSTEM_H
5 : #define ALIHLTSYSTEM_H
6 : //* This file is property of and copyright by the *
7 : //* ALICE Experiment at CERN, All rights reserved. *
8 : //* See cxx source for full Copyright notice *
9 :
10 : // @file AliHLTSystem.h
11 : // @author Matthias Richter
12 : // @date 2007
13 : // @brief Global HLT module management and AliRoot integration.
14 : // @note The class is used in Offline (AliRoot) context
15 : //
16 :
17 : /**
18 : * @defgroup alihlt_system HLT integration into AliRoot
19 : * This section describes the HLT integration into AliRoot.
20 : *
21 : * @section alihlt_system_intro General Remarks
22 : * The HLT analysis is organized in components which can also be used
23 : * in off-line processing. Two different types of off-line applications
24 : * can be distinguished:
25 : * - AliRoot simulation (AliSimulation)
26 : * - AliRoot reconstruction (AliReconstruction)
27 : *
28 : * In either case an HLT chain described by means of AliHLTConfiguration
29 : * builds the core of any HLT application. Special components exist, which
30 : * emulate the behavior of the components of the HLT on-line data
31 : * transportation framework. Together with the analysis components, this
32 : * allows the full emulation of the behavoir of HLT analysis chain off-line.
33 : *
34 : * More details how to setup up such a chain can be found:
35 : * - The examples page under @ref tut_hltsystem
36 : *
37 : * @section alihlt_system_simulation AliRoot simulation
38 : * HLT has a special role in the normal data flow of simulation and
39 : * reconstruction. Since the HLT reconstruction and analysis runs on-line
40 : * on the HLT farm, the raw data produced by HLT as a detector contains
41 : * already reconstructed events. Consequently, the HLT response has to be
42 : * simulated as well as the data of all other detectors.
43 : *
44 : * Since the detector data is needed, the HLT simulation is run at the
45 : * end of AliSimulation.
46 : *
47 : * As a matter of fact, HLT always reconstructs data, <em><b>HLT simulation
48 : * </b></em> means <em><b>HLT reconstruction embedded into AliRoot</b></em>.
49 : *
50 : * More Details an be found in the module:
51 : * - @ref alihlt_aliroot_simulation
52 : *
53 : * @section alihlt_system_reconstruction AliRoot reconstruction
54 : *
55 : * Like all other ALICE detectors, HLT utilizes the AliReconstruction interface
56 : * to implement a plugin for the AliRoot reconstruction. The reconstructor can be
57 : * used to
58 : * - run HLT analysis chains in the AliRoot reconstruction <br>
59 : * This option is mainly intended for the development and debugging cycle. HLT
60 : * chains can be defined by means of AliHLTConfiguration and can be run either
61 : * stand-alone or embedded into the AliReconstruction cycle.
62 : * - run the default analysis chains <br>
63 : * HLT modules can define default analysis chains to be run during AliRoot
64 : * reconstruction.
65 : * - handle the HLTOUT data<br>
66 : * The HLT output stream contains multiple data blocks produced by the various
67 : * components of the HLT chain. Each block might need different and even
68 : * detector specific processing, like e.g. the processing of ESD objects or the
69 : * handling of compressed data.
70 : *
71 : * More Details an be found in the module:
72 : * - @ref alihlt_aliroot_reconstruction
73 : *
74 : */
75 :
76 : #include "AliHLTLogging.h"
77 : #include <TList.h>
78 : #include <TString.h>
79 :
80 : class AliHLTComponentHandler;
81 : class AliHLTConfiguration;
82 : class AliHLTConfigurationHandler;
83 : class AliHLTTask;
84 : class AliHLTOUT;
85 : class AliHLTOUTTask;
86 : class AliHLTControlTask;
87 : class AliRunLoader;
88 : class AliRawReader;
89 : class AliESDEvent;
90 : class TObjArray;
91 : class TStopwatch;
92 :
93 : /**
94 : * @class AliHLTSystem
95 : * Main class for the HLT integration into AliRoot.
96 : * @note This class is only used for the @ref alihlt_system.
97 : *
98 : * @section alihltsystem_overview Main functionality
99 : * The class implements the main binding functionality to run HLT
100 : * embedded in AliRoot:
101 : * - creates handlers for HLT components (AliHLTComponentHandler)
102 : * and configurations (AliHLTConfigurationHandler).
103 : * - implements the creation of a task list from configurations
104 : * - runs the tasks of the task list
105 : * - implements the interface to AliHLTReconstructor and AliHLTSimulation
106 : * - manages the registered module agents (AliHLTModuleAgent)
107 : *
108 : * @section alihltsystem_functions Main functions
109 : * The following list gives the most important functions, see documentation
110 : * of functions for details.
111 : * - ScanOptions(const char*) initialize the system from arguments
112 : * - BuildTaskList(const char*) build task list for a reconstruction chain
113 : * - Run() processing loop for task list
114 : * - Reconstruct() interface to AliHLTReconstructor
115 : * - ProcessHLTOUT() process an HLTOUT colection
116 : *
117 : * @section alihltsystem_initialization Initialization
118 : * AliHLTSystem is initialized with a list of component libraries which determine
119 : * the actual functionality. See ScanOptions() for description of options.
120 : *
121 : * @section alihltsystem_usage Usage
122 : * The class AliHLTPluginBase handles the global instance of AliHLTSystem,
123 : * the instance is created and fetched like
124 : * <pre>
125 : * // setup the HLT system
126 : * AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
127 : * </pre>
128 : *
129 : * @ingroup alihlt_system
130 : */
131 : class AliHLTSystem : public AliHLTLogging {
132 : public:
133 : /** default constructor */
134 : AliHLTSystem(AliHLTComponentLogSeverity loglevel=kHLTLogDefault,
135 : const char* name="",
136 : AliHLTComponentHandler* pCompHandler=NULL,
137 : AliHLTConfigurationHandler* pConfHandler=NULL
138 : );
139 : /** destructor */
140 : virtual ~AliHLTSystem();
141 :
142 : /**
143 : * Build a task list
144 : * This method is used to build the list of tasks from the configuration
145 : * id of a single 'master' configuration.
146 : *
147 : * Configuration entries might depend upon other configurations. For each
148 : * configuration which has not yet been converted into an AliHLTTask, the
149 : * method will be called iteratively. Finally, after building all tasks
150 : * providing the input for the current one, the task is inserted to the
151 : * list of tasks with the InsertTask() method.
152 : *
153 : * The function can be called multiple times in order to add more than one
154 : * chain to the system.
155 : *
156 : * @param pConf configuration name/id
157 : */
158 : int BuildTaskList(const char* pConf);
159 :
160 : /**
161 : * Clean the list of tasks and delete all the task objects.
162 : */
163 : int CleanTaskList();
164 :
165 : /**
166 : * Insert a task to the task list.
167 : * The method first checks whether all dependencies are resolved (i.e. exist
168 : * already in the task list). During this iteration the cross links between
169 : * the tasks are set as well. If all dependencies are resolved, the task is
170 : * added at the end of the list.
171 : * @param pTask pointer to task to add
172 : */
173 : int InsertTask(AliHLTTask* pTask);
174 :
175 : /**
176 : * Add HLTOUT task to the end of the task list.
177 : * If one of the specified chains has output, an AliHLTOUTTask is
178 : * added which controls the output. All other chains are removed from the
179 : * AliHLTOUTTask input.
180 : * @return 0 if no task has been added, 1 if task has been added
181 : */
182 : int AddHLTOUTTask(const char* chains);
183 :
184 0 : AliHLTOUTTask* GetHLTOUTTask() const {return fpHLTOUTTask;}
185 0 : AliHLTComponentHandler* GetComponentHandler() const {return fpComponentHandler;}
186 0 : AliHLTConfigurationHandler* GetConfigurationHandler() const {return fpConfigurationHandler;}
187 :
188 : /**
189 : * Find a task with an id.
190 : * @param id CONFIGURATION id (not a COMPONENT id!)
191 : */
192 : AliHLTTask* FindTask(const char* id);
193 :
194 : /**
195 : * Print the task list.
196 : */
197 : void PrintTaskList();
198 :
199 : /**
200 : * Run one or more events.
201 : * Core of the processing loop. The method expects the task list to be
202 : * already created by a previous call to BuildTaskList(const char*)
203 : *
204 : * All tasks of the list will be subsequently processed for each event.
205 : * The system can remain started if the \em bStop parameter is 0. In that
206 : * case the system just waits for the next event. A specific call with
207 : * nofEvents==0 is needed to execute the stop sequence.
208 : * @param iNofEvents number of events
209 : * @param bStop stop the chain after processing
210 : * @param trgMask ctp trigger mask from the rawreader
211 : * @param timestamp timestamp of the event, read from the rawreader
212 : * @param eventtype event type, read from the rawreader
213 : * @param participatingDetectors the bit flags of the participating detectors
214 : * as will we inserted into the Common Data Header. This should only
215 : * be used for software event types.
216 : * @return number of reconstructed events, neg error code if failed
217 : */
218 : int Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
219 : AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
220 : AliHLTUInt32_t participatingDetectors = 0);
221 :
222 : int Run(Int_t iNofEvents, int bStop, AliHLTTriggerMask_t trgMask,
223 : AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
224 : AliHLTUInt32_t participatingDetectors = 0);
225 :
226 : /**
227 : * Run the tasklist
228 : * Somehow the 64bit variable/default value did not work out on mac.
229 : * Re-introducing the original function, and forwarding it.
230 : */
231 : int Run(Int_t iNofEvents=1, int bStop=1)
232 0 : {return Run(iNofEvents, bStop, 0, 0, 0);}
233 :
234 : /**
235 : * Init all tasks from the list.
236 : * The @ref AliHLTTask::Init method is called for each task, the components
237 : * will be created.
238 : * @return neg error code if failed
239 : */
240 : int InitTasks();
241 :
242 : /**
243 : * Init the stopwatches for all tasks.
244 : * @param pStopwatches object array of stopwatches, for types
245 : * @see AliHLTComponent::AliHLTStopwatchType
246 : * @return neg error code if failed
247 : */
248 : int InitBenchmarking(TObjArray* pStopwatches);
249 :
250 : /**
251 : * Stop the stopwatches for all tasks.
252 : * @param pStopwatches object array of stopwatches, for types
253 : * @see AliHLTComponent::AliHLTStopwatchType
254 : * @return neg error code if failed
255 : */
256 : int PauseBenchmarking(TObjArray* pStopwatches) const;
257 :
258 : /**
259 : * Continue the stopwatches for all tasks.
260 : * @param pStopwatches object array of stopwatches, for types
261 : * @see AliHLTComponent::AliHLTStopwatchType
262 : * @return neg error code if failed
263 : */
264 : int ResumeBenchmarking(TObjArray* pStopwatches) const;
265 :
266 : /**
267 : * Print benchmarking summary.
268 : * Optionak: clean up stop watches.
269 : * @param pStopwatches object array of stopwatches
270 : * @param bClean delete stop watches if 1
271 : * @return neg error code if failed
272 : */
273 : int PrintBenchmarking(TObjArray* pStopwatches, int bClean=0) const;
274 :
275 : /**
276 : * Start task list.
277 : * The @ref AliHLTTask::StartRun method is called for each task, the
278 : * components will be prepared for event processing.
279 : * @return neg error code if failed
280 : */
281 : int StartTasks();
282 :
283 : /**
284 : * Process task list.
285 : * The @ref AliHLTTask::ProcessTask method is called for each task.
286 : * @return neg error code if failed
287 : */
288 : int ProcessTasks(Int_t eventNo, AliHLTTriggerMask_t trgMask,
289 : AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
290 : AliHLTUInt32_t participatingDetectors = 0);
291 :
292 : /**
293 : * Stop task list.
294 : * The @ref AliHLTTask::EndRun method is called for each task, the components
295 : * will be cleaned after event processing.
296 : * @return neg error code if failed
297 : */
298 : int StopTasks();
299 :
300 : /**
301 : * Send a control event trough the chain.
302 : * All data sources in the chain are switched to publish a control event like
303 : * SOR or EOR. The event is propagated in the same way as a normal event.
304 : * @param dt type of the event
305 : */
306 : int SendControlEvent(AliHLTComponentDataType dt);
307 :
308 : /**
309 : * De-init all tasks from the list.
310 : * The @ref AliHLTTask::Deinit method is called for each task, the components
311 : * will be deleted.
312 : * @return neg error code if failed
313 : */
314 : int DeinitTasks();
315 :
316 : /**
317 : * Cleanup all internal objects from HLTOUT processing.
318 : * Go through the list of HLTOUT handlers and release them.
319 : */
320 : int CleanupHLTOUTHandlers();
321 :
322 : /**
323 : * The memory allocation function for components.
324 : * This function is part of the running environment of the components,
325 : * see AliHLTAnalysisEnvironment
326 : */
327 : static void* AllocMemory( void* param, unsigned long size );
328 :
329 : /**
330 : * The allocation function for component EventDoneData.
331 : * This function is part of the running environment of the components,
332 : * see AliHLTAnalysisEnvironment
333 : */
334 : static int AllocEventDoneData( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
335 :
336 : /**
337 : * AliRoot embedded reconstruction.
338 : * Main entry point to execute the HLT reconstruction from AliRoot. Called
339 : * either by the AliHLTReconstructor plugin during AliRoot reconstruction
340 : * of raw data, or AliHLTSimulation during simulation of data.
341 : *
342 : * The two cases are distinguished by the availablility of the AliRunLoader
343 : * and raw reader.
344 : * - AliRoot simulation: AliRunLoader is available and is propagated to the
345 : * module agents (AliHLTModuleAgent) to generate the corresponding
346 : * configurations and chains, and to the AliHLTOfflineSource components.
347 : * raw reader might be available depending on whether raw data was
348 : * simulated or not.
349 : * - AliRoot reconstruction: raw reader is available and is propagated to
350 : * the agents and AliHLTOfflineSource components. AliRunLoader is always
351 : * NULL.
352 : *
353 : * The system remains started after the processing and just waits for the
354 : * next event. A specific call with nofEvents==0 is needed to execute the
355 : * stop sequence.
356 : *
357 : * The 'runLoader' and 'rawReader' parameters are propagated to all active
358 : * AliHLTOfflineDataSource's and the HLT chain is processed for the given
359 : * number of events. If the rawReader is NULL, reconstruction is done on
360 : * simulated data, from real data if a RawReader is specified.
361 : *
362 : * After setting up the system with the reconstruction parameters the
363 : * Run() method is called and carries out the processing of the chain.
364 : *
365 : * @param nofEvents number of events
366 : * @param runLoader the AliRoot RunLoader
367 : * @param rawReader the AliRoot RawReader
368 : * @return number of reconstructed events, neg. error code if failed
369 : */
370 : int Reconstruct(int nofEvents, AliRunLoader* runLoader,
371 : AliRawReader* rawReader=NULL);
372 :
373 : /**
374 : * Fill ESD for one event.
375 : * To be called by the AliHLTReconstructor plugin during the event loop
376 : * and FillESD method of the AliRoot reconstruction.
377 : *
378 : * The method is most likely deprecated as the scheme has been slightly
379 : * changed. The ESD is filled by the HLTOUT handlers implemented by the
380 : * HLT modules rather than by components within the reconstruction chain.
381 : * Still, HLT reconstruction chains can be run during the AliRoot
382 : * reconstruction, data produced by such chains is automatically added
383 : * to the HLTOUT stream in order to be equivalent to the online HLT.
384 : * The HLTOUT is processed during AliReconstruction at the end of the
385 : * HLT event processing, literally during the FillESD method of the AliRoot
386 : * reconstruction interface. The HLT module must implement HLTOUT handlers
387 : * and provide those through the module agent.
388 : *
389 : * @param eventNo current event no (Note: this event number is just a
390 : * processing counter and is not related to the nature/
391 : * origin of the event
392 : * @param runLoader the AliRoot runloader
393 : * @param esd an AliESDEvent instance
394 : * @return neg. error code if failed
395 : */
396 : int FillESD(int eventNo, AliRunLoader* runLoader, AliESDEvent* esd);
397 :
398 : /**
399 : * Init the HLTOUT instance for the current event.
400 : * The instance can be used by other classes to get hold on the data
401 : * from HLTOUT.
402 : * @param instance instance to be set as the active HLTOUT
403 : * @return -EBUSY other active instance already existing
404 : */
405 : int InitHLTOUT(AliHLTOUT* instance);
406 :
407 : /**
408 : * Invalidate the HLTOUT instance.
409 : * @param instance target variable for the instance
410 : * @return -EBUSY if instance in use
411 : */
412 : int InvalidateHLTOUT(AliHLTOUT** instance=NULL);
413 :
414 : /**
415 : * Get the HLTOUT instance.
416 : * User method for processing classes. To be released after use.
417 : * @return pointer to HLTOUT instance
418 : */
419 : AliHLTOUT* RequestHLTOUT();
420 :
421 : /**
422 : * Release the HLTOUT instance after use.
423 : * @param instance pointer to instance to be released
424 : * @return -ENOENT if instance does not match
425 : */
426 : int ReleaseHLTOUT(const AliHLTOUT* instance);
427 :
428 : /**
429 : * Init the HLTInput instance for the current event.
430 : * The instance can be used by other classes to get hold on the data
431 : * from HLTInput.
432 : * @param instance instance to be set as the active HLTInput
433 : * @return -EBUSY other active instance already existing
434 : */
435 : int InitHLTInput(AliHLTOUT* instance);
436 :
437 : /**
438 : * Invalidate the HLTInput instance.
439 : * @param instance target variable for the instance
440 : * @return -EBUSY if instance in use
441 : */
442 : int InvalidateHLTInput(AliHLTOUT** instance=NULL);
443 :
444 : /**
445 : * Get the HLTInput instance.
446 : * User method for processing classes. To be released after use.
447 : * @return pointer to HLTInput instance
448 : */
449 : AliHLTOUT* RequestHLTInput();
450 :
451 : /**
452 : * Release the HLTInput instance after use.
453 : * @param instance pointer to instance to be released
454 : * @return -ENOENT if instance does not match
455 : */
456 : int ReleaseHLTInput(const AliHLTOUT* instance);
457 :
458 : /**
459 : * Process the HLTOUT data.
460 : * The provided instance of AliHLTOUT provides the access to the data.
461 : * AliHLTSystem queries all registered module agents (AliHLTModuleAgent)
462 : * for the ability to treat a specific data block. As the last step the
463 : * ESD object is filled. Please note that the provided ESD is the hltEsd
464 : * in case of AliReconstructor (switched in AliReconstruction).
465 : */
466 : int ProcessHLTOUT(AliHLTOUT* pHLTOUT, AliESDEvent* esd);
467 :
468 : /**
469 : * Process all kChain-type data blocks of the HLTOUT data.
470 : * Handlers of type AliHLTModuleAgent::kChain are executed as the first
471 : * step of the processing. The function is invoked from ProcessHLTOUT(),
472 : * eventual output of the chain is added to the HLTOUT collection.
473 : */
474 : int ProcessHLTOUTkChain(AliHLTOUT* pHLTOUT);
475 :
476 : /**
477 : * Load component libraries.
478 : * @param libs string of blank separated library names
479 : * @return neg. error code if failed
480 : */
481 : int LoadComponentLibraries(const char* libs);
482 :
483 : /**
484 : * Find a symbol in a dynamically loaded library.
485 : * @param library library
486 : * @param symbol the symbol to find
487 : * @return void pointer to function
488 : */
489 : AliHLTfctVoid FindDynamicSymbol(const char* library, const char* symbol);
490 :
491 : /**
492 : * Set participating detectors
493 : * @param detMask detector mask
494 : */
495 4 : void SetDetectorMask(UInt_t detMask) {fDetMask=detMask;}
496 :
497 : /**
498 : * Prepare the HLT system for running.
499 : * - module agents are requested to register configurations
500 : * - task lists are built from the reconstruction chains of the modules
501 : *
502 : * @param rawReader instance of the raw reader or NULL
503 : * @param runloader optional instance of the AliRunLoader
504 : * @return neg. error code if failed <br>
505 : * -EBUSY system is in kRunning state <br>
506 : */
507 : int Configure(AliRawReader* rawReader, AliRunLoader* runloader=NULL);
508 :
509 : /**
510 : * Old method kept for backward compatibilty.
511 : *
512 : * @param runloader optional instance of the AliRunLoader
513 : * @return neg. error code if failed <br>
514 : * -EBUSY system is in kRunning state <br>
515 : */
516 : int Configure(AliRunLoader* runloader=NULL);
517 :
518 : /**
519 : * Scan options and load component libraries.
520 : * The options consist of blank separated tokens. Libraries can be just
521 : * specified by their name, and can be excluded by adding a '!'-mark in
522 : * front. <br>
523 : * Further options
524 : * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
525 : * \li loglevel=<i>level</i> <br>
526 : * logging level for this processing
527 : * \li frameworklog=<i>level</i> <br>
528 : * logging level for framework classes
529 : * \li alilog=off
530 : * disable redirection of log messages to AliLog class
531 : * \li config=<i>macro</i>
532 : * configuration macro
533 : * \li chains=<i>configuration</i>
534 : * comma separated list of configurations to be run during local
535 : * reconstruction
536 : * \li libmode=<i>static,dynamic(default)</i>
537 : * libraries are persistent if loaded in mode <i>static</i>, i.e. they
538 : * can't be unloaded
539 : */
540 : int ScanOptions(const char* options);
541 :
542 : /**
543 : * Reset the HLT system.
544 : * Reset is not possible while the system is in running state.
545 : * @param bForce force the reset
546 : * @return neg. error code if failed <br>
547 : * -EBUSY system is in kRunning state <br>
548 : */
549 : int Reset(int bForce=0);
550 :
551 : /**
552 : * Load the configurations specified by the module agents.
553 : * The runLoader is passed to the agent and allows configuration
554 : * selection.
555 : * - AliSimulation: runloader valid, raw reader might be valid
556 : * - AliReconstruction: runloader always NULL, raw reader valid
557 : *
558 : * @param rawReader instance of the raw reader or NULL
559 : * @param runloader optional instance of the AliRunLoader
560 : * @return neg. error code if failed
561 : */
562 : int LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runloader=NULL);
563 :
564 : /**
565 : * Get the reconstruction chains from all agents and build the task lists.
566 : * AliHLTModuleAgent implementations can define reconstruction chains
567 : * depending on the availibility of AliRunLoader and AliRawReader parameters.
568 : *
569 : * @param rawReader instance of the raw reader or NULL
570 : * @param runloader optional instance of the AliRunLoader
571 : * @return neg. error code if failed
572 : */
573 : int BuildTaskListsFromReconstructionChains(AliRawReader* rawReader,
574 : AliRunLoader* runloader=NULL);
575 :
576 : enum AliHLTSystemState {
577 : kUninitialized = 0x0,
578 : kLibrariesLoaded = 0x1,
579 : kConfigurationLoaded = 0x2,
580 : kTaskListCreated = 0x4,
581 : kReady = 0x7,
582 : kStarted = 0x8,
583 : kRunning = 0x10,
584 : kError = 0x1000
585 : };
586 :
587 : /**
588 : * Check status of the system.
589 : * @param flag AliHLTSystemState value to check for
590 : * @return 1 if set, 0 if not
591 : */
592 : int CheckStatus(int flag);
593 :
594 : /**
595 : * Get the current status.
596 : * @return status flags of @ref AliHLTSystemState
597 : */
598 : int GetStatusFlags();
599 :
600 : /**
601 : * Set logging level for framework classes.
602 : * This sets the local logging level of this instance and all subsequent
603 : * framework classes to \em level.
604 : * @param level local logging level for the framework classes
605 : */
606 : void SetFrameworkLog(AliHLTComponentLogSeverity level);
607 :
608 : /**
609 : * Customized logging function.
610 : * The name of the system and pointer is added at the beginning of each
611 : * message if name was set.
612 : */
613 : int LoggingVarargs(AliHLTComponentLogSeverity severity,
614 : const char* originClass, const char* originFunc,
615 : const char* file, int line, ... ) const;
616 :
617 : /**
618 : * Access to configuration string
619 : */
620 : TString GetConfigurationString() const {
621 0 : return fConfigurationString;
622 : }
623 :
624 : protected:
625 :
626 : private:
627 : /** copy constructor prohibited */
628 : AliHLTSystem(const AliHLTSystem&);
629 : /** assignment operator prohibited */
630 : AliHLTSystem& operator=(const AliHLTSystem&);
631 :
632 : /**
633 : * Build task list from a configuration object.
634 : * This method implements the configuration parsing and transformation into
635 : * a list of AliHLTTask objects. It has been made private in April 2007.
636 : * Use BuildTaskList(const char*) instead.
637 : *
638 : * @param pConf pointer to configuration to build the task list from
639 : */
640 : int BuildTaskList(AliHLTConfiguration* pConf);
641 :
642 : /**
643 : * Set status flags.
644 : */
645 : int SetStatusFlags(int flags);
646 :
647 : /**
648 : * clear status flags.
649 : */
650 : int ClearStatusFlags(int flags);
651 :
652 : /// Pointer to an instance of @ref AliHLTComponentHandler.
653 : AliHLTComponentHandler* fpComponentHandler; //! transient
654 :
655 : /// Pointer to an instance of @ref AliHLTConfigurationHandler.
656 : AliHLTConfigurationHandler* fpConfigurationHandler; //! transient
657 :
658 : /** list of tasks */
659 : TList fTaskList; // see above
660 :
661 : /** the number of instances of AliHLTSystem */
662 : static int fgNofInstances; // see above
663 :
664 : /** state of the object */
665 : int fState; // see above
666 :
667 : /** chains to be run during reconstruction */
668 : TString fChains; //!transient
669 :
670 : /** array of stopwatches */
671 : TObjArray* fStopwatches; //!transient
672 :
673 : /** number of events processed in total */
674 : int fEventCount; //!transient
675 :
676 : /** number of events processed successfully */
677 : int fGoodEvents; //!transient
678 :
679 : /** array of default libraries */
680 : static const char* fgkHLTDefaultLibs[]; //!transient
681 :
682 : /** active kChain handlers (AliHLTOUT::AliHLTOUTHandlerListEntryVector*) */
683 : void* fpChainHandlers; //!transient
684 :
685 : /** active kEsd handlers (AliHLTOUT::AliHLTOUTHandlerListEntryVector*) */
686 : void* fpEsdHandlers; //!transient
687 :
688 : /** active kProprietary handlers (AliHLTOUT::AliHLTOUTHandlerListEntryVector*) */
689 : void* fpProprietaryHandlers; //!transient
690 :
691 : /** active HLTOUT task for the reconstruction */
692 : AliHLTOUTTask* fpHLTOUTTask; //!transient
693 :
694 : /** HLTOUT instance for the current event */
695 : AliHLTOUT* fpHLTOUT; //!transient
696 :
697 : /** HLTOUT use counter */
698 : int fHLTOUTUse; //!transient
699 :
700 : /** HLTInput instance for the current event */
701 : AliHLTOUT* fpHLTInput; //!transient
702 :
703 : /** HLTInput use counter */
704 : int fHLTInputUse; //!transient
705 :
706 : /** special task to publish the control events */
707 : AliHLTControlTask* fpControlTask; //!transient
708 :
709 : /** name of this system instance */
710 : TString fName; //!transient
711 :
712 : /// configuration string
713 : TString fConfigurationString; //!transient
714 :
715 : /// ECS parameter string
716 : TString fECSParams; //!transient
717 :
718 : /// indicate the argument 'hltout-type'
719 : bool fUseHLTOUTComponentTypeGlobal; //!transient
720 :
721 : /// detector mask
722 : UInt_t fDetMask; //!transient
723 :
724 126 : ClassDef(AliHLTSystem, 0);
725 : };
726 :
727 : #endif
|