1 \section{Ali\-HLTTask Class Reference}
2 \label{classAliHLTTask}\index{AliHLTTask@{AliHLTTask}}
3 {\tt \#include $<$Ali\-HLTTask.h$>$}
5 Inheritance diagram for Ali\-HLTTask::\begin{figure}[H]
8 \includegraphics[height=2cm]{classAliHLTTask}
13 \subsection{Detailed Description}
14 A task collects all the information which is necessary to process a certain step in the HLT data processing chain.\begin{itemize}
15 \item the instance of the component the task object creates and deletes the component object\item the data buffer which receives the result of the component and provides the data to other tasks/components\item a list of all dependencies\item a list of consumers\item the task object holds an external pointer to the configuration object; {\bf Note:} the configuration object must exist through the existence of the task object!!!\end{itemize}
19 \item[Note:]This class is only used for the {\bf HLT integration into Ali\-Root}{\rm (p.\,\pageref{group__alihlt__system})}. \end{Desc}
24 Definition at line 46 of file Ali\-HLTTask.h.\subsection*{Public Member Functions}
25 \begin{CompactItemize}
29 {\bf Ali\-HLTTask} ({\bf Ali\-HLTConfiguration} $\ast$p\-Conf)
31 {\bf Ali\-HLTTask} (const {\bf Ali\-HLTTask} \&)
33 {\bf Ali\-HLTTask} \& {\bf operator=} (const {\bf Ali\-HLTTask} \&)
35 virtual {\bf $\sim$Ali\-HLTTask} ()
37 int {\bf Init} ({\bf Ali\-HLTConfiguration} $\ast$p\-Conf, {\bf Ali\-HLTComponent\-Handler} $\ast$p\-CH)
41 const char $\ast$ {\bf Get\-Name} () const
43 {\bf Ali\-HLTConfiguration} $\ast$ {\bf Get\-Conf} () const
45 {\bf Ali\-HLTComponent} $\ast$ {\bf Get\-Component} () const
47 {\bf Ali\-HLTTask} $\ast$ {\bf Find\-Dependency} (const char $\ast$id)
49 int {\bf Set\-Dependency} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
51 int {\bf Unset\-Dependency} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
53 int {\bf Check\-Dependencies} ()
55 int {\bf Depends} ({\bf Ali\-HLTTask} $\ast$p\-Task)
57 {\bf Ali\-HLTTask} $\ast$ {\bf Find\-Target} (const char $\ast$id)
59 int {\bf Set\-Target} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
61 int {\bf Unset\-Target} ({\bf Ali\-HLTTask} $\ast$p\-Target)
63 int {\bf Start\-Run} ()
67 int {\bf Process\-Task} (Int\_\-t event\-No)
69 int {\bf Get\-Nof\-Matching\-Data\-Blocks} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task) const
71 int {\bf Get\-Nof\-Matching\-Data\-Types} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task) const
73 int {\bf Subscribe} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$array\-Block\-Desc, int i\-Array\-Size)
75 int {\bf Release} ({\bf Ali\-HLTComponent\-Block\-Data} $\ast$p\-Block\-Desc, const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task)
77 void {\bf Print\-Status} ()
79 int {\bf Follow\-Dependency} (const char $\ast$id, TList $\ast$p\-Tgt\-List=NULL)
81 void {\bf Print\-Dependency\-Tree} (const char $\ast$id, int b\-Mode=0)
83 int {\bf Get\-Nof\-Sources} () const
85 \subsection*{Private Member Functions}
86 \begin{CompactItemize}
88 {\bf Class\-Def} ({\bf Ali\-HLTTask}, 1)
90 \subsection*{Private Attributes}
91 \begin{CompactItemize}
93 {\bf Ali\-HLTConfiguration} $\ast$ {\bf fp\-Configuration}
95 {\bf Ali\-HLTComponent} $\ast$ {\bf fp\-Component}
96 \begin{CompactList}\small\item\em transient \item\end{CompactList}\item
97 {\bf Ali\-HLTData\-Buffer} $\ast$ {\bf fp\-Data\-Buffer}
98 \begin{CompactList}\small\item\em transient \item\end{CompactList}\item
99 TList {\bf f\-List\-Targets}
100 \begin{CompactList}\small\item\em transient \item\end{CompactList}\item
101 TList {\bf f\-List\-Dependencies}
103 {\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\bf fp\-Block\-Data\-Array}
105 int {\bf f\-Block\-Data\-Array\-Size}
106 \begin{CompactList}\small\item\em transient \item\end{CompactList}\end{CompactItemize}
109 \subsection{Constructor \& Destructor Documentation}
110 \index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
111 \index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
112 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask ()}\label{classAliHLTTask_a0}
115 standard constructor \index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
116 \index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
117 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask ({\bf Ali\-HLTConfiguration} $\ast$ {\em p\-Conf})}\label{classAliHLTTask_a1}
120 constructor \begin{Desc}
123 \item[{\em p\-Conf}]pointer to configuration descriptor \end{description}
127 Definition at line 436 of file Ali\-HLTConfiguration.cxx.
129 \footnotesize\begin{verbatim}437 :
130 438 fpConfiguration(pConf),
131 439 fpComponent(NULL),
132 440 fpDataBuffer(NULL),
134 442 fListDependencies(),
135 443 fpBlockDataArray(NULL),
136 444 fBlockDataArraySize(0)
138 446 // see header file for function documentation
141 \end{verbatim}\normalsize
144 \index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
145 \index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
146 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask (const {\bf Ali\-HLTTask} \&)}\label{classAliHLTTask_a2}
149 not a valid copy constructor, defined according to effective C++ style
151 Definition at line 449 of file Ali\-HLTConfiguration.cxx.
155 \footnotesize\begin{verbatim}450 :
158 453 fpConfiguration(NULL),
159 454 fpComponent(NULL),
160 455 fpDataBuffer(NULL),
162 457 fListDependencies(),
163 458 fpBlockDataArray(NULL),
164 459 fBlockDataArraySize(0)
166 461 HLTFatal("copy constructor untested");
169 \end{verbatim}\normalsize
172 \index{AliHLTTask@{Ali\-HLTTask}!~AliHLTTask@{$\sim$AliHLTTask}}
173 \index{~AliHLTTask@{$\sim$AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
174 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::$\sim${\bf Ali\-HLTTask} ()\hspace{0.3cm}{\tt [virtual]}}\label{classAliHLTTask_a4}
179 Definition at line 471 of file Ali\-HLTConfiguration.cxx.
181 References f\-List\-Dependencies, f\-List\-Targets, fp\-Block\-Data\-Array, fp\-Component, Unset\-Dependency(), and Unset\-Target().
183 \footnotesize\begin{verbatim}472 {
184 473 TObjLink* lnk=fListDependencies.FirstLink();
186 475 while (lnk!=NULL) {
187 476 AliHLTTask* pTask=(AliHLTTask*)lnk->GetObject();
188 477 pTask->UnsetTarget(this);
191 480 lnk=fListTargets.FirstLink();
193 482 while (lnk!=NULL) {
194 483 AliHLTTask* pTask=(AliHLTTask*)lnk->GetObject();
195 484 pTask->UnsetDependency(this);
199 488 if (fpComponent) delete fpComponent;
200 489 fpComponent=NULL;
201 490 if (fpBlockDataArray) delete[] fpBlockDataArray;
202 491 fpBlockDataArray=NULL;
204 \end{verbatim}\normalsize
209 \subsection{Member Function Documentation}
210 \index{AliHLTTask@{Ali\-HLTTask}!CheckDependencies@{CheckDependencies}}
211 \index{CheckDependencies@{CheckDependencies}!AliHLTTask@{Ali\-HLTTask}}
212 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Check\-Dependencies ()}\label{classAliHLTTask_a13}
215 Return number of unresolved dependencies. Iterate through all the configurations the task depends on and check whether a corresponding task is available in the list. \begin{Desc}
216 \item[Returns:]number of unresolved dependencies \end{Desc}
219 Definition at line 666 of file Ali\-HLTConfiguration.cxx.
221 References Find\-Dependency(), fp\-Configuration, Ali\-HLTConfiguration::Get\-First\-Source(), Ali\-HLTConfiguration::Get\-Name(), and Ali\-HLTConfiguration::Get\-Next\-Source().
223 Referenced by Ali\-HLTSystem::Insert\-Task().
225 \footnotesize\begin{verbatim}667 {
226 668 // see header file for function documentation
228 670 AliHLTConfiguration* pSrc=fpConfiguration->GetFirstSource();
230 672 if (FindDependency(pSrc->GetName())==NULL) {
231 673 //HLTDebug("dependency \"%s\" unresolved", pSrc->GetName());
234 676 pSrc=fpConfiguration->GetNextSource();
238 \end{verbatim}\normalsize
241 \index{AliHLTTask@{Ali\-HLTTask}!ClassDef@{ClassDef}}
242 \index{ClassDef@{ClassDef}!AliHLTTask@{Ali\-HLTTask}}
243 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Class\-Def ({\bf Ali\-HLTTask}, 1)\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_d0}
246 \index{AliHLTTask@{Ali\-HLTTask}!Deinit@{Deinit}}
247 \index{Deinit@{Deinit}!AliHLTTask@{Ali\-HLTTask}}
248 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Deinit ()}\label{classAliHLTTask_a6}
251 De-Initialize the task. Final cleanup after the run. The {\bf Ali\-HLTComponent::Deinit}{\rm (p.\,\pageref{classAliHLTComponent_a5})} method of the component is called. The analysis component is deleted.
253 Definition at line 532 of file Ali\-HLTConfiguration.cxx.
255 References Ali\-HLTComponent::Deinit(), fp\-Component, Get\-Component(), Get\-Name(), and HLTWarning.
257 Referenced by Ali\-HLTSystem::Deinit\-Tasks().
259 \footnotesize\begin{verbatim}533 {
260 534 // see header file for function documentation
262 536 AliHLTComponent* pComponent=GetComponent();
263 537 fpComponent=NULL;
264 538 if (pComponent) {
265 539 //HLTDebug("delete component %s (%p)", pComponent->GetComponentID(), pComponent);
266 540 pComponent->Deinit();
267 541 delete pComponent;
269 543 HLTWarning("task %s (%p) doesn't seem to be in initialized", GetName(), this);
273 \end{verbatim}\normalsize
276 \index{AliHLTTask@{Ali\-HLTTask}!Depends@{Depends}}
277 \index{Depends@{Depends}!AliHLTTask@{Ali\-HLTTask}}
278 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Depends ({\bf Ali\-HLTTask} $\ast$ {\em p\-Task})}\label{classAliHLTTask_a14}
281 Check whether the current task depends on the task p\-Task. \begin{Desc}
284 \item[{\em p\-Task}]pointer to Task descriptor \end{description}
287 \item[Returns:]1 the current task depends on p\-Task \par
289 neg. error code if failed \end{Desc}
292 Definition at line 682 of file Ali\-HLTConfiguration.cxx.
294 References fp\-Configuration, Get\-Name(), and Ali\-HLTConfiguration::Get\-Source().
296 Referenced by Ali\-HLTSystem::Insert\-Task().
298 \footnotesize\begin{verbatim}683 {
299 684 // see header file for function documentation
302 687 if (fpConfiguration) {
303 688 iResult=fpConfiguration->GetSource(pTask->GetName())!=NULL;
305 690 //HLTDebug("task \"%s\" depends on \"%s\"", GetName(), pTask->GetName());
307 692 //HLTDebug("task \"%s\" independend of \"%s\"", GetName(), pTask->GetName());
317 \end{verbatim}\normalsize
320 \index{AliHLTTask@{Ali\-HLTTask}!EndRun@{EndRun}}
321 \index{EndRun@{EndRun}!AliHLTTask@{Ali\-HLTTask}}
322 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::End\-Run ()}\label{classAliHLTTask_a19}
325 Clean-up the task after event processing. The method cleans up internal structures.
327 Definition at line 812 of file Ali\-HLTConfiguration.cxx.
329 References f\-Block\-Data\-Array\-Size, fp\-Block\-Data\-Array, fp\-Data\-Buffer, Get\-Name(), and HLTWarning.
331 Referenced by Ali\-HLTSystem::Stop\-Tasks().
333 \footnotesize\begin{verbatim}813 {
334 814 // see header file for function documentation
336 816 if (fpBlockDataArray) {
337 817 fBlockDataArraySize=0;
338 818 delete [] fpBlockDataArray;
339 819 fpBlockDataArray=0;
341 821 HLTWarning("task %s (%p) doesn't seem to be in running mode", GetName(), this);
343 823 if (fpDataBuffer) {
344 824 AliHLTDataBuffer* pBuffer=fpDataBuffer;
345 825 fpDataBuffer=NULL;
350 \end{verbatim}\normalsize
353 \index{AliHLTTask@{Ali\-HLTTask}!FindDependency@{FindDependency}}
354 \index{FindDependency@{FindDependency}!AliHLTTask@{Ali\-HLTTask}}
355 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} $\ast$ Ali\-HLTTask::Find\-Dependency (const char $\ast$ {\em id})}\label{classAliHLTTask_a10}
358 Find a dependency with a certain {\em name id\/}. Searches in the list of dependencies for a task. \begin{Desc}
361 \item[{\em id}]the id of the {\bf CONFIGURATION}\par
362 {\bf NOTE:} the id does NOT specify a COMPONENT \end{description}
365 \item[Returns:]pointer to task \end{Desc}
368 Definition at line 568 of file Ali\-HLTConfiguration.cxx.
370 References f\-List\-Dependencies.
372 Referenced by Check\-Dependencies(), Print\-Status(), and Set\-Dependency().
374 \footnotesize\begin{verbatim}569 {
375 570 // see header file for function documentation
376 571 AliHLTTask* pTask=NULL;
378 573 pTask=(AliHLTTask*)fListDependencies.FindObject(id);
382 \end{verbatim}\normalsize
385 \index{AliHLTTask@{Ali\-HLTTask}!FindTarget@{FindTarget}}
386 \index{FindTarget@{FindTarget}!AliHLTTask@{Ali\-HLTTask}}
387 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} $\ast$ Ali\-HLTTask::Find\-Target (const char $\ast$ {\em id})}\label{classAliHLTTask_a15}
390 Find a target with a certain id. Tasks which depend on the current task are referred to be {\em targets\/}. \begin{Desc}
393 \item[{\em id}]configuration id to search for \end{description}
396 \item[Returns:]pointer to task instance \end{Desc}
399 Definition at line 703 of file Ali\-HLTConfiguration.cxx.
401 References f\-List\-Targets.
403 Referenced by Set\-Target().
405 \footnotesize\begin{verbatim}704 {
406 705 // see header file for function documentation
407 706 AliHLTTask* pTask=NULL;
409 708 pTask=(AliHLTTask*)fListTargets.FindObject(id);
413 \end{verbatim}\normalsize
416 \index{AliHLTTask@{Ali\-HLTTask}!FollowDependency@{FollowDependency}}
417 \index{FollowDependency@{FollowDependency}!AliHLTTask@{Ali\-HLTTask}}
418 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Follow\-Dependency (const char $\ast$ {\em id}, TList $\ast$ {\em p\-Tgt\-List} = {\tt NULL})}\label{classAliHLTTask_a26}
421 Search task dependency list recursively to find a dependency. \begin{Desc}
424 \item[{\em id}]id of the task to search for \item[{\em p\-Tgt\-List}](optional) target list to receive dependency tree \end{description}
427 \item[Returns:]0 if not found, $>$0 found in the n-th level, dependency list in the target list \end{Desc}
430 Definition at line 578 of file Ali\-HLTConfiguration.cxx.
432 References f\-List\-Dependencies.
434 Referenced by Print\-Dependency\-Tree().
436 \footnotesize\begin{verbatim}579 {
437 580 // see header file for function documentation
440 583 AliHLTTask* pDep=NULL;
441 584 if ((pDep=(AliHLTTask*)fListDependencies.FindObject(id))!=NULL) {
442 585 if (pTgtList) pTgtList->Add(pDep);
445 588 TObjLink* lnk=fListDependencies.FirstLink();
446 589 while (lnk && iResult==0) {
447 590 pDep=(AliHLTTask*)lnk->GetObject();
449 592 if ((iResult=pDep->FollowDependency(id, pTgtList))>0) {
450 593 if (pTgtList) pTgtList->AddFirst(pDep);
464 \end{verbatim}\normalsize
467 \index{AliHLTTask@{Ali\-HLTTask}!GetComponent@{GetComponent}}
468 \index{GetComponent@{GetComponent}!AliHLTTask@{Ali\-HLTTask}}
469 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTComponent} $\ast$ Ali\-HLTTask::Get\-Component () const}\label{classAliHLTTask_a9}
472 Return pointer to component, which the task internally holds. {\bf Never delete this object!!!} \begin{Desc}
473 \item[Returns:]instance of the component \end{Desc}
476 Definition at line 562 of file Ali\-HLTConfiguration.cxx.
478 Referenced by Deinit(), Get\-Nof\-Matching\-Data\-Blocks(), Get\-Nof\-Matching\-Data\-Types(), Ali\-HLTSystem::Init\-Benchmarking(), Print\-Status(), Process\-Task(), Release(), Start\-Run(), and Subscribe().
480 \footnotesize\begin{verbatim}563 {
481 564 // see header file for function documentation
482 565 return fpComponent;
484 \end{verbatim}\normalsize
487 \index{AliHLTTask@{Ali\-HLTTask}!GetConf@{GetConf}}
488 \index{GetConf@{GetConf}!AliHLTTask@{Ali\-HLTTask}}
489 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTConfiguration} $\ast$ Ali\-HLTTask::Get\-Conf () const}\label{classAliHLTTask_a8}
492 Return pointer to configuration. The tasks holds internally the configuration object. \begin{Desc}
493 \item[Returns:]pointer to configuration \end{Desc}
496 Definition at line 556 of file Ali\-HLTConfiguration.cxx.
498 Referenced by Ali\-HLTSystem::Build\-Task\-List().
500 \footnotesize\begin{verbatim}557 {
501 558 // see header file for function documentation
502 559 return fpConfiguration;
504 \end{verbatim}\normalsize
507 \index{AliHLTTask@{Ali\-HLTTask}!GetName@{GetName}}
508 \index{GetName@{GetName}!AliHLTTask@{Ali\-HLTTask}}
509 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Ali\-HLTTask::Get\-Name () const}\label{classAliHLTTask_a7}
512 Get the name of the object. This is an overridden TObject function in order to return the configuration name instead of the class name. Enables use of TList standard functions. \begin{Desc}
513 \item[Returns:]name of the configuration \end{Desc}
516 Definition at line 548 of file Ali\-HLTConfiguration.cxx.
518 References fp\-Configuration, and Ali\-HLTConfiguration::Get\-Name().
520 Referenced by Ali\-HLTSystem::Build\-Task\-List(), Deinit(), Depends(), End\-Run(), Init(), Ali\-HLTSystem::Insert\-Task(), Print\-Dependency\-Tree(), Print\-Status(), Process\-Task(), Ali\-HLTSystem::Process\-Tasks(), Set\-Dependency(), Set\-Target(), and Start\-Run().
522 \footnotesize\begin{verbatim}549 {
523 550 // see header file for function documentation
524 551 if (fpConfiguration)
525 552 return fpConfiguration->GetName();
526 553 return TObject::GetName();
528 \end{verbatim}\normalsize
531 \index{AliHLTTask@{Ali\-HLTTask}!GetNofMatchingDataBlocks@{GetNofMatchingDataBlocks}}
532 \index{GetNofMatchingDataBlocks@{GetNofMatchingDataBlocks}!AliHLTTask@{Ali\-HLTTask}}
533 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Get\-Nof\-Matching\-Data\-Blocks (const {\bf Ali\-HLTTask} $\ast$ {\em p\-Consumer\-Task}) const}\label{classAliHLTTask_a21}
536 Determine the number of matching data block between the component and the data buffer of a consumer component. It checks which data types from the list of input data types of the consumer component can be provided by data blocks of the current component. \begin{Desc}
539 \item[{\em p\-Consumer\-Task}]the task which subscribes to the data \end{description}
542 \item[Returns:]number of matching data blocks \end{Desc}
545 Definition at line 959 of file Ali\-HLTConfiguration.cxx.
547 References Ali\-HLTData\-Buffer::Find\-Matching\-Data\-Blocks(), fp\-Data\-Buffer, Get\-Component(), and HLTFatal.
549 Referenced by Process\-Task().
551 \footnotesize\begin{verbatim}960 {
552 961 // see header file for function documentation
554 963 if (pConsumerTask) {
555 964 if (fpDataBuffer) {
556 965 iResult=fpDataBuffer->FindMatchingDataBlocks(pConsumerTask->GetComponent(), NULL);
558 967 HLTFatal("internal data buffer missing");
566 \end{verbatim}\normalsize
569 \index{AliHLTTask@{Ali\-HLTTask}!GetNofMatchingDataTypes@{GetNofMatchingDataTypes}}
570 \index{GetNofMatchingDataTypes@{GetNofMatchingDataTypes}!AliHLTTask@{Ali\-HLTTask}}
571 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Get\-Nof\-Matching\-Data\-Types (const {\bf Ali\-HLTTask} $\ast$ {\em p\-Consumer\-Task}) const}\label{classAliHLTTask_a22}
574 Determine the number of matching data types between the component and a consumer component. It checks which data types from the list of input data types of the consumer component can be provided by the current component. \begin{Desc}
577 \item[{\em p\-Consumer\-Task}]the task which subscribes to the data \end{description}
580 \item[Returns:]number of matching data types \end{Desc}
583 Definition at line 976 of file Ali\-HLTConfiguration.cxx.
585 References Ali\-HLTComponent::Find\-Matching\-Data\-Types(), Get\-Component(), HLTError, and HLTFatal.
587 Referenced by Start\-Run().
589 \footnotesize\begin{verbatim}977 {
590 978 // see header file for function documentation
592 980 if (pConsumerTask) {
593 981 AliHLTComponent* pComponent=GetComponent();
594 982 if (!pComponent) {
596 984 HLTError("component not initialized");
599 987 if (pComponent) {
600 988 iResult=pComponent->FindMatchingDataTypes(pConsumerTask->GetComponent(), NULL);
602 990 HLTFatal("task initialization failed");
610 \end{verbatim}\normalsize
613 \index{AliHLTTask@{Ali\-HLTTask}!GetNofSources@{GetNofSources}}
614 \index{GetNofSources@{GetNofSources}!AliHLTTask@{Ali\-HLTTask}}
615 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Get\-Nof\-Sources () const\hspace{0.3cm}{\tt [inline]}}\label{classAliHLTTask_a28}
618 Get number of source tasks. \begin{Desc}
619 \item[Returns:]number of source tasks \end{Desc}
622 Definition at line 269 of file Ali\-HLTTask.h.
624 References f\-List\-Dependencies.
626 \footnotesize\begin{verbatim}269 {return fListDependencies.GetSize();}
627 \end{verbatim}\normalsize
630 \index{AliHLTTask@{Ali\-HLTTask}!Init@{Init}}
631 \index{Init@{Init}!AliHLTTask@{Ali\-HLTTask}}
632 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Init ({\bf Ali\-HLTConfiguration} $\ast$ {\em p\-Conf}, {\bf Ali\-HLTComponent\-Handler} $\ast$ {\em p\-CH})}\label{classAliHLTTask_a5}
635 Initialize the task. The task is initialized with a configuration descriptor. It needs a component handler instance to create the analysis component. The component is created and initialized. \begin{Desc}
638 \item[{\em p\-Conf}]pointer to configuration descriptor, can be NULL if it was already provided to the constructor \item[{\em p\-CH}]the HLT component handler \end{description}
642 Definition at line 494 of file Ali\-HLTConfiguration.cxx.
644 References Ali\-HLTComponent\-Handler::Create\-Component(), fp\-Component, fp\-Configuration, Ali\-HLTConfiguration::Get\-Arguments(), Ali\-HLTConfiguration::Get\-Component\-ID(), Ali\-HLTConfiguration::Get\-Name(), Get\-Name(), HLTError, and HLTWarning.
646 Referenced by Ali\-HLTSystem::Init\-Tasks().
648 \footnotesize\begin{verbatim}495 {
649 496 // see header file for function documentation
651 498 if (fpConfiguration!=NULL && pConf!=NULL && fpConfiguration!=pConf) {
652 499 HLTWarning("overriding existing reference to configuration object %p (%s) by %p",
653 500 fpConfiguration, GetName(), pConf);
655 502 if (pConf!=NULL) fpConfiguration=pConf;
656 503 if (fpConfiguration) {
659 506 const char** argv=NULL;
660 507 if ((iResult=fpConfiguration->GetArguments(&argv))>=0) {
661 508 argc=iResult; // just to make it clear
662 509 // TODO: we have to think about the optional environment parameter,
663 510 // currently just set to NULL.
664 511 iResult=pCH->CreateComponent(fpConfiguration->GetComponentID(), NULL, argc, argv, fpComponent);
665 512 if (fpComponent || iResult<=0) {
666 513 //HLTDebug("component %s (%p) created", fpComponent->GetComponentID(), fpComponent);
668 515 HLTError("can not find component \"%s\" (%d)", fpConfiguration->GetComponentID(), iResult);
671 518 HLTError("can not get argument list for configuration %s (%s)", fpConfiguration->GetName(), fpConfiguration->GetComponentID());
675 522 HLTError("component handler instance needed for task initialization");
679 526 HLTError("configuration object instance needed for task initialization");
684 \end{verbatim}\normalsize
687 \index{AliHLTTask@{Ali\-HLTTask}!operator=@{operator=}}
688 \index{operator=@{operator=}!AliHLTTask@{Ali\-HLTTask}}
689 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} \& Ali\-HLTTask::operator= (const {\bf Ali\-HLTTask} \&)}\label{classAliHLTTask_a3}
692 not a valid assignment op, but defined according to effective C++ style
694 Definition at line 464 of file Ali\-HLTConfiguration.cxx.
698 \footnotesize\begin{verbatim}465 {
699 466 // see header file for function documentation
700 467 HLTFatal("assignment operator untested");
703 \end{verbatim}\normalsize
706 \index{AliHLTTask@{Ali\-HLTTask}!PrintDependencyTree@{PrintDependencyTree}}
707 \index{PrintDependencyTree@{PrintDependencyTree}!AliHLTTask@{Ali\-HLTTask}}
708 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Ali\-HLTTask::Print\-Dependency\-Tree (const char $\ast$ {\em id}, int {\em b\-Mode} = {\tt 0})}\label{classAliHLTTask_a27}
711 Print the tree for a certain dependency either from the task or configuration list. Each task posseses two \char`\"{}link lists\char`\"{}: The configurations are the origin of the task list. In case of an error during the built of the task list, the dependencies for the task list might be incomplete. In this case the configurations can give infomation on the error reason. \begin{Desc}
714 \item[{\em id}]id of the dependency to search for \item[{\em b\-Mode}]0 (default) from task dependency list, \par
715 1 from configuration list \end{description}
719 Definition at line 608 of file Ali\-HLTConfiguration.cxx.
721 References Follow\-Dependency(), Ali\-HLTConfiguration::Follow\-Dependency(), fp\-Configuration, Get\-Name(), HLTLog\-Keyword, and HLTMessage.
723 Referenced by Ali\-HLTSystem::Build\-Task\-List().
725 \footnotesize\begin{verbatim}609 {
726 610 // see header file for function documentation
727 611 HLTLogKeyword("task dependencies");
730 614 if (bFromConfiguration) {
731 615 if (fpConfiguration)
732 616 iResult=fpConfiguration->FollowDependency(id, &tgtList);
736 620 iResult=FollowDependency(id, &tgtList);
738 622 HLTMessage(" task \"%s\": dependency level %d ", GetName(), iResult);
739 623 TObjLink* lnk=tgtList.FirstLink();
741 625 char* pSpace = new char[iResult+1];
743 627 memset(pSpace, 32, iResult);
746 630 TObject* obj=lnk->GetObject();
747 631 HLTMessage(" %s^-- %s ", &pSpace[i--], obj->GetName());
750 634 delete [] pSpace;
756 \end{verbatim}\normalsize
759 \index{AliHLTTask@{Ali\-HLTTask}!PrintStatus@{PrintStatus}}
760 \index{PrintStatus@{PrintStatus}!AliHLTTask@{Ali\-HLTTask}}
761 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Ali\-HLTTask::Print\-Status ()}\label{classAliHLTTask_a25}
764 Print the status of the task with component, dependencies and targets.
766 Definition at line 1033 of file Ali\-HLTConfiguration.cxx.
768 References Find\-Dependency(), f\-List\-Targets, fp\-Configuration, Get\-Component(), Ali\-HLTComponent::Get\-Component\-ID(), Ali\-HLTConfiguration::Get\-First\-Source(), Get\-Name(), Ali\-HLTConfiguration::Get\-Name(), Ali\-HLTConfiguration::Get\-Next\-Source(), HLTLog\-Keyword, and HLTMessage.
770 Referenced by Ali\-HLTSystem::Print\-Task\-List().
772 \footnotesize\begin{verbatim}1034 {
773 1035 // see header file for function documentation
774 1036 HLTLogKeyword("task properties");
775 1037 AliHLTComponent* pComponent=GetComponent();
776 1038 if (pComponent) {
777 1039 HLTMessage(" component: %s (%p)", pComponent->GetComponentID(), pComponent);
779 1041 HLTMessage(" no component set!");
781 1043 if (fpConfiguration) {
782 1044 AliHLTConfiguration* pSrc=fpConfiguration->GetFirstSource();
784 1046 const char* pQualifier="unresolved";
785 1047 if (FindDependency(pSrc->GetName()))
786 1048 pQualifier="resolved";
787 1049 HLTMessage(" source: %s (%s)", pSrc->GetName(), pQualifier);
788 1050 pSrc=fpConfiguration->GetNextSource();
790 1052 TObjLink* lnk = fListTargets.FirstLink();
792 1054 TObject *obj = lnk->GetObject();
793 1055 HLTMessage(" target: %s", obj->GetName());
794 1056 lnk = lnk->Next();
797 1059 HLTMessage(" task \"%s\" not initialized", GetName());
800 \end{verbatim}\normalsize
803 \index{AliHLTTask@{Ali\-HLTTask}!ProcessTask@{ProcessTask}}
804 \index{ProcessTask@{ProcessTask}!AliHLTTask@{Ali\-HLTTask}}
805 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Process\-Task (Int\_\-t {\em event\-No})}\label{classAliHLTTask_a20}
808 Process the task. If all dependencies are resolved the tasks subscribes to the data of all source tasks, builds the block descriptor and calls the {\bf Ali\-HLTComponent::Process\-Event}{\rm (p.\,\pageref{classAliHLTComponent_a6})} method of the component, after processing, the data blocks are released. \par
809 The {\bf Start\-Run}{\rm (p.\,\pageref{classAliHLTTask_a18})} method must be called before.
811 Definition at line 831 of file Ali\-HLTConfiguration.cxx.
813 References Ali\-HLTUInt32\_\-t, Ali\-HLTUInt8\_\-t, Ali\-HLTComponent\-Event\-Data::f\-Block\-Cnt, f\-Block\-Data\-Array\-Size, Ali\-HLTComponent\-Event\-Data::f\-Event\-ID, Ali\-HLTComponent::Fill\-Event\-Data(), f\-List\-Dependencies, fp\-Block\-Data\-Array, fp\-Component, fp\-Data\-Buffer, Ali\-HLTComponent\-Block\-Data::f\-Size, Get\-Component(), Ali\-HLTComponent::Get\-Component\-ID(), Ali\-HLTComponent::Get\-Component\-Type(), Get\-Name(), Get\-Nof\-Matching\-Data\-Blocks(), Ali\-HLTComponent::Get\-Output\-Data\-Size(), Ali\-HLTData\-Buffer::Get\-Target\-Buffer(), HLTDebug, HLTError, HLTFatal, Ali\-HLTComponent::Process\-Event(), Release(), Ali\-HLTData\-Buffer::Reset(), Ali\-HLTData\-Buffer::Set\-Segments(), and Subscribe().
815 Referenced by Ali\-HLTSystem::Process\-Tasks().
817 \footnotesize\begin{verbatim}832 {
818 833 // see header file for function documentation
820 835 AliHLTComponent* pComponent=GetComponent();
821 836 if (pComponent && fpDataBuffer) {
822 837 HLTDebug("Processing task %s (%p) fpDataBuffer %p", GetName(), this, fpDataBuffer);
823 838 fpDataBuffer->Reset();
824 839 int iSourceDataBlock=0;
825 840 int iInputDataVolume=0;
827 842 int iNofInputDataBlocks=0;
828 843 /* TODO: the assumption of only one output data type per component is the current constraint
829 844 * later it should be checked how many output blocks of the source component match the input
830 845 * data types of the consumer component (GetNofMatchingDataBlocks). If one assumes that a
831 846 * certain output block is always been produced, the initialization could be done in the
832 847 * StartRun. Otherwise the fpBlockDataArray has to be adapted each time.
834 849 iNofInputDataBlocks=fListDependencies.GetSize(); // one block per source
835 850 // is not been used since the allocation was done in StartRun, but check the size
836 851 if (iNofInputDataBlocks>fBlockDataArraySize) {
837 852 HLTError("block data array too small");
840 855 AliHLTTask* pSrcTask=NULL;
841 856 TList subscribedTaskList;
842 857 TObjLink* lnk=fListDependencies.FirstLink();
844 859 // subscribe to all source tasks
845 860 while (lnk && iResult>=0) {
846 861 pSrcTask=(AliHLTTask*)lnk->GetObject();
848 863 int iMatchingDB=pSrcTask->GetNofMatchingDataBlocks(this);
849 864 if (iMatchingDB<=fBlockDataArraySize-iSourceDataBlock) {
850 865 if (fpBlockDataArray) {
851 866 if ((iResult=pSrcTask->Subscribe(this, &fpBlockDataArray[iSourceDataBlock],fBlockDataArraySize-iSourceDataBlock))>0) {
852 867 for (int i=0; i<iResult; i++) {
853 868 iInputDataVolume+=fpBlockDataArray[i+iSourceDataBlock].fSize;
854 869 // put the source task as many times into the list as it provides data blocks
855 870 // makes the bookkeeping for the data release easier
856 871 subscribedTaskList.Add(pSrcTask);
858 873 iSourceDataBlock+=iResult;
859 874 HLTDebug("Task %s (%p) successfully subscribed to %d data block(s) of task %s (%p)", GetName(), this, iResult, pSrcTask->GetName(), pSrcTask);
862 877 HLTError("Task %s (%p): subscription to task %s (%p) failed with error %d", GetName(), this, pSrcTask->GetName(), pSrcTask, iResult);
866 881 HLTFatal("Task %s (%p): BlockData array not allocated", GetName(), this);
870 885 HLTFatal("Task %s (%p): too little space in data block array for subscription to task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
871 886 HLTDebug("#data types=%d, array size=%d, current index=%d", iMatchingDB, fBlockDataArraySize, iSourceDataBlock);
875 890 HLTFatal("fatal internal error in ROOT list handling");
881 896 // process the event
882 897 if (iResult>=0) {
883 898 long unsigned int iConstBase=0;
884 899 double fInputMultiplier=0;
885 900 if (pComponent->GetComponentType()!=AliHLTComponent::kSink)
886 901 pComponent->GetOutputDataSize(iConstBase, fInputMultiplier);
887 902 int iOutputDataSize=int(fInputMultiplier*iInputDataVolume) + iConstBase;
888 903 //HLTDebug("task %s: reqired output size %d", GetName(), iOutputDataSize);
889 904 AliHLTUInt8_t* pTgtBuffer=NULL;
890 905 if (iOutputDataSize>0) pTgtBuffer=fpDataBuffer->GetTargetBuffer(iOutputDataSize);
891 906 //HLTDebug("provided raw buffer %p", pTgtBuffer);
892 907 AliHLTComponentEventData evtData;
893 908 AliHLTComponent::FillEventData(evtData);
894 909 evtData.fEventID=(AliHLTEventID_t)eventNo;
895 910 evtData.fBlockCnt=iSourceDataBlock;
896 911 AliHLTComponentTriggerData trigData;
897 912 AliHLTUInt32_t size=iOutputDataSize;
898 913 AliHLTUInt32_t outputBlockCnt=0;
899 914 AliHLTComponentBlockData* outputBlocks=NULL;
900 915 AliHLTComponentEventDoneData* edd;
901 916 if (pTgtBuffer!=NULL || iOutputDataSize==0) {
902 917 iResult=pComponent->ProcessEvent(evtData, fpBlockDataArray, trigData, pTgtBuffer, size, outputBlockCnt, outputBlocks, edd);
903 918 HLTDebug("task %s: component %s ProcessEvent finnished (%d): size=%d blocks=%d", GetName(), pComponent->GetComponentID(), iResult, size, outputBlockCnt);
904 919 if (iResult>=0 && pTgtBuffer) {
905 920 iResult=fpDataBuffer->SetSegments(pTgtBuffer, outputBlocks, outputBlockCnt);
906 921 delete [] outputBlocks; outputBlocks=NULL; outputBlockCnt=0;
909 924 HLTError("task %s: no target buffer available", GetName());
914 929 // now release all buffers which we have subscribed to
915 930 iSourceDataBlock=0;
916 931 lnk=subscribedTaskList.FirstLink();
918 933 pSrcTask=(AliHLTTask*)lnk->GetObject();
921 936 if ((iTempRes=pSrcTask->Release(&fpBlockDataArray[iSourceDataBlock], this))>=0) {
922 937 HLTDebug("Task %s (%p) successfully released task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
924 939 HLTError("Task %s (%p): realease of task %s (%p) failed with error %d", GetName(), this, pSrcTask->GetName(), pSrcTask, iTempRes);
927 942 HLTFatal("task %s (%p): internal error in ROOT list handling", GetName(), this);
928 943 if (iResult>=0) iResult=-EFAULT;
930 945 subscribedTaskList.Remove(lnk);
931 946 lnk=subscribedTaskList.FirstLink();
932 947 iSourceDataBlock++;
934 949 if (subscribedTaskList.GetSize()>0) {
935 950 HLTError("task %s (%p): could not release all data buffers", GetName(), this);
938 953 HLTError("task %s (%p): internal failure (not initialized component %p, data buffer %p)", GetName(), this, fpComponent, fpDataBuffer);
943 \end{verbatim}\normalsize
946 \index{AliHLTTask@{Ali\-HLTTask}!Release@{Release}}
947 \index{Release@{Release}!AliHLTTask@{Ali\-HLTTask}}
948 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Release ({\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\em p\-Block\-Desc}, const {\bf Ali\-HLTTask} $\ast$ {\em p\-Consumer\-Task})}\label{classAliHLTTask_a24}
951 Release a block descriptor. Notification from consumer task. \begin{Desc}
954 \item[{\em p\-Block\-Desc}]descriptor of the data segment \item[{\em p\-Consumer\-Task}]the task which subscribed to the data \end{description}
957 \item[Returns:]: $>$0 if success, negative error code if failed \end{Desc}
960 Definition at line 1016 of file Ali\-HLTConfiguration.cxx.
962 References fp\-Data\-Buffer, Get\-Component(), HLTFatal, and Ali\-HLTData\-Buffer::Release().
964 Referenced by Process\-Task().
966 \footnotesize\begin{verbatim}1017 {
967 1018 // see header file for function documentation
969 1020 if (pConsumerTask && pBlockDesc) {
970 1021 if (fpDataBuffer) {
971 1022 iResult=fpDataBuffer->Release(pBlockDesc, pConsumerTask->GetComponent());
973 1024 HLTFatal("internal data buffer missing");
974 1025 iResult=-EFAULT;
977 1028 iResult=-EINVAL;
981 \end{verbatim}\normalsize
984 \index{AliHLTTask@{Ali\-HLTTask}!SetDependency@{SetDependency}}
985 \index{SetDependency@{SetDependency}!AliHLTTask@{Ali\-HLTTask}}
986 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Set\-Dependency ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a11}
989 Add a dependency for the task. The task maintains a list of other tasks it depends on. \begin{Desc}
992 \item[{\em p\-Dep}]pointer to a task descriptor \end{description}
995 \item[Returns:]0 if suceeded, neg error code if failed \par
996 -EEXIST : the dependencie exists already \end{Desc}
999 Definition at line 641 of file Ali\-HLTConfiguration.cxx.
1001 References Find\-Dependency(), f\-List\-Dependencies, and Get\-Name().
1003 Referenced by Ali\-HLTSystem::Insert\-Task().
1005 \footnotesize\begin{verbatim}642 {
1006 643 // see header file for function documentation
1009 646 if (FindDependency(pDep->GetName())==NULL) {
1010 647 fListDependencies.Add(pDep);
1012 649 iResult=-EEXIST;
1015 652 iResult=-EINVAL;
1019 \end{verbatim}\normalsize
1022 \index{AliHLTTask@{Ali\-HLTTask}!SetTarget@{SetTarget}}
1023 \index{SetTarget@{SetTarget}!AliHLTTask@{Ali\-HLTTask}}
1024 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Set\-Target ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a16}
1027 Insert task into target list. The target list specifies all the tasks which depend on the current task. \begin{Desc}
1030 \item[{\em p\-Dep}]pointer task object \end{description}
1033 \item[Returns:]$>$=0 if succeeded, neg. error code if failed \end{Desc}
1036 Definition at line 713 of file Ali\-HLTConfiguration.cxx.
1038 References Find\-Target(), f\-List\-Targets, and Get\-Name().
1040 Referenced by Ali\-HLTSystem::Insert\-Task().
1042 \footnotesize\begin{verbatim}714 {
1043 715 // see header file for function documentation
1046 718 if (FindTarget(pTgt->GetName())==NULL) {
1047 719 fListTargets.Add(pTgt);
1049 721 iResult=-EEXIST;
1052 724 iResult=-EINVAL;
1056 \end{verbatim}\normalsize
1059 \index{AliHLTTask@{Ali\-HLTTask}!StartRun@{StartRun}}
1060 \index{StartRun@{StartRun}!AliHLTTask@{Ali\-HLTTask}}
1061 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Start\-Run ()}\label{classAliHLTTask_a18}
1064 Prepare the task for event processing. The method initializes the Data Buffer and calls the {\bf Ali\-HLTComponent::Init}{\rm (p.\,\pageref{classAliHLTComponent_a4})} method of the component.\par
1065 The {\bf Process\-Task}{\rm (p.\,\pageref{classAliHLTTask_a20})} method can be called an arbitrary number of times as soon as the task is in {\em running\/} mode.
1067 Definition at line 735 of file Ali\-HLTConfiguration.cxx.
1069 References f\-Block\-Data\-Array\-Size, f\-List\-Dependencies, f\-List\-Targets, fp\-Block\-Data\-Array, fp\-Data\-Buffer, Get\-Component(), Get\-Name(), Get\-Nof\-Matching\-Data\-Types(), HLTDebug, HLTError, HLTFatal, HLTWarning, and Ali\-HLTData\-Buffer::Set\-Consumer().
1071 Referenced by Ali\-HLTSystem::Start\-Tasks().
1073 \footnotesize\begin{verbatim}736 {
1074 737 // see header file for function documentation
1076 739 int iNofInputDataBlocks=0;
1077 740 AliHLTComponent* pComponent=GetComponent();
1078 741 if (pComponent) {
1079 742 // determine the number of input data blocks provided from the source tasks
1080 743 TObjLink* lnk=fListDependencies.FirstLink();
1081 744 while (lnk && iResult>=0) {
1082 745 AliHLTTask* pSrcTask=(AliHLTTask*)lnk->GetObject();
1084 747 if ((iResult=pSrcTask->GetNofMatchingDataTypes(this))>0) {
1085 748 iNofInputDataBlocks+=iResult;
1086 749 } else if (iResult==0) {
1087 750 HLTWarning("source task %s (%p) does not provide any matching data type for task %s (%p)", pSrcTask->GetName(), pSrcTask, GetName(), this);
1089 752 HLTError("task %s (%p): error getting matching data types for source task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
1090 753 iResult=-EFAULT;
1093 756 lnk=lnk->Next();
1095 758 if (iResult>=0) {
1096 759 if (fpBlockDataArray) {
1097 760 HLTWarning("block data array for task %s (%p) was not cleaned", GetName(), this);
1098 761 delete [] fpBlockDataArray;
1099 762 fpBlockDataArray=NULL;
1100 763 fBlockDataArraySize=0;
1103 766 // component init
1104 767 // the initialization of the component is done by the ComponentHandler after creation
1105 768 // of the component.
1106 769 //iResult=Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv );
1108 771 // allocate internal task variables for bookkeeping aso.
1109 772 // we allocate the BlockData array with at least one member
1110 773 if (iNofInputDataBlocks==0) iNofInputDataBlocks=1;
1111 774 fpBlockDataArray=new AliHLTComponentBlockData[iNofInputDataBlocks];
1112 775 if (fpBlockDataArray) {
1113 776 fBlockDataArraySize=iNofInputDataBlocks;
1115 778 HLTError("memory allocation failed");
1116 779 iResult=-ENOMEM;
1119 782 // allocate the data buffer, which controls the output buffer and subscriptions
1120 783 if (iResult>=0) {
1121 784 fpDataBuffer=new AliHLTDataBuffer;
1122 785 if (fpDataBuffer!=NULL) {
1123 786 HLTDebug("created data buffer %p for task %s (%p)", fpDataBuffer, GetName(), this);
1124 787 TObjLink* lnk=fListTargets.FirstLink();
1125 788 while (lnk && iResult>=0) {
1126 789 AliHLTTask* pTgtTask=(AliHLTTask*)lnk->GetObject();
1128 791 if ((iResult=fpDataBuffer->SetConsumer(pTgtTask->GetComponent()))>=0) {
1132 795 iResult=-EFAULT;
1134 797 lnk=lnk->Next();
1137 800 HLTFatal("can not create data buffer object, memory allocation failed");
1138 801 iResult=-ENOMEM;
1143 806 HLTError("task %s (%p) does not have a component", GetName(), this);
1144 807 iResult=-EFAULT;
1148 \end{verbatim}\normalsize
1151 \index{AliHLTTask@{Ali\-HLTTask}!Subscribe@{Subscribe}}
1152 \index{Subscribe@{Subscribe}!AliHLTTask@{Ali\-HLTTask}}
1153 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Subscribe (const {\bf Ali\-HLTTask} $\ast$ {\em p\-Consumer\-Task}, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\em array\-Block\-Desc}, int {\em i\-Array\-Size})}\label{classAliHLTTask_a23}
1156 Subscribe to the data of a source task. The function prepares the block descriptors for subsequent use with the {\bf Ali\-HLTComponent::Process\-Event}{\rm (p.\,\pageref{classAliHLTComponent_a6})} method, the method prepares all block descriptors which match the input data type of the consumer the function returns the number of blocks which would be prepared in case the target array is big enough. \begin{Desc}
1159 \item[{\em p\-Consumer\-Task}]the task which subscribes to the data \item[{\em array\-Block\-Desc}]pointer to block descriptor to be filled \item[{\em i\-Array\-Size}]size of the block descriptor array \end{description}
1162 \item[Returns:]number of matching data blocks, negative error code if failed \end{Desc}
1165 Definition at line 999 of file Ali\-HLTConfiguration.cxx.
1167 References fp\-Data\-Buffer, Get\-Component(), HLTFatal, and Ali\-HLTData\-Buffer::Subscribe().
1169 Referenced by Process\-Task().
1171 \footnotesize\begin{verbatim}1000 {
1172 1001 // see header file for function documentation
1174 1003 if (pConsumerTask) {
1175 1004 if (fpDataBuffer) {
1176 1005 iResult=fpDataBuffer->Subscribe(pConsumerTask->GetComponent(), pBlockDesc, iArraySize);
1178 1007 HLTFatal("internal data buffer missing");
1179 1008 iResult=-EFAULT;
1182 1011 iResult=-EINVAL;
1184 1013 return iResult;
1186 \end{verbatim}\normalsize
1189 \index{AliHLTTask@{Ali\-HLTTask}!UnsetDependency@{UnsetDependency}}
1190 \index{UnsetDependency@{UnsetDependency}!AliHLTTask@{Ali\-HLTTask}}
1191 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Unset\-Dependency ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a12}
1194 Clear a dependency. The ROOT TList touches the object which is in the list, even though it shouldn't care about. Thats why all lists have to be cleared before objects are deleted.
1196 Definition at line 657 of file Ali\-HLTConfiguration.cxx.
1198 References f\-List\-Dependencies, fp\-Configuration, and Ali\-HLTConfiguration::Invalidate\-Sources().
1200 Referenced by $\sim$Ali\-HLTTask().
1202 \footnotesize\begin{verbatim}658 {
1203 659 fListDependencies.Remove(pDep);
1204 660 if (fpConfiguration) {
1205 661 fpConfiguration->InvalidateSources();
1209 \end{verbatim}\normalsize
1212 \index{AliHLTTask@{Ali\-HLTTask}!UnsetTarget@{UnsetTarget}}
1213 \index{UnsetTarget@{UnsetTarget}!AliHLTTask@{Ali\-HLTTask}}
1214 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Unset\-Target ({\bf Ali\-HLTTask} $\ast$ {\em p\-Target})}\label{classAliHLTTask_a17}
1217 Clear a target. The ROOT TList touches the object which is in the list, even though it shouldn't care about. Thats why all lists have to be cleared before objects are deleted.
1219 Definition at line 729 of file Ali\-HLTConfiguration.cxx.
1221 References f\-List\-Targets.
1223 Referenced by $\sim$Ali\-HLTTask().
1225 \footnotesize\begin{verbatim}730 {
1226 731 fListTargets.Remove(pTarget);
1229 \end{verbatim}\normalsize
1234 \subsection{Member Data Documentation}
1235 \index{AliHLTTask@{Ali\-HLTTask}!fBlockDataArraySize@{fBlockDataArraySize}}
1236 \index{fBlockDataArraySize@{fBlockDataArraySize}!AliHLTTask@{Ali\-HLTTask}}
1237 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf Ali\-HLTTask::f\-Block\-Data\-Array\-Size}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r6}
1242 size of the block data array
1244 Definition at line 290 of file Ali\-HLTTask.h.
1246 Referenced by End\-Run(), Process\-Task(), and Start\-Run().\index{AliHLTTask@{Ali\-HLTTask}!fListDependencies@{fListDependencies}}
1247 \index{fListDependencies@{fListDependencies}!AliHLTTask@{Ali\-HLTTask}}
1248 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}TList {\bf Ali\-HLTTask::f\-List\-Dependencies}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r4}
1251 the list of sources (tasks upon which the current one depends)
1253 Definition at line 281 of file Ali\-HLTTask.h.
1255 Referenced by Find\-Dependency(), Follow\-Dependency(), Get\-Nof\-Sources(), Process\-Task(), Set\-Dependency(), Start\-Run(), Unset\-Dependency(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fListTargets@{fListTargets}}
1256 \index{fListTargets@{fListTargets}!AliHLTTask@{Ali\-HLTTask}}
1257 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}TList {\bf Ali\-HLTTask::f\-List\-Targets}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r3}
1262 the list of targets (tasks which depend upon the current one)
1264 Definition at line 279 of file Ali\-HLTTask.h.
1266 Referenced by Find\-Target(), Print\-Status(), Set\-Target(), Start\-Run(), Unset\-Target(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpBlockDataArray@{fpBlockDataArray}}
1267 \index{fpBlockDataArray@{fpBlockDataArray}!AliHLTTask@{Ali\-HLTTask}}
1268 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTComponent\-Block\-Data}$\ast$ {\bf Ali\-HLTTask::fp\-Block\-Data\-Array}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r5}
1271 block data array to be passed as argument to the {\bf Ali\-HLTComponent::Process\-Event}{\rm (p.\,\pageref{classAliHLTComponent_a6})} method. Filled through subscription to source tasks ({\bf Subscribe}{\rm (p.\,\pageref{classAliHLTTask_a23})}).
1273 Definition at line 288 of file Ali\-HLTTask.h.
1275 Referenced by End\-Run(), Process\-Task(), Start\-Run(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpComponent@{fpComponent}}
1276 \index{fpComponent@{fpComponent}!AliHLTTask@{Ali\-HLTTask}}
1277 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTComponent}$\ast$ {\bf Ali\-HLTTask::fp\-Component}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r1}
1282 the component described by this task (created and deleted internally)
1284 Definition at line 275 of file Ali\-HLTTask.h.
1286 Referenced by Deinit(), Init(), Process\-Task(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpConfiguration@{fpConfiguration}}
1287 \index{fpConfiguration@{fpConfiguration}!AliHLTTask@{Ali\-HLTTask}}
1288 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTConfiguration}$\ast$ {\bf Ali\-HLTTask::fp\-Configuration}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r0}
1291 the configuration descriptor (external pointer)
1293 Definition at line 273 of file Ali\-HLTTask.h.
1295 Referenced by Check\-Dependencies(), Depends(), Get\-Name(), Init(), Print\-Dependency\-Tree(), Print\-Status(), and Unset\-Dependency().\index{AliHLTTask@{Ali\-HLTTask}!fpDataBuffer@{fpDataBuffer}}
1296 \index{fpDataBuffer@{fpDataBuffer}!AliHLTTask@{Ali\-HLTTask}}
1297 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTData\-Buffer}$\ast$ {\bf Ali\-HLTTask::fp\-Data\-Buffer}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTTask_r2}
1302 the data buffer for the component processing
1304 Definition at line 277 of file Ali\-HLTTask.h.
1306 Referenced by End\-Run(), Get\-Nof\-Matching\-Data\-Blocks(), Process\-Task(), Release(), Start\-Run(), and Subscribe().
1308 The documentation for this class was generated from the following files:\begin{CompactItemize}
1310 /home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTTask.h}\item
1311 /home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTConfiguration.cxx}\end{CompactItemize}