\section{Ali\-HLTTask Class Reference}
\label{classAliHLTTask}\index{AliHLTTask@{AliHLTTask}}
{\tt \#include $<$Ali\-HLTTask.h$>$}

Inheritance diagram for Ali\-HLTTask::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classAliHLTTask}
\end{center}
\end{figure}


\subsection{Detailed Description}
A task collects all the information which is necessary to process a certain step in the HLT data processing chain.\begin{itemize}
\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}


\begin{Desc}
\item[Note:]This class is only used for the {\bf HLT integration into Ali\-Root}{\rm (p.\,\pageref{group__alihlt__system})}. \end{Desc}




Definition at line 46 of file Ali\-HLTTask.h.\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Ali\-HLTTask} ()
\item 
{\bf Ali\-HLTTask} ({\bf Ali\-HLTConfiguration} $\ast$p\-Conf)
\item 
{\bf Ali\-HLTTask} (const {\bf Ali\-HLTTask} \&)
\item 
{\bf Ali\-HLTTask} \& {\bf operator=} (const {\bf Ali\-HLTTask} \&)
\item 
virtual {\bf $\sim$Ali\-HLTTask} ()
\item 
int {\bf Init} ({\bf Ali\-HLTConfiguration} $\ast$p\-Conf, {\bf Ali\-HLTComponent\-Handler} $\ast$p\-CH)
\item 
int {\bf Deinit} ()
\item 
const char $\ast$ {\bf Get\-Name} () const 
\item 
{\bf Ali\-HLTConfiguration} $\ast$ {\bf Get\-Conf} () const 
\item 
{\bf Ali\-HLTComponent} $\ast$ {\bf Get\-Component} () const 
\item 
{\bf Ali\-HLTTask} $\ast$ {\bf Find\-Dependency} (const char $\ast$id)
\item 
int {\bf Set\-Dependency} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
\item 
int {\bf Unset\-Dependency} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
\item 
int {\bf Check\-Dependencies} ()
\item 
int {\bf Depends} ({\bf Ali\-HLTTask} $\ast$p\-Task)
\item 
{\bf Ali\-HLTTask} $\ast$ {\bf Find\-Target} (const char $\ast$id)
\item 
int {\bf Set\-Target} ({\bf Ali\-HLTTask} $\ast$p\-Dep)
\item 
int {\bf Unset\-Target} ({\bf Ali\-HLTTask} $\ast$p\-Target)
\item 
int {\bf Start\-Run} ()
\item 
int {\bf End\-Run} ()
\item 
int {\bf Process\-Task} (Int\_\-t event\-No)
\item 
int {\bf Get\-Nof\-Matching\-Data\-Blocks} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task) const 
\item 
int {\bf Get\-Nof\-Matching\-Data\-Types} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task) const 
\item 
int {\bf Subscribe} (const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$array\-Block\-Desc, int i\-Array\-Size)
\item 
int {\bf Release} ({\bf Ali\-HLTComponent\-Block\-Data} $\ast$p\-Block\-Desc, const {\bf Ali\-HLTTask} $\ast$p\-Consumer\-Task)
\item 
void {\bf Print\-Status} ()
\item 
int {\bf Follow\-Dependency} (const char $\ast$id, TList $\ast$p\-Tgt\-List=NULL)
\item 
void {\bf Print\-Dependency\-Tree} (const char $\ast$id, int b\-Mode=0)
\item 
int {\bf Get\-Nof\-Sources} () const 
\end{CompactItemize}
\subsection*{Private Member Functions}
\begin{CompactItemize}
\item 
{\bf Class\-Def} ({\bf Ali\-HLTTask}, 1)
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
{\bf Ali\-HLTConfiguration} $\ast$ {\bf fp\-Configuration}
\item 
{\bf Ali\-HLTComponent} $\ast$ {\bf fp\-Component}
\begin{CompactList}\small\item\em transient \item\end{CompactList}\item 
{\bf Ali\-HLTData\-Buffer} $\ast$ {\bf fp\-Data\-Buffer}
\begin{CompactList}\small\item\em transient \item\end{CompactList}\item 
TList {\bf f\-List\-Targets}
\begin{CompactList}\small\item\em transient \item\end{CompactList}\item 
TList {\bf f\-List\-Dependencies}
\item 
{\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\bf fp\-Block\-Data\-Array}
\item 
int {\bf f\-Block\-Data\-Array\-Size}
\begin{CompactList}\small\item\em transient \item\end{CompactList}\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
\index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask ()}\label{classAliHLTTask_a0}


standard constructor \index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
\index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask ({\bf Ali\-HLTConfiguration} $\ast$ {\em p\-Conf})}\label{classAliHLTTask_a1}


constructor \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Conf}]pointer to configuration descriptor \end{description}
\end{Desc}


Definition at line 436 of file Ali\-HLTConfiguration.cxx.

\footnotesize\begin{verbatim}437   :
438   fpConfiguration(pConf),
439   fpComponent(NULL),
440   fpDataBuffer(NULL),
441   fListTargets(),
442   fListDependencies(),
443   fpBlockDataArray(NULL),
444   fBlockDataArraySize(0)
445 {
446   // see header file for function documentation
447 }

\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!AliHLTTask@{AliHLTTask}}
\index{AliHLTTask@{AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Ali\-HLTTask (const {\bf Ali\-HLTTask} \&)}\label{classAliHLTTask_a2}


not a valid copy constructor, defined according to effective C++ style 

Definition at line 449 of file Ali\-HLTConfiguration.cxx.

References HLTFatal.

\footnotesize\begin{verbatim}450   :
451   TObject(),
452   AliHLTLogging(),
453   fpConfiguration(NULL),
454   fpComponent(NULL),
455   fpDataBuffer(NULL),
456   fListTargets(),
457   fListDependencies(),
458   fpBlockDataArray(NULL),
459   fBlockDataArraySize(0)
460 {
461   HLTFatal("copy constructor untested");
462 }

\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!~AliHLTTask@{$\sim$AliHLTTask}}
\index{~AliHLTTask@{$\sim$AliHLTTask}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::$\sim${\bf Ali\-HLTTask} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classAliHLTTask_a4}


destructor 

Definition at line 471 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Dependencies, f\-List\-Targets, fp\-Block\-Data\-Array, fp\-Component, Unset\-Dependency(), and Unset\-Target().

\footnotesize\begin{verbatim}472 {
473   TObjLink* lnk=fListDependencies.FirstLink();
474 
475   while (lnk!=NULL) {
476     AliHLTTask* pTask=(AliHLTTask*)lnk->GetObject();
477     pTask->UnsetTarget(this);
478     lnk=lnk->Next();
479   }
480   lnk=fListTargets.FirstLink();
481 
482   while (lnk!=NULL) {
483     AliHLTTask* pTask=(AliHLTTask*)lnk->GetObject();
484     pTask->UnsetDependency(this);
485     lnk=lnk->Next();
486   }
487 
488   if (fpComponent) delete fpComponent;
489   fpComponent=NULL;
490   if (fpBlockDataArray) delete[] fpBlockDataArray;
491   fpBlockDataArray=NULL;
492 }
\end{verbatim}\normalsize 




\subsection{Member Function Documentation}
\index{AliHLTTask@{Ali\-HLTTask}!CheckDependencies@{CheckDependencies}}
\index{CheckDependencies@{CheckDependencies}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Check\-Dependencies ()}\label{classAliHLTTask_a13}


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}
\item[Returns:]number of unresolved dependencies \end{Desc}


Definition at line 666 of file Ali\-HLTConfiguration.cxx.

References Find\-Dependency(), fp\-Configuration, Ali\-HLTConfiguration::Get\-First\-Source(), Ali\-HLTConfiguration::Get\-Name(), and Ali\-HLTConfiguration::Get\-Next\-Source().

Referenced by Ali\-HLTSystem::Insert\-Task().

\footnotesize\begin{verbatim}667 {
668   // see header file for function documentation
669   int iResult=0;
670   AliHLTConfiguration* pSrc=fpConfiguration->GetFirstSource();
671   while (pSrc) {
672     if (FindDependency(pSrc->GetName())==NULL) {
673       //HLTDebug("dependency \"%s\" unresolved", pSrc->GetName());
674       iResult++;
675     }
676     pSrc=fpConfiguration->GetNextSource();
677   }
678   return iResult;
679 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!ClassDef@{ClassDef}}
\index{ClassDef@{ClassDef}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTTask::Class\-Def ({\bf Ali\-HLTTask}, 1)\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_d0}


\index{AliHLTTask@{Ali\-HLTTask}!Deinit@{Deinit}}
\index{Deinit@{Deinit}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Deinit ()}\label{classAliHLTTask_a6}


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. 

Definition at line 532 of file Ali\-HLTConfiguration.cxx.

References Ali\-HLTComponent::Deinit(), fp\-Component, Get\-Component(), Get\-Name(), and HLTWarning.

Referenced by Ali\-HLTSystem::Deinit\-Tasks().

\footnotesize\begin{verbatim}533 {
534   // see header file for function documentation
535   int iResult=0;
536   AliHLTComponent* pComponent=GetComponent();
537   fpComponent=NULL;
538   if (pComponent) {
539     //HLTDebug("delete component %s (%p)", pComponent->GetComponentID(), pComponent); 
540     pComponent->Deinit();
541     delete pComponent;
542   } else {
543     HLTWarning("task %s (%p) doesn't seem to be in initialized", GetName(), this);
544   }
545   return iResult;
546 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!Depends@{Depends}}
\index{Depends@{Depends}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Depends ({\bf Ali\-HLTTask} $\ast$ {\em p\-Task})}\label{classAliHLTTask_a14}


Check whether the current task depends on the task p\-Task. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Task}]pointer to Task descriptor \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]1 the current task depends on p\-Task \par
 0 no dependency \par
 neg. error code if failed \end{Desc}


Definition at line 682 of file Ali\-HLTConfiguration.cxx.

References fp\-Configuration, Get\-Name(), and Ali\-HLTConfiguration::Get\-Source().

Referenced by Ali\-HLTSystem::Insert\-Task().

\footnotesize\begin{verbatim}683 {
684   // see header file for function documentation
685   int iResult=0;
686   if (pTask) {
687     if (fpConfiguration) {
688       iResult=fpConfiguration->GetSource(pTask->GetName())!=NULL;
689       if (iResult>0) {
690         //HLTDebug("task  \"%s\" depends on \"%s\"", GetName(), pTask->GetName());
691       } else {
692         //HLTDebug("task  \"%s\" independend of \"%s\"", GetName(), pTask->GetName());
693       }
694     } else {
695       iResult=-EFAULT;
696     }
697   } else {
698     iResult=-EINVAL;
699   }
700   return iResult;
701 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!EndRun@{EndRun}}
\index{EndRun@{EndRun}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::End\-Run ()}\label{classAliHLTTask_a19}


Clean-up the task after event processing. The method cleans up internal structures. 

Definition at line 812 of file Ali\-HLTConfiguration.cxx.

References f\-Block\-Data\-Array\-Size, fp\-Block\-Data\-Array, fp\-Data\-Buffer, Get\-Name(), and HLTWarning.

Referenced by Ali\-HLTSystem::Stop\-Tasks().

\footnotesize\begin{verbatim}813 {
814   // see header file for function documentation
815   int iResult=0;
816   if (fpBlockDataArray) {
817     fBlockDataArraySize=0;
818     delete [] fpBlockDataArray;
819     fpBlockDataArray=0;
820   } else {
821     HLTWarning("task %s (%p) doesn't seem to be in running mode", GetName(), this);
822   }
823   if (fpDataBuffer) {
824     AliHLTDataBuffer* pBuffer=fpDataBuffer;
825     fpDataBuffer=NULL;
826     delete pBuffer;
827   }
828   return iResult;
829 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!FindDependency@{FindDependency}}
\index{FindDependency@{FindDependency}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} $\ast$ Ali\-HLTTask::Find\-Dependency (const char $\ast$ {\em id})}\label{classAliHLTTask_a10}


Find a dependency with a certain {\em name id\/}. Searches in the list of dependencies for a task. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the {\bf CONFIGURATION}\par
 {\bf NOTE:} the id does NOT specify a COMPONENT \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to task \end{Desc}


Definition at line 568 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Dependencies.

Referenced by Check\-Dependencies(), Print\-Status(), and Set\-Dependency().

\footnotesize\begin{verbatim}569 {
570   // see header file for function documentation
571   AliHLTTask* pTask=NULL;
572   if (id) {
573     pTask=(AliHLTTask*)fListDependencies.FindObject(id);
574   }
575   return pTask;
576 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!FindTarget@{FindTarget}}
\index{FindTarget@{FindTarget}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} $\ast$ Ali\-HLTTask::Find\-Target (const char $\ast$ {\em id})}\label{classAliHLTTask_a15}


Find a target with a certain id. Tasks which depend on the current task are referred to be {\em targets\/}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]configuration id to search for \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to task instance \end{Desc}


Definition at line 703 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Targets.

Referenced by Set\-Target().

\footnotesize\begin{verbatim}704 {
705   // see header file for function documentation
706   AliHLTTask* pTask=NULL;
707   if (id) {
708     pTask=(AliHLTTask*)fListTargets.FindObject(id);
709   }
710   return pTask;
711 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!FollowDependency@{FollowDependency}}
\index{FollowDependency@{FollowDependency}!AliHLTTask@{Ali\-HLTTask}}
\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}


Search task dependency list recursively to find a dependency. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]id of the task to search for \item[{\em p\-Tgt\-List}](optional) target list to receive dependency tree \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if not found, $>$0 found in the n-th level, dependency list in the target list \end{Desc}


Definition at line 578 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Dependencies.

Referenced by Print\-Dependency\-Tree().

\footnotesize\begin{verbatim}579 {
580   // see header file for function documentation
581   int iResult=0;
582   if (id) {
583     AliHLTTask* pDep=NULL;
584     if ((pDep=(AliHLTTask*)fListDependencies.FindObject(id))!=NULL) {
585       if (pTgtList) pTgtList->Add(pDep);
586       iResult++;
587     } else {
588       TObjLink* lnk=fListDependencies.FirstLink();
589       while (lnk && iResult==0) {
590         pDep=(AliHLTTask*)lnk->GetObject();
591         if (pDep) {
592           if ((iResult=pDep->FollowDependency(id, pTgtList))>0) {
593             if (pTgtList) pTgtList->AddFirst(pDep);
594             iResult++;
595           }
596         } else {
597           iResult=-EFAULT;
598         }
599         lnk=lnk->Next();
600       }
601     }
602   } else {
603     iResult=-EINVAL;
604   }
605   return iResult;
606 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetComponent@{GetComponent}}
\index{GetComponent@{GetComponent}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTComponent} $\ast$ Ali\-HLTTask::Get\-Component () const}\label{classAliHLTTask_a9}


Return pointer to component, which the task internally holds. {\bf Never delete this object!!!} \begin{Desc}
\item[Returns:]instance of the component \end{Desc}


Definition at line 562 of file Ali\-HLTConfiguration.cxx.

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().

\footnotesize\begin{verbatim}563 {
564   // see header file for function documentation
565   return fpComponent;
566 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetConf@{GetConf}}
\index{GetConf@{GetConf}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTConfiguration} $\ast$ Ali\-HLTTask::Get\-Conf () const}\label{classAliHLTTask_a8}


Return pointer to configuration. The tasks holds internally the configuration object. \begin{Desc}
\item[Returns:]pointer to configuration \end{Desc}


Definition at line 556 of file Ali\-HLTConfiguration.cxx.

Referenced by Ali\-HLTSystem::Build\-Task\-List().

\footnotesize\begin{verbatim}557 {
558   // see header file for function documentation
559   return fpConfiguration;
560 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetName@{GetName}}
\index{GetName@{GetName}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Ali\-HLTTask::Get\-Name () const}\label{classAliHLTTask_a7}


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}
\item[Returns:]name of the configuration \end{Desc}


Definition at line 548 of file Ali\-HLTConfiguration.cxx.

References fp\-Configuration, and Ali\-HLTConfiguration::Get\-Name().

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().

\footnotesize\begin{verbatim}549 {
550   // see header file for function documentation
551   if (fpConfiguration)
552     return fpConfiguration->GetName();
553   return TObject::GetName();
554 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetNofMatchingDataBlocks@{GetNofMatchingDataBlocks}}
\index{GetNofMatchingDataBlocks@{GetNofMatchingDataBlocks}!AliHLTTask@{Ali\-HLTTask}}
\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}


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}
\item[Parameters:]
\begin{description}
\item[{\em p\-Consumer\-Task}]the task which subscribes to the data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of matching data blocks \end{Desc}


Definition at line 959 of file Ali\-HLTConfiguration.cxx.

References Ali\-HLTData\-Buffer::Find\-Matching\-Data\-Blocks(), fp\-Data\-Buffer, Get\-Component(), and HLTFatal.

Referenced by Process\-Task().

\footnotesize\begin{verbatim}960 {
961   // see header file for function documentation
962   int iResult=0;
963   if (pConsumerTask) {
964     if (fpDataBuffer) {
965       iResult=fpDataBuffer->FindMatchingDataBlocks(pConsumerTask->GetComponent(), NULL);
966     } else {
967       HLTFatal("internal data buffer missing");
968       iResult=-EFAULT;
969     }
970   } else {
971     iResult=-EINVAL;
972   }
973   return iResult;
974 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetNofMatchingDataTypes@{GetNofMatchingDataTypes}}
\index{GetNofMatchingDataTypes@{GetNofMatchingDataTypes}!AliHLTTask@{Ali\-HLTTask}}
\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}


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}
\item[Parameters:]
\begin{description}
\item[{\em p\-Consumer\-Task}]the task which subscribes to the data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]number of matching data types \end{Desc}


Definition at line 976 of file Ali\-HLTConfiguration.cxx.

References Ali\-HLTComponent::Find\-Matching\-Data\-Types(), Get\-Component(), HLTError, and HLTFatal.

Referenced by Start\-Run().

\footnotesize\begin{verbatim}977 {
978   // see header file for function documentation
979   int iResult=0;
980   if (pConsumerTask) {
981     AliHLTComponent* pComponent=GetComponent();
982     if (!pComponent) {
983       // init ?
984       HLTError("component not initialized");
985       iResult=-EFAULT;
986     }
987     if (pComponent) {
988       iResult=pComponent->FindMatchingDataTypes(pConsumerTask->GetComponent(), NULL);
989     } else {
990       HLTFatal("task initialization failed");
991       iResult=-EFAULT;
992     }
993   } else {
994     iResult=-EINVAL;
995   }
996   return iResult;
997 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!GetNofSources@{GetNofSources}}
\index{GetNofSources@{GetNofSources}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Get\-Nof\-Sources () const\hspace{0.3cm}{\tt  [inline]}}\label{classAliHLTTask_a28}


Get number of source tasks. \begin{Desc}
\item[Returns:]number of source tasks \end{Desc}


Definition at line 269 of file Ali\-HLTTask.h.

References f\-List\-Dependencies.

\footnotesize\begin{verbatim}269 {return fListDependencies.GetSize();}
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!Init@{Init}}
\index{Init@{Init}!AliHLTTask@{Ali\-HLTTask}}
\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}


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}
\item[Parameters:]
\begin{description}
\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}
\end{Desc}


Definition at line 494 of file Ali\-HLTConfiguration.cxx.

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.

Referenced by Ali\-HLTSystem::Init\-Tasks().

\footnotesize\begin{verbatim}495 {
496   // see header file for function documentation
497   int iResult=0;
498   if (fpConfiguration!=NULL && pConf!=NULL && fpConfiguration!=pConf) {
499     HLTWarning("overriding existing reference to configuration object %p (%s) by %p",
500                fpConfiguration, GetName(), pConf);
501   }
502   if (pConf!=NULL) fpConfiguration=pConf;
503   if (fpConfiguration) {
504     if (pCH) {
505       int argc=0;
506       const char** argv=NULL;
507       if ((iResult=fpConfiguration->GetArguments(&argv))>=0) {
508         argc=iResult; // just to make it clear
509         // TODO: we have to think about the optional environment parameter,
510         // currently just set to NULL. 
511         iResult=pCH->CreateComponent(fpConfiguration->GetComponentID(), NULL, argc, argv, fpComponent);
512         if (fpComponent || iResult<=0) {
513           //HLTDebug("component %s (%p) created", fpComponent->GetComponentID(), fpComponent); 
514         } else {
515           HLTError("can not find component \"%s\" (%d)", fpConfiguration->GetComponentID(), iResult);
516         }
517       } else {
518         HLTError("can not get argument list for configuration %s (%s)", fpConfiguration->GetName(), fpConfiguration->GetComponentID());
519         iResult=-EINVAL;
520       }
521     } else {
522       HLTError("component handler instance needed for task initialization");
523       iResult=-EINVAL;
524     }
525   } else {
526     HLTError("configuration object instance needed for task initialization");
527     iResult=-EINVAL;
528   }
529   return iResult;
530 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!operator=@{operator=}}
\index{operator=@{operator=}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTTask} \& Ali\-HLTTask::operator= (const {\bf Ali\-HLTTask} \&)}\label{classAliHLTTask_a3}


not a valid assignment op, but defined according to effective C++ style 

Definition at line 464 of file Ali\-HLTConfiguration.cxx.

References HLTFatal.

\footnotesize\begin{verbatim}465 { 
466   // see header file for function documentation
467   HLTFatal("assignment operator untested");
468   return *this;
469 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!PrintDependencyTree@{PrintDependencyTree}}
\index{PrintDependencyTree@{PrintDependencyTree}!AliHLTTask@{Ali\-HLTTask}}
\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}


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}
\item[Parameters:]
\begin{description}
\item[{\em id}]id of the dependency to search for \item[{\em b\-Mode}]0 (default) from task dependency list, \par
 1 from configuration list \end{description}
\end{Desc}


Definition at line 608 of file Ali\-HLTConfiguration.cxx.

References Follow\-Dependency(), Ali\-HLTConfiguration::Follow\-Dependency(), fp\-Configuration, Get\-Name(), HLTLog\-Keyword, and HLTMessage.

Referenced by Ali\-HLTSystem::Build\-Task\-List().

\footnotesize\begin{verbatim}609 {
610   // see header file for function documentation
611   HLTLogKeyword("task dependencies");
612   int iResult=0;
613   TList tgtList;
614   if (bFromConfiguration) {
615     if (fpConfiguration)
616       iResult=fpConfiguration->FollowDependency(id, &tgtList);
617     else
618       iResult=-EFAULT;
619   } else
620     iResult=FollowDependency(id, &tgtList);
621   if (iResult>0) {
622     HLTMessage("     task \"%s\": dependency level %d ", GetName(), iResult);
623     TObjLink* lnk=tgtList.FirstLink();
624     int i=iResult;
625     char* pSpace = new char[iResult+1];
626     if (pSpace) {
627       memset(pSpace, 32, iResult);
628       pSpace[i]=0;
629       while (lnk) {
630         TObject* obj=lnk->GetObject();
631         HLTMessage("     %s^-- %s ", &pSpace[i--], obj->GetName());
632         lnk=lnk->Next();
633       }
634       delete [] pSpace;
635     } else {
636       iResult=-ENOMEM;
637     }
638   }
639 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!PrintStatus@{PrintStatus}}
\index{PrintStatus@{PrintStatus}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Ali\-HLTTask::Print\-Status ()}\label{classAliHLTTask_a25}


Print the status of the task with component, dependencies and targets. 

Definition at line 1033 of file Ali\-HLTConfiguration.cxx.

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.

Referenced by Ali\-HLTSystem::Print\-Task\-List().

\footnotesize\begin{verbatim}1034 {
1035   // see header file for function documentation
1036   HLTLogKeyword("task properties");
1037   AliHLTComponent* pComponent=GetComponent();
1038   if (pComponent) {
1039     HLTMessage("     component: %s (%p)", pComponent->GetComponentID(), pComponent);
1040   } else {
1041     HLTMessage("     no component set!");
1042   }
1043   if (fpConfiguration) {
1044     AliHLTConfiguration* pSrc=fpConfiguration->GetFirstSource();
1045     while (pSrc) {
1046       const char* pQualifier="unresolved";
1047       if (FindDependency(pSrc->GetName()))
1048         pQualifier="resolved";
1049       HLTMessage("     source: %s (%s)", pSrc->GetName(), pQualifier);
1050       pSrc=fpConfiguration->GetNextSource();
1051     }
1052     TObjLink* lnk = fListTargets.FirstLink();
1053     while (lnk) {
1054       TObject *obj = lnk->GetObject();
1055       HLTMessage("     target: %s", obj->GetName());
1056       lnk = lnk->Next();
1057     }
1058   } else {
1059     HLTMessage("     task \"%s\" not initialized", GetName());
1060   }
1061 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!ProcessTask@{ProcessTask}}
\index{ProcessTask@{ProcessTask}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Process\-Task (Int\_\-t {\em event\-No})}\label{classAliHLTTask_a20}


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
 The {\bf Start\-Run}{\rm (p.\,\pageref{classAliHLTTask_a18})} method must be called before. 

Definition at line 831 of file Ali\-HLTConfiguration.cxx.

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().

Referenced by Ali\-HLTSystem::Process\-Tasks().

\footnotesize\begin{verbatim}832 {
833   // see header file for function documentation
834   int iResult=0;
835   AliHLTComponent* pComponent=GetComponent();
836   if (pComponent && fpDataBuffer) {
837     HLTDebug("Processing task %s (%p) fpDataBuffer %p", GetName(), this, fpDataBuffer);
838     fpDataBuffer->Reset();
839     int iSourceDataBlock=0;
840     int iInputDataVolume=0;
841 
842     int iNofInputDataBlocks=0;
843     /* TODO: the assumption of only one output data type per component is the current constraint
844      * later it should be checked how many output blocks of the source component match the input
845      * data types of the consumer component (GetNofMatchingDataBlocks). If one assumes that a
846      * certain output block is always been produced, the initialization could be done in the
847      * StartRun. Otherwise the fpBlockDataArray has to be adapted each time.
848      */
849     iNofInputDataBlocks=fListDependencies.GetSize(); // one block per source
850     // is not been used since the allocation was done in StartRun, but check the size
851     if (iNofInputDataBlocks>fBlockDataArraySize) {
852       HLTError("block data array too small");
853     }
854 
855     AliHLTTask* pSrcTask=NULL;
856     TList subscribedTaskList;
857     TObjLink* lnk=fListDependencies.FirstLink();
858 
859     // subscribe to all source tasks
860     while (lnk && iResult>=0) {
861       pSrcTask=(AliHLTTask*)lnk->GetObject();
862       if (pSrcTask) {
863         int iMatchingDB=pSrcTask->GetNofMatchingDataBlocks(this);
864         if (iMatchingDB<=fBlockDataArraySize-iSourceDataBlock) {
865           if (fpBlockDataArray) {
866           if ((iResult=pSrcTask->Subscribe(this, &fpBlockDataArray[iSourceDataBlock],fBlockDataArraySize-iSourceDataBlock))>0) {
867             for (int i=0; i<iResult; i++) {
868               iInputDataVolume+=fpBlockDataArray[i+iSourceDataBlock].fSize;
869               // put the source task as many times into the list as it provides data blocks
870               // makes the bookkeeping for the data release easier
871               subscribedTaskList.Add(pSrcTask);
872             }
873             iSourceDataBlock+=iResult;
874             HLTDebug("Task %s (%p) successfully subscribed to %d data block(s) of task %s (%p)", GetName(), this, iResult, pSrcTask->GetName(), pSrcTask);
875             iResult=0;
876           } else {
877             HLTError("Task %s (%p): subscription to task %s (%p) failed with error %d", GetName(), this, pSrcTask->GetName(), pSrcTask, iResult);
878             iResult=-EFAULT;
879           }
880           } else {
881             HLTFatal("Task %s (%p): BlockData array not allocated", GetName(), this);
882             iResult=-EFAULT;
883           }
884         } else {
885           HLTFatal("Task %s (%p): too little space in data block array for subscription to task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
886           HLTDebug("#data types=%d, array size=%d, current index=%d", iMatchingDB, fBlockDataArraySize, iSourceDataBlock);
887           iResult=-EFAULT;
888         }
889       } else {
890         HLTFatal("fatal internal error in ROOT list handling");
891         iResult=-EFAULT;
892       }
893       lnk=lnk->Next();
894     }
895 
896     // process the event
897     if (iResult>=0) {
898       long unsigned int iConstBase=0;
899       double fInputMultiplier=0;
900       if (pComponent->GetComponentType()!=AliHLTComponent::kSink)
901         pComponent->GetOutputDataSize(iConstBase, fInputMultiplier);
902       int iOutputDataSize=int(fInputMultiplier*iInputDataVolume) + iConstBase;
903       //HLTDebug("task %s: reqired output size %d", GetName(), iOutputDataSize);
904       AliHLTUInt8_t* pTgtBuffer=NULL;
905       if (iOutputDataSize>0) pTgtBuffer=fpDataBuffer->GetTargetBuffer(iOutputDataSize);
906       //HLTDebug("provided raw buffer %p", pTgtBuffer);
907       AliHLTComponentEventData evtData;
908       AliHLTComponent::FillEventData(evtData);
909       evtData.fEventID=(AliHLTEventID_t)eventNo;
910       evtData.fBlockCnt=iSourceDataBlock;
911       AliHLTComponentTriggerData trigData;
912       AliHLTUInt32_t size=iOutputDataSize;
913       AliHLTUInt32_t outputBlockCnt=0;
914       AliHLTComponentBlockData* outputBlocks=NULL;
915       AliHLTComponentEventDoneData* edd;
916       if (pTgtBuffer!=NULL || iOutputDataSize==0) {
917         iResult=pComponent->ProcessEvent(evtData, fpBlockDataArray, trigData, pTgtBuffer, size, outputBlockCnt, outputBlocks, edd);
918         HLTDebug("task %s: component %s ProcessEvent finnished (%d): size=%d blocks=%d", GetName(), pComponent->GetComponentID(), iResult, size, outputBlockCnt);
919         if (iResult>=0 && pTgtBuffer) {
920           iResult=fpDataBuffer->SetSegments(pTgtBuffer, outputBlocks, outputBlockCnt);
921           delete [] outputBlocks; outputBlocks=NULL; outputBlockCnt=0;
922         }
923       } else {
924         HLTError("task %s: no target buffer available", GetName());
925         iResult=-EFAULT;
926       }
927     }
928 
929     // now release all buffers which we have subscribed to
930     iSourceDataBlock=0;
931     lnk=subscribedTaskList.FirstLink();
932     while (lnk) {
933       pSrcTask=(AliHLTTask*)lnk->GetObject();
934       if (pSrcTask) {
935         int iTempRes=0;
936         if ((iTempRes=pSrcTask->Release(&fpBlockDataArray[iSourceDataBlock], this))>=0) {
937           HLTDebug("Task %s (%p) successfully released task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
938         } else {
939           HLTError("Task %s (%p): realease of task %s (%p) failed with error %d", GetName(), this, pSrcTask->GetName(), pSrcTask, iTempRes);
940         }
941       } else {
942         HLTFatal("task %s (%p): internal error in ROOT list handling", GetName(), this);
943         if (iResult>=0) iResult=-EFAULT;
944       }
945       subscribedTaskList.Remove(lnk);
946       lnk=subscribedTaskList.FirstLink();
947       iSourceDataBlock++;
948     }
949     if (subscribedTaskList.GetSize()>0) {
950       HLTError("task %s (%p): could not release all data buffers", GetName(), this);
951     }
952   } else {
953     HLTError("task %s (%p): internal failure (not initialized component %p, data buffer %p)", GetName(), this, fpComponent, fpDataBuffer);
954     iResult=-EFAULT;
955   }
956   return iResult;
957 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!Release@{Release}}
\index{Release@{Release}!AliHLTTask@{Ali\-HLTTask}}
\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}


Release a block descriptor. Notification from consumer task. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Block\-Desc}]descriptor of the data segment \item[{\em p\-Consumer\-Task}]the task which subscribed to the data \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]: $>$0 if success, negative error code if failed \end{Desc}


Definition at line 1016 of file Ali\-HLTConfiguration.cxx.

References fp\-Data\-Buffer, Get\-Component(), HLTFatal, and Ali\-HLTData\-Buffer::Release().

Referenced by Process\-Task().

\footnotesize\begin{verbatim}1017 {
1018   // see header file for function documentation
1019   int iResult=0;
1020   if (pConsumerTask && pBlockDesc) {
1021     if (fpDataBuffer) {
1022       iResult=fpDataBuffer->Release(pBlockDesc, pConsumerTask->GetComponent());
1023     } else {
1024       HLTFatal("internal data buffer missing");
1025       iResult=-EFAULT;
1026     }
1027   } else {
1028     iResult=-EINVAL;
1029   }
1030   return iResult;
1031 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!SetDependency@{SetDependency}}
\index{SetDependency@{SetDependency}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Set\-Dependency ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a11}


Add a dependency for the task. The task maintains a list of other tasks it depends on. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Dep}]pointer to a task descriptor \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]0 if suceeded, neg error code if failed \par
 -EEXIST : the dependencie exists already \end{Desc}


Definition at line 641 of file Ali\-HLTConfiguration.cxx.

References Find\-Dependency(), f\-List\-Dependencies, and Get\-Name().

Referenced by Ali\-HLTSystem::Insert\-Task().

\footnotesize\begin{verbatim}642 {
643   // see header file for function documentation
644   int iResult=0;
645   if (pDep) {
646     if (FindDependency(pDep->GetName())==NULL) {
647       fListDependencies.Add(pDep);
648     } else {
649       iResult=-EEXIST;
650     }
651   } else {
652     iResult=-EINVAL;
653   }
654   return iResult;
655 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!SetTarget@{SetTarget}}
\index{SetTarget@{SetTarget}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Set\-Target ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a16}


Insert task into target list. The target list specifies all the tasks which depend on the current task. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Dep}]pointer task object \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]$>$=0 if succeeded, neg. error code if failed \end{Desc}


Definition at line 713 of file Ali\-HLTConfiguration.cxx.

References Find\-Target(), f\-List\-Targets, and Get\-Name().

Referenced by Ali\-HLTSystem::Insert\-Task().

\footnotesize\begin{verbatim}714 {
715   // see header file for function documentation
716   int iResult=0;
717   if (pTgt) {
718     if (FindTarget(pTgt->GetName())==NULL) {
719       fListTargets.Add(pTgt);
720     } else {
721       iResult=-EEXIST;
722     }
723   } else {
724     iResult=-EINVAL;
725   }
726   return iResult;
727 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!StartRun@{StartRun}}
\index{StartRun@{StartRun}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Start\-Run ()}\label{classAliHLTTask_a18}


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
 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. 

Definition at line 735 of file Ali\-HLTConfiguration.cxx.

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().

Referenced by Ali\-HLTSystem::Start\-Tasks().

\footnotesize\begin{verbatim}736 {
737   // see header file for function documentation
738   int iResult=0;
739   int iNofInputDataBlocks=0;
740   AliHLTComponent* pComponent=GetComponent();
741   if (pComponent) {
742     // determine the number of input data blocks provided from the source tasks
743     TObjLink* lnk=fListDependencies.FirstLink();
744     while (lnk && iResult>=0) {
745       AliHLTTask* pSrcTask=(AliHLTTask*)lnk->GetObject();
746       if (pSrcTask) {
747         if ((iResult=pSrcTask->GetNofMatchingDataTypes(this))>0) {
748           iNofInputDataBlocks+=iResult;
749         } else if (iResult==0) {
750           HLTWarning("source task %s (%p) does not provide any matching data type for task %s (%p)", pSrcTask->GetName(), pSrcTask, GetName(), this);
751         } else {
752           HLTError("task %s (%p): error getting matching data types for source task %s (%p)", GetName(), this, pSrcTask->GetName(), pSrcTask);
753           iResult=-EFAULT;
754         }
755       }
756       lnk=lnk->Next();
757     }
758     if (iResult>=0) {
759       if (fpBlockDataArray) {
760         HLTWarning("block data array for task %s (%p) was not cleaned", GetName(), this);
761         delete [] fpBlockDataArray;
762         fpBlockDataArray=NULL;
763         fBlockDataArraySize=0;
764       }
765 
766       // component init
767       // the initialization of the component is done by the ComponentHandler after creation
768       // of the component.
769       //iResult=Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv );
770 
771       // allocate internal task variables for bookkeeping aso.
772       // we allocate the BlockData array with at least one member
773       if (iNofInputDataBlocks==0) iNofInputDataBlocks=1;
774       fpBlockDataArray=new AliHLTComponentBlockData[iNofInputDataBlocks];
775       if (fpBlockDataArray) {
776         fBlockDataArraySize=iNofInputDataBlocks;
777       } else {
778         HLTError("memory allocation failed");
779         iResult=-ENOMEM;
780       }
781 
782       // allocate the data buffer, which controls the output buffer and subscriptions
783       if (iResult>=0) {
784         fpDataBuffer=new AliHLTDataBuffer;
785         if (fpDataBuffer!=NULL) {
786           HLTDebug("created data buffer %p for task %s (%p)", fpDataBuffer, GetName(), this);
787           TObjLink* lnk=fListTargets.FirstLink();
788           while (lnk && iResult>=0) {
789             AliHLTTask* pTgtTask=(AliHLTTask*)lnk->GetObject();
790             if (pTgtTask) {
791               if ((iResult=fpDataBuffer->SetConsumer(pTgtTask->GetComponent()))>=0) {
792               }
793             } else {
794               break;
795               iResult=-EFAULT;
796             }
797             lnk=lnk->Next();
798           }
799         } else {
800           HLTFatal("can not create data buffer object, memory allocation failed");
801           iResult=-ENOMEM;
802         }
803       }
804     }
805   } else {
806     HLTError("task %s (%p) does not have a component", GetName(), this);
807     iResult=-EFAULT;
808   }
809   return iResult;
810 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!Subscribe@{Subscribe}}
\index{Subscribe@{Subscribe}!AliHLTTask@{Ali\-HLTTask}}
\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}


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}
\item[Parameters:]
\begin{description}
\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}
\end{Desc}
\begin{Desc}
\item[Returns:]number of matching data blocks, negative error code if failed \end{Desc}


Definition at line 999 of file Ali\-HLTConfiguration.cxx.

References fp\-Data\-Buffer, Get\-Component(), HLTFatal, and Ali\-HLTData\-Buffer::Subscribe().

Referenced by Process\-Task().

\footnotesize\begin{verbatim}1000 {
1001   // see header file for function documentation
1002   int iResult=0;
1003   if (pConsumerTask) {
1004     if (fpDataBuffer) {
1005       iResult=fpDataBuffer->Subscribe(pConsumerTask->GetComponent(), pBlockDesc, iArraySize);
1006     } else {
1007       HLTFatal("internal data buffer missing");
1008       iResult=-EFAULT;
1009     }
1010   } else {
1011     iResult=-EINVAL;
1012   }
1013   return iResult;
1014 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!UnsetDependency@{UnsetDependency}}
\index{UnsetDependency@{UnsetDependency}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Unset\-Dependency ({\bf Ali\-HLTTask} $\ast$ {\em p\-Dep})}\label{classAliHLTTask_a12}


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. 

Definition at line 657 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Dependencies, fp\-Configuration, and Ali\-HLTConfiguration::Invalidate\-Sources().

Referenced by $\sim$Ali\-HLTTask().

\footnotesize\begin{verbatim}658 {
659   fListDependencies.Remove(pDep);
660   if (fpConfiguration) {
661     fpConfiguration->InvalidateSources();
662   }
663   return 0;
664 }
\end{verbatim}\normalsize 


\index{AliHLTTask@{Ali\-HLTTask}!UnsetTarget@{UnsetTarget}}
\index{UnsetTarget@{UnsetTarget}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTTask::Unset\-Target ({\bf Ali\-HLTTask} $\ast$ {\em p\-Target})}\label{classAliHLTTask_a17}


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. 

Definition at line 729 of file Ali\-HLTConfiguration.cxx.

References f\-List\-Targets.

Referenced by $\sim$Ali\-HLTTask().

\footnotesize\begin{verbatim}730 {
731   fListTargets.Remove(pTarget);
732   return 0;
733 }
\end{verbatim}\normalsize 




\subsection{Member Data Documentation}
\index{AliHLTTask@{Ali\-HLTTask}!fBlockDataArraySize@{fBlockDataArraySize}}
\index{fBlockDataArraySize@{fBlockDataArraySize}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf Ali\-HLTTask::f\-Block\-Data\-Array\-Size}\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_r6}


transient 

size of the block data array 

Definition at line 290 of file Ali\-HLTTask.h.

Referenced by End\-Run(), Process\-Task(), and Start\-Run().\index{AliHLTTask@{Ali\-HLTTask}!fListDependencies@{fListDependencies}}
\index{fListDependencies@{fListDependencies}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TList {\bf Ali\-HLTTask::f\-List\-Dependencies}\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_r4}


the list of sources (tasks upon which the current one depends) 

Definition at line 281 of file Ali\-HLTTask.h.

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}}
\index{fListTargets@{fListTargets}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TList {\bf Ali\-HLTTask::f\-List\-Targets}\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_r3}


transient 

the list of targets (tasks which depend upon the current one) 

Definition at line 279 of file Ali\-HLTTask.h.

Referenced by Find\-Target(), Print\-Status(), Set\-Target(), Start\-Run(), Unset\-Target(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpBlockDataArray@{fpBlockDataArray}}
\index{fpBlockDataArray@{fpBlockDataArray}!AliHLTTask@{Ali\-HLTTask}}
\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}


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})}). 

Definition at line 288 of file Ali\-HLTTask.h.

Referenced by End\-Run(), Process\-Task(), Start\-Run(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpComponent@{fpComponent}}
\index{fpComponent@{fpComponent}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTComponent}$\ast$ {\bf Ali\-HLTTask::fp\-Component}\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_r1}


transient 

the component described by this task (created and deleted internally) 

Definition at line 275 of file Ali\-HLTTask.h.

Referenced by Deinit(), Init(), Process\-Task(), and $\sim$Ali\-HLTTask().\index{AliHLTTask@{Ali\-HLTTask}!fpConfiguration@{fpConfiguration}}
\index{fpConfiguration@{fpConfiguration}!AliHLTTask@{Ali\-HLTTask}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTConfiguration}$\ast$ {\bf Ali\-HLTTask::fp\-Configuration}\hspace{0.3cm}{\tt  [private]}}\label{classAliHLTTask_r0}


the configuration descriptor (external pointer) 

Definition at line 273 of file Ali\-HLTTask.h.

Referenced by Check\-Dependencies(), Depends(), Get\-Name(), Init(), Print\-Dependency\-Tree(), Print\-Status(), and Unset\-Dependency().\index{AliHLTTask@{Ali\-HLTTask}!fpDataBuffer@{fpDataBuffer}}
\index{fpDataBuffer@{fpDataBuffer}!AliHLTTask@{Ali\-HLTTask}}
\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}


transient 

the data buffer for the component processing 

Definition at line 277 of file Ali\-HLTTask.h.

Referenced by End\-Run(), Get\-Nof\-Matching\-Data\-Blocks(), Process\-Task(), Release(), Start\-Run(), and Subscribe().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
/home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTTask.h}\item 
/home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTConfiguration.cxx}\end{CompactItemize}
