#include "AliHLTStdIncludes.h"
#include "AliHLTComponent.h"
#include "AliHLTComponentHandler.h"
-#include "AliHLTSystem.h"
+#include "TString.h"
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTComponent)
fEnvironment(),
fCurrentEvent(0),
fEventCount(-1)
-{
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
memset(&fEnvironment, 0, sizeof(AliHLTComponentEnvironment));
- if (fpComponentHandler)
- fpComponentHandler->ScheduleRegister(this);
+ if (fgpComponentHandler)
+ fgpComponentHandler->ScheduleRegister(this);
+}
+
+AliHLTComponent::AliHLTComponent(const AliHLTComponent&)
+ :
+ fEnvironment(),
+ fCurrentEvent(0),
+ fEventCount(-1)
+{
+ // see header file for class documentation
+ HLTFatal("copy constructor untested");
+}
+
+AliHLTComponent& AliHLTComponent::operator=(const AliHLTComponent&)
+{
+ // see header file for class documentation
+ HLTFatal("assignment operator untested");
+ return *this;
}
AliHLTComponent::~AliHLTComponent()
{
+ // see header file for function documentation
}
-AliHLTComponentHandler* AliHLTComponent::fpComponentHandler=NULL;
+AliHLTComponentHandler* AliHLTComponent::fgpComponentHandler=NULL;
int AliHLTComponent::SetGlobalComponentHandler(AliHLTComponentHandler* pCH, int bOverwrite)
{
+ // see header file for function documentation
int iResult=0;
- if (fpComponentHandler==NULL || bOverwrite!=0)
- fpComponentHandler=pCH;
+ if (fgpComponentHandler==NULL || bOverwrite!=0)
+ fgpComponentHandler=pCH;
else
iResult=-EPERM;
return iResult;
}
-int AliHLTComponent::UnsetGlobalComponentHandler() {
+int AliHLTComponent::UnsetGlobalComponentHandler()
+{
+ // see header file for function documentation
return SetGlobalComponentHandler(NULL,1);
}
-int AliHLTComponent::Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv )
+int AliHLTComponent::Init( AliHLTComponentEnvironment* environ, void* environParam, int argc, const char** argv )
{
+ // see header file for function documentation
int iResult=0;
if (environ) {
memcpy(&fEnvironment, environ, sizeof(AliHLTComponentEnvironment));
- fEnvironment.fParam=environ_param;
+ fEnvironment.fParam=environParam;
}
iResult=DoInit(argc, argv);
if (iResult>=0) fEventCount=0;
int AliHLTComponent::Deinit()
{
+ // see header file for function documentation
int iResult=0;
iResult=DoDeinit();
return iResult;
int AliHLTComponent::DoInit( int argc, const char** argv )
{
+ // see header file for function documentation
if (argc==0 && argv==NULL) {
// this is currently just to get rid of the warning "unused parameter"
}
int AliHLTComponent::DoDeinit()
{
+ // see header file for function documentation
return 0;
}
-void AliHLTComponent::DataType2Text( const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2] ) {
+void AliHLTComponent::DataType2Text( const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2] ) const
+{
+ // see header file for function documentation
memset( output, 0, kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2 );
strncat( output, type.fOrigin, kAliHLTComponentDataTypefOriginSize );
strcat( output, ":" );
string AliHLTComponent::DataType2Text( const AliHLTComponentDataType& type )
{
+ // see header file for function documentation
string out("");
if (type==kAliHLTVoidDataType) {
}
-void* AliHLTComponent::AllocMemory( unsigned long size ) {
+void* AliHLTComponent::AllocMemory( unsigned long size )
+{
+ // see header file for function documentation
if (fEnvironment.fAllocMemoryFunc)
return (*fEnvironment.fAllocMemoryFunc)(fEnvironment.fParam, size );
HLTFatal("no memory allocation handler registered");
}
int AliHLTComponent::MakeOutputDataBlockList( const vector<AliHLTComponentBlockData>& blocks, AliHLTUInt32_t* blockCount,
- AliHLTComponentBlockData** outputBlocks ) {
+ AliHLTComponentBlockData** outputBlocks )
+{
+ // see header file for function documentation
if ( blockCount==NULL || outputBlocks==NULL )
return -EFAULT;
AliHLTUInt32_t count = blocks.size();
}
-int AliHLTComponent::GetEventDoneData( unsigned long size, AliHLTComponentEventDoneData** edd ) {
+int AliHLTComponent::GetEventDoneData( unsigned long size, AliHLTComponentEventDoneData** edd )
+{
+ // see header file for function documentation
if (fEnvironment.fGetEventDoneDataFunc)
return (*fEnvironment.fGetEventDoneDataFunc)(fEnvironment.fParam, fCurrentEvent, size, edd );
return -ENOSYS;
int AliHLTComponent::FindMatchingDataTypes(AliHLTComponent* pConsumer, vector<AliHLTComponentDataType>* tgtList)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumer) {
vector<AliHLTComponentDataType> ctlist;
return iResult;
}
-void AliHLTComponent::FillBlockData( AliHLTComponentBlockData& blockData ) {
+void AliHLTComponent::FillBlockData( AliHLTComponentBlockData& blockData ) const
+{
+ // see header file for function documentation
blockData.fStructSize = sizeof(blockData);
FillShmData( blockData.fShmKey );
blockData.fOffset = ~(AliHLTUInt32_t)0;
blockData.fSpecification = ~(AliHLTUInt32_t)0;
}
-void AliHLTComponent::FillShmData( AliHLTComponentShmData& shmData ) {
+void AliHLTComponent::FillShmData( AliHLTComponentShmData& shmData ) const
+{
+ // see header file for function documentation
shmData.fStructSize = sizeof(shmData);
shmData.fShmType = gkAliHLTComponentInvalidShmType;
shmData.fShmID = gkAliHLTComponentInvalidShmID;
}
-void AliHLTComponent::FillDataType( AliHLTComponentDataType& dataType ) {
+void AliHLTComponent::FillDataType( AliHLTComponentDataType& dataType ) const
+{
+ // see header file for function documentation
dataType=kAliHLTAnyDataType;
}
-void AliHLTComponent::CopyDataType(AliHLTComponentDataType& tgtdt, const AliHLTComponentDataType& srcdt) {
+void AliHLTComponent::CopyDataType(AliHLTComponentDataType& tgtdt, const AliHLTComponentDataType& srcdt)
+{
+ // see header file for function documentation
memcpy(&tgtdt.fID[0], &srcdt.fID[0], kAliHLTComponentDataTypefIDsize);
memcpy(&tgtdt.fOrigin[0], &srcdt.fOrigin[0], kAliHLTComponentDataTypefOriginSize);
}
-void AliHLTComponent::SetDataType(AliHLTComponentDataType& tgtdt, const char* id, const char* origin) {
+void AliHLTComponent::SetDataType(AliHLTComponentDataType& tgtdt, const char* id, const char* origin)
+{
+ // see header file for function documentation
tgtdt.fStructSize = sizeof(AliHLTComponentDataType);
memset(&tgtdt.fID[0], 0, kAliHLTComponentDataTypefIDsize);
memset(&tgtdt.fOrigin[0], 0, kAliHLTComponentDataTypefOriginSize);
void AliHLTComponent::FillEventData(AliHLTComponentEventData& evtData)
{
+ // see header file for function documentation
memset(&evtData, 0, sizeof(AliHLTComponentEventData));
evtData.fStructSize=sizeof(AliHLTComponentEventData);
}
-void AliHLTComponent::PrintComponentDataTypeInfo(const AliHLTComponentDataType& dt) {
+void AliHLTComponent::PrintComponentDataTypeInfo(const AliHLTComponentDataType& dt)
+{
+ // see header file for function documentation
TString msg;
msg.Form("AliHLTComponentDataType(%d): ID=\"", dt.fStructSize);
for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
AliHLTLogging::Message(NULL, kHLTLogNone, NULL , NULL, msg.Data());
}
-int AliHLTComponent::GetEventCount()
+int AliHLTComponent::GetEventCount() const
{
+ // see header file for function documentation
return fEventCount;
}
int AliHLTComponent::IncrementEventCounter()
{
+ // see header file for function documentation
if (fEventCount>=0) fEventCount++;
return fEventCount;
}
AliHLTComponentBlockData*& outputBlocks,
AliHLTComponentEventDoneData*& edd )
{
+ // see header file for function documentation
int iResult=0;
fCurrentEvent=evtData.fEventID;
iResult=DoProcessing(evtData, blocks, trigData, outputPtr, size, outputBlockCnt, outputBlocks, edd);
#include "AliHLTLogging.h"
#include "AliHLTDataTypes.h"
#include "AliHLTDefinitions.h"
-#include "TObject.h"
/* Matthias Dec 2006
* The names have been changed for Aliroot's coding conventions sake
public:
/** standard constructor */
AliHLTComponent();
+ /** not a valid copy constructor, defined according to effective C++ style */
+ AliHLTComponent(const AliHLTComponent&);
+ /** not a valid assignment op, but defined according to effective C++ style */
+ AliHLTComponent& operator=(const AliHLTComponent&);
/** standard destructor */
virtual ~AliHLTComponent();
* During Init also the environment structure is passed to the component.
* @param environ environment pointer with environment dependend function
* calls
- * @param environ_param additionel parameter for function calls, the pointer
+ * @param environParam additionel parameter for function calls, the pointer
* is passed as it is
* @param argc size of the argument array
* @param argv agument array for component initialization
*/
- virtual int Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv );
+ virtual int Init( AliHLTComponentEnvironment* environ, void* environParam, int argc, const char** argv );
/**
* Clean-up function to terminate data processing.
* Fill AliHLTComponentBlockData structure with default values.
* @param blockData reference to data structure
*/
- void FillBlockData( AliHLTComponentBlockData& blockData );
+ void FillBlockData( AliHLTComponentBlockData& blockData ) const;
/**
* Fill AliHLTComponentShmData structure with default values.
* @param shmData reference to data structure
*/
- void FillShmData( AliHLTComponentShmData& shmData );
+ void FillShmData( AliHLTComponentShmData& shmData ) const;
/**
* Fill AliHLTComponentDataType structure with default values.
* @param dataType reference to data structure
*/
- void FillDataType( AliHLTComponentDataType& dataType );
+ void FillDataType( AliHLTComponentDataType& dataType ) const;
/**
* Copy data type structure
/**
* Helper function to convert the data type to a string.
*/
- void DataType2Text(const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2]);
+ void DataType2Text(const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2]) const;
/**
* Get event number.
* @return value of the internal event counter
*/
- int GetEventCount();
+ int GetEventCount() const;
private:
/**
int IncrementEventCounter();
/** The global component handler instance */
- static AliHLTComponentHandler* fpComponentHandler;
+ static AliHLTComponentHandler* fgpComponentHandler; //! transient
+
/** The environment where the component is running in */
- AliHLTComponentEnvironment fEnvironment;
+ AliHLTComponentEnvironment fEnvironment; // see above
/**
* Set by ProcessEvent before the processing starts (e.g. before calling
* @ref AliHLTProcessor::DoEvent)
*/
- AliHLTEventID_t fCurrentEvent;
+ AliHLTEventID_t fCurrentEvent; // see above
/** internal event no */
- int fEventCount;
+ int fEventCount; // see above
ClassDef(AliHLTComponent, 1)
};
fEnvironment(),
fStandardList()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
memset(&fEnvironment, 0, sizeof(AliHLTComponentEnvironment));
AddStandardComponents();
}
fEnvironment(),
fStandardList()
{
+ // see header file for class documentation
if (pEnv) {
memcpy(&fEnvironment, pEnv, sizeof(AliHLTComponentEnvironment));
AliHLTLogging::Init(pEnv->fLoggingFunc);
AliHLTComponentHandler::~AliHLTComponentHandler()
{
+ // see header file for class documentation
UnloadLibraries();
DeleteStandardComponents();
}
int AliHLTComponentHandler::AnnounceVersion()
{
+ // see header file for class documentation
int iResult=0;
#ifdef PACKAGE_STRING
void HLTbaseCompileInfo( char*& date, char*& time);
Int_t AliHLTComponentHandler::RegisterComponent(AliHLTComponent* pSample)
{
+ // see header file for class documentation
Int_t iResult=0;
if (pSample) {
if (FindComponent(pSample->GetComponentID())==NULL) {
int AliHLTComponentHandler::DeregisterComponent( const char* componentID )
{
+ // see header file for class documentation
int iResult=0;
if (componentID) {
} else {
Int_t AliHLTComponentHandler::ScheduleRegister(AliHLTComponent* pSample)
{
+ // see header file for class documentation
Int_t iResult=0;
if (pSample) {
fScheduleList.push_back(pSample);
int AliHLTComponentHandler::CreateComponent(const char* componentID, void* pEnvParam, int argc, const char** argv, AliHLTComponent*& component )
{
+ // see header file for class documentation
int iResult=0;
if (componentID) {
AliHLTComponent* pSample=FindComponent(componentID);
Int_t AliHLTComponentHandler::FindComponentIndex(const char* componentID)
{
+ // see header file for class documentation
Int_t iResult=0;
if (componentID) {
vector<AliHLTComponent*>::iterator element=fComponentList.begin();
AliHLTComponent* AliHLTComponentHandler::FindComponent(const char* componentID)
{
+ // see header file for class documentation
AliHLTComponent* pSample=NULL;
Int_t index=FindComponentIndex(componentID);
if (index>=0) {
Int_t AliHLTComponentHandler::InsertComponent(AliHLTComponent* pSample)
{
+ // see header file for class documentation
Int_t iResult=0;
if (pSample!=NULL) {
fComponentList.push_back(pSample);
return iResult;
}
-void AliHLTComponentHandler::List() {
+void AliHLTComponentHandler::List()
+{
+ // see header file for class documentation
vector<AliHLTComponent*>::iterator element=fComponentList.begin();
int index=0;
while (element!=fComponentList.end()) {
}
}
-void AliHLTComponentHandler::SetEnvironment(AliHLTComponentEnvironment* pEnv) {
+void AliHLTComponentHandler::SetEnvironment(AliHLTComponentEnvironment* pEnv)
+{
+ // see header file for class documentation
if (pEnv) {
memcpy(&fEnvironment, pEnv, sizeof(AliHLTComponentEnvironment));
AliHLTLogging::Init(fEnvironment.fLoggingFunc);
int AliHLTComponentHandler::LoadLibrary( const char* libraryPath )
{
+ // see header file for class documentation
int iResult=0;
if (libraryPath) {
AliHLTComponent::SetGlobalComponentHandler(this);
int AliHLTComponentHandler::UnloadLibrary( const char* libraryPath )
{
+ // see header file for class documentation
int iResult=0;
if (libraryPath) {
} else {
int AliHLTComponentHandler::UnloadLibraries()
{
+ // see header file for class documentation
int iResult=0;
vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
while (element!=fLibraryList.end()) {
int AliHLTComponentHandler::AddStandardComponents()
{
+ // see header file for class documentation
int iResult=0;
AliHLTComponent::SetGlobalComponentHandler(this);
fStandardList.push_back(new AliHLTFilePublisher);
int AliHLTComponentHandler::RegisterScheduledComponents()
{
+ // see header file for class documentation
int iResult=0;
vector<AliHLTComponent*>::iterator element=fScheduleList.begin();
int iLocalResult=0;
int AliHLTComponentHandler::DeleteStandardComponents()
{
+ // see header file for class documentation
int iResult=0;
vector<AliHLTComponent*>::iterator element=fStandardList.begin();
while (element!=fStandardList.end()) {
int UnloadLibraries();
/** list of registered components */
- vector<AliHLTComponent*> fComponentList;
+ vector<AliHLTComponent*> fComponentList; // see above
/** list of scheduled components */
- vector<AliHLTComponent*> fScheduleList;
+ vector<AliHLTComponent*> fScheduleList; // see above
/** list of libraries */
- vector<AliHLTLibHandle> fLibraryList;
+ vector<AliHLTLibHandle> fLibraryList; // see above
/** running environment for the component */
- AliHLTComponentEnvironment fEnvironment;
+ AliHLTComponentEnvironment fEnvironment; // see above
/** list of standard components */
- vector<AliHLTComponent*> fStandardList;
+ vector<AliHLTComponent*> fStandardList; // see above
ClassDef(AliHLTComponentHandler, 0);
#include "AliHLTComponentHandler.h"
#include <iostream>
#include <string>
+#include "TList.h"
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTConfiguration)
fArgc(-1),
fArgv(NULL)
{
+ // see header file for function documentation
fListSrcElement=fListSources.begin();
}
fArgc(-1),
fArgv(NULL)
{
+ // see header file for function documentation
fListSrcElement=fListSources.begin();
if (id && component) {
- if (fConfigurationHandler) {
- fConfigurationHandler->RegisterConfiguration(this);
+ if (fgConfigurationHandler) {
+ fgConfigurationHandler->RegisterConfiguration(this);
} else {
HLTError("no configuration handler set, abort registration");
}
fArgc(-1),
fArgv(NULL)
{
+ // see header file for function documentation
fListSrcElement=fListSources.begin();
HLTFatal("copy constructor untested");
}
AliHLTConfiguration& AliHLTConfiguration::operator=(const AliHLTConfiguration&)
{
+ // see header file for function documentation
HLTFatal("assignment operator untested");
return *this;
}
AliHLTConfiguration::~AliHLTConfiguration()
{
- if (fConfigurationHandler) {
- if (fConfigurationHandler->FindConfiguration(fID)!=NULL) {
- fConfigurationHandler->RemoveConfiguration(this);
+ // see header file for function documentation
+ if (fgConfigurationHandler) {
+ if (fgConfigurationHandler->FindConfiguration(fID)!=NULL) {
+ fgConfigurationHandler->RemoveConfiguration(this);
}
}
if (fArgv != NULL) {
/* the global configuration handler which is used to automatically register the configuration
*/
-AliHLTConfigurationHandler* AliHLTConfiguration::fConfigurationHandler=NULL;
+AliHLTConfigurationHandler* AliHLTConfiguration::fgConfigurationHandler=NULL;
int AliHLTConfiguration::GlobalInit(AliHLTConfigurationHandler* pHandler)
{
+ // see header file for function documentation
int iResult=0;
- if (fConfigurationHandler!=NULL) {
- fConfigurationHandler->Logging(kHLTLogWarning, "AliHLTConfiguration::GlobalInit", HLT_DEFAULT_LOG_KEYWORD, "configuration handler already initialized, overriding object %p", fConfigurationHandler);
+ if (fgConfigurationHandler!=NULL) {
+ fgConfigurationHandler->Logging(kHLTLogWarning, "AliHLTConfiguration::GlobalInit", HLT_DEFAULT_LOG_KEYWORD, "configuration handler already initialized, overriding object %p", fgConfigurationHandler);
}
- fConfigurationHandler=pHandler;
+ fgConfigurationHandler=pHandler;
return iResult;
}
int AliHLTConfiguration::GlobalDeinit()
{
+ // see header file for function documentation
int iResult=0;
- fConfigurationHandler=NULL;
+ fgConfigurationHandler=NULL;
return iResult;
}
-const char* AliHLTConfiguration::GetName() const {
+const char* AliHLTConfiguration::GetName() const
+{
+ // see header file for function documentation
if (fID)
return fID;
return TObject::GetName();
AliHLTConfiguration* AliHLTConfiguration::GetSource(const char* id)
{
+ // see header file for function documentation
AliHLTConfiguration* pSrc=NULL;
if (id) {
// first check the current element
AliHLTConfiguration* AliHLTConfiguration::GetFirstSource()
{
+ // see header file for function documentation
AliHLTConfiguration* pSrc=NULL;
if (fNofSources>=0 || ExtractSources()) {
fListSrcElement=fListSources.begin();
AliHLTConfiguration* AliHLTConfiguration::GetNextSource()
{
+ // see header file for function documentation
AliHLTConfiguration* pSrc=NULL;
if (fNofSources>0) {
if (fListSrcElement!=fListSources.end() && (++fListSrcElement)!=fListSources.end())
int AliHLTConfiguration::SourcesResolved(int bAuto)
{
+ // see header file for function documentation
int iResult=0;
if (fNofSources>=0 || bAuto && (iResult=ExtractSources())>=0) {
//HLTDebug("fNofSources=%d", fNofSources);
int AliHLTConfiguration::InvalidateSource(AliHLTConfiguration* pConf)
{
+ // see header file for function documentation
int iResult=0;
if (pConf) {
vector<AliHLTConfiguration*>::iterator element=fListSources.begin();
void AliHLTConfiguration::PrintStatus()
{
+ // see header file for function documentation
HLTLogKeyword("configuration status");
HLTMessage("status of configuration \"%s\" (%p)", GetName(), this);
if (fComponent) HLTMessage(" - component: \"%s\"", fComponent);
int AliHLTConfiguration::GetArguments(const char*** pArgv)
{
+ // see header file for function documentation
int iResult=0;
if (pArgv) {
if (fArgc==-1) {
int AliHLTConfiguration::ExtractSources()
{
+ // see header file for function documentation
int iResult=0;
fNofSources=0;
if (fStringSources!=NULL) {
fNofSources=tgtList.size();
vector<char*>::iterator element=tgtList.begin();
while ((element=tgtList.begin())!=tgtList.end()) {
- if (fConfigurationHandler) {
- AliHLTConfiguration* pConf=fConfigurationHandler->FindConfiguration(*element);
+ if (fgConfigurationHandler) {
+ AliHLTConfiguration* pConf=fgConfigurationHandler->FindConfiguration(*element);
if (pConf) {
HLTDebug("source \"%s\" inserted", pConf->GetName());
fListSources.push_back(pConf);
int AliHLTConfiguration::ExtractArguments()
{
+ // see header file for function documentation
int iResult=0;
if (fArguments!=NULL) {
vector<char*> tgtList;
int AliHLTConfiguration::InterpreteString(const char* arg, vector<char*>& argList)
{
+ // see header file for function documentation
int iResult=0;
if (arg) {
//HLTDebug("interprete \"%s\"", arg);
int AliHLTConfiguration::FollowDependency(const char* id, TList* pTgtList)
{
+ // see header file for function documentation
int iResult=0;
if (id) {
AliHLTConfiguration* pDep=NULL;
fpBlockDataArray(NULL),
fBlockDataArraySize(0)
{
+ // see header file for function documentation
}
AliHLTTask::AliHLTTask(AliHLTConfiguration* pConf)
fpBlockDataArray(NULL),
fBlockDataArraySize(0)
{
+ // see header file for function documentation
}
AliHLTTask::AliHLTTask(const AliHLTTask&)
AliHLTTask& AliHLTTask::operator=(const AliHLTTask&)
{
+ // see header file for function documentation
HLTFatal("assignment operator untested");
return *this;
}
int AliHLTTask::Init(AliHLTConfiguration* pConf, AliHLTComponentHandler* pCH)
{
+ // see header file for function documentation
int iResult=0;
if (fpConfiguration!=NULL && pConf!=NULL && fpConfiguration!=pConf) {
HLTWarning("overriding existing reference to configuration object %p (%s) by %p",
int AliHLTTask::Deinit()
{
+ // see header file for function documentation
int iResult=0;
AliHLTComponent* pComponent=GetComponent();
fpComponent=NULL;
const char *AliHLTTask::GetName() const
{
+ // see header file for function documentation
if (fpConfiguration)
return fpConfiguration->GetName();
return TObject::GetName();
AliHLTConfiguration* AliHLTTask::GetConf() const
{
+ // see header file for function documentation
return fpConfiguration;
}
AliHLTComponent* AliHLTTask::GetComponent() const
{
+ // see header file for function documentation
return fpComponent;
}
AliHLTTask* AliHLTTask::FindDependency(const char* id)
{
+ // see header file for function documentation
AliHLTTask* pTask=NULL;
if (id) {
pTask=(AliHLTTask*)fListDependencies.FindObject(id);
int AliHLTTask::FollowDependency(const char* id, TList* pTgtList)
{
+ // see header file for function documentation
int iResult=0;
if (id) {
AliHLTTask* pDep=NULL;
void AliHLTTask::PrintDependencyTree(const char* id, int bFromConfiguration)
{
+ // see header file for function documentation
HLTLogKeyword("task dependencies");
int iResult=0;
TList tgtList;
int AliHLTTask::SetDependency(AliHLTTask* pDep)
{
+ // see header file for function documentation
int iResult=0;
if (pDep) {
if (FindDependency(pDep->GetName())==NULL) {
int AliHLTTask::CheckDependencies()
{
+ // see header file for function documentation
int iResult=0;
AliHLTConfiguration* pSrc=fpConfiguration->GetFirstSource();
while (pSrc) {
int AliHLTTask::Depends(AliHLTTask* pTask)
{
+ // see header file for function documentation
int iResult=0;
if (pTask) {
if (fpConfiguration) {
AliHLTTask* AliHLTTask::FindTarget(const char* id)
{
+ // see header file for function documentation
AliHLTTask* pTask=NULL;
if (id) {
pTask=(AliHLTTask*)fListTargets.FindObject(id);
int AliHLTTask::SetTarget(AliHLTTask* pTgt)
{
+ // see header file for function documentation
int iResult=0;
if (pTgt) {
if (FindTarget(pTgt->GetName())==NULL) {
int AliHLTTask::StartRun()
{
+ // see header file for function documentation
int iResult=0;
int iNofInputDataBlocks=0;
AliHLTComponent* pComponent=GetComponent();
int AliHLTTask::EndRun()
{
+ // see header file for function documentation
int iResult=0;
if (fpBlockDataArray) {
fBlockDataArraySize=0;
int AliHLTTask::ProcessTask(Int_t eventNo)
{
+ // see header file for function documentation
int iResult=0;
AliHLTComponent* pComponent=GetComponent();
if (pComponent && fpDataBuffer) {
int AliHLTTask::GetNofMatchingDataBlocks(const AliHLTTask* pConsumerTask) const
{
+ // see header file for function documentation
int iResult=0;
if (pConsumerTask) {
if (fpDataBuffer) {
int AliHLTTask::GetNofMatchingDataTypes(const AliHLTTask* pConsumerTask) const
{
+ // see header file for function documentation
int iResult=0;
if (pConsumerTask) {
AliHLTComponent* pComponent=GetComponent();
int AliHLTTask::Subscribe(const AliHLTTask* pConsumerTask, AliHLTComponentBlockData* pBlockDesc, int iArraySize)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumerTask) {
if (fpDataBuffer) {
int AliHLTTask::Release(AliHLTComponentBlockData* pBlockDesc, const AliHLTTask* pConsumerTask)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumerTask && pBlockDesc) {
if (fpDataBuffer) {
return iResult;
}
-/* this function is most likely depricated
-int AliHLTTask::ClearSourceBlocks()
-{
- int iResult=0;
- return iResult;
-}
-*/
-
void AliHLTTask::PrintStatus()
{
+ // see header file for function documentation
HLTLogKeyword("task properties");
AliHLTComponent* pComponent=GetComponent();
if (pComponent) {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-TList AliHLTConfigurationHandler::fListConfigurations;
-TList AliHLTConfigurationHandler::fListDynamicConfigurations;
+TList AliHLTConfigurationHandler::fgListConfigurations;
+TList AliHLTConfigurationHandler::fgListDynamicConfigurations;
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTConfigurationHandler)
AliHLTConfigurationHandler::AliHLTConfigurationHandler()
{
+ // see header file for function documentation
}
AliHLTConfigurationHandler::~AliHLTConfigurationHandler()
{
- TObjLink* lnk=fListDynamicConfigurations.FirstLink();
+ // see header file for function documentation
+ TObjLink* lnk=fgListDynamicConfigurations.FirstLink();
while (lnk) {
TObject* obj=lnk->GetObject();
- if (fListConfigurations.FindObject(obj->GetName())==NULL) {
+ if (fgListConfigurations.FindObject(obj->GetName())==NULL) {
HLTDebug("delete dynamic configuration \"%s\"", obj->GetName());
delete obj;
}
int AliHLTConfigurationHandler::RegisterConfiguration(AliHLTConfiguration* pConf)
{
+ // see header file for function documentation
int iResult=0;
if (pConf) {
if (FindConfiguration(pConf->GetName()) == NULL) {
- fListConfigurations.Add(pConf);
+ fgListConfigurations.Add(pConf);
//HLTDebug("configuration \"%s\" registered", pConf->GetName());
// mark all configurations with unresolved dependencies for re-evaluation
- TObjLink* lnk=fListConfigurations.FirstLink();
+ TObjLink* lnk=fgListConfigurations.FirstLink();
while (lnk) {
AliHLTConfiguration* pSrc=(AliHLTConfiguration*)lnk->GetObject();
if (pSrc && pSrc!=pConf && pSrc->SourcesResolved()!=1) {
int AliHLTConfigurationHandler::CreateConfiguration(const char* id, const char* component, const char* sources, const char* arguments)
{
+ // see header file for function documentation
int iResult=0;
AliHLTConfiguration* pConf= new AliHLTConfiguration(id, component, sources, arguments);
if (pConf) {
pConf=NULL;
iResult=-EEXIST;
} else {
- fListDynamicConfigurations.Add(pConf);
+ fgListDynamicConfigurations.Add(pConf);
}
} else {
HLTError("system error: object allocation failed");
void AliHLTConfigurationHandler::PrintConfigurations()
{
+ // see header file for function documentation
HLTLogKeyword("configuration listing");
HLTMessage("registered configurations:");
- TObjLink *lnk = fListConfigurations.FirstLink();
+ TObjLink *lnk = fgListConfigurations.FirstLink();
while (lnk) {
TObject *obj = lnk->GetObject();
HLTMessage(" %s", obj->GetName());
int AliHLTConfigurationHandler::RemoveConfiguration(const char* id)
{
+ // see header file for function documentation
int iResult=0;
if (id) {
AliHLTConfiguration* pConf=NULL;
int AliHLTConfigurationHandler::RemoveConfiguration(AliHLTConfiguration* pConf)
{
+ // see header file for function documentation
int iResult=0;
if (pConf) {
// remove the configuration from the list
HLTDebug("remove configuration \"%s\"", pConf->GetName());
- fListConfigurations.Remove(pConf);
+ fgListConfigurations.Remove(pConf);
// remove cross links in the remaining configurations
- TObjLink* lnk=fListConfigurations.FirstLink();
+ TObjLink* lnk=fgListConfigurations.FirstLink();
while (lnk && iResult>=0) {
AliHLTConfiguration* pRem=(AliHLTConfiguration*)lnk->GetObject();
if (pRem) {
AliHLTConfiguration* AliHLTConfigurationHandler::FindConfiguration(const char* id)
{
+ // see header file for function documentation
AliHLTConfiguration* pConf=NULL;
if (id) {
- pConf=(AliHLTConfiguration*)fListConfigurations.FindObject(id);
+ pConf=(AliHLTConfiguration*)fgListConfigurations.FindObject(id);
}
return pConf;
}
* The id is a unique string.
* @return id of the component
*/
- const char* GetComponentID() {return fComponent;}
+ const char* GetComponentID() const {return fComponent;}
/**
* Print status info.
*/
int ExtractArguments();
- /* helper function to build a vector from an argument string
+ /**
+ * Helper function to build a vector from an argument string
+ * @param arg pointer to argument string
+ * @param argList target to receive the argument list
*/
int InterpreteString(const char* arg, vector<char*>& argList);
/** id of this configuration */
- const char* fID;
+ const char* fID; //! transient
/** component id of this configuration */
- const char* fComponent;
+ const char* fComponent; //! transient
/** the <i>sources</i> string as passed to the constructor */
- const char* fStringSources;
+ const char* fStringSources; //! transient
/** number of resolved sources, -1 indicates re-evaluation */
- int fNofSources;
+ int fNofSources; // see above
/** list of sources */
- vector<AliHLTConfiguration*> fListSources;
+ vector<AliHLTConfiguration*> fListSources; // see above
/** iterator for the above list */
- vector<AliHLTConfiguration*>::iterator fListSrcElement;
+ vector<AliHLTConfiguration*>::iterator fListSrcElement; // see above
/**
* The argument string as passed to the constructor.
* be parsed and the separated arguments stored in the @ref fArgv array
* and @ref fArgc member.
*/
- const char* fArguments;
+ const char* fArguments; // see above
/** number of arguments */
- int fArgc;
+ int fArgc; // see above
/** argument array */
- char** fArgv;
+ char** fArgv; // see above
- static AliHLTConfigurationHandler* fConfigurationHandler;
+ /** the instance of the global configuration handler */
+ static AliHLTConfigurationHandler* fgConfigurationHandler; //! transient
ClassDef(AliHLTConfiguration, 0);
};
@brief Global handling of HLT configurations.
*/
-/* #include <cerrno> */
-#include <TObject.h>
#include <TList.h>
-/* #include "AliHLTDataTypes.h" */
-/* #include "AliHLTLogging.h" */
-/* #include "AliHLTDataBuffer.h" */
/**
* @class AliHLTConfigurationHandler
private:
/** the list of registered configurations */
- static TList fListConfigurations;
+ static TList fgListConfigurations; // see above
/** the list of dynamic configurations (for proper cleanup) */
- static TList fListDynamicConfigurations;
+ static TList fgListDynamicConfigurations; // see above
ClassDef(AliHLTConfigurationHandler, 0);
};
fpConsumer(NULL),
fSegments()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
fSegments.clear();
}
fpConsumer(pConsumer),
fSegments()
{
+ // see header file for function documentation
fSegments.clear();
}
fpConsumer(desc.fpConsumer),
fSegments()
{
+ // see header file for function documentation
+
// we can simply transfer the pointer to th new object since there are no
// release actions in the destructor
}
AliHLTConsumerDescriptor& AliHLTConsumerDescriptor::operator=(const AliHLTConsumerDescriptor& desc)
{
+ // see header file for function documentation
+
// we can simply transfer the pointer to th new object since there are no
// release actions in the destructor
fpConsumer=desc.fpConsumer;
AliHLTConsumerDescriptor::~AliHLTConsumerDescriptor()
{
+ // see header file for function documentation
if (fSegments.size()>0) {
//HLTWarning("unreleased data segments found");
}
int AliHLTConsumerDescriptor::SetActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size)
{
+ // see header file for function documentation
int iResult=0;
AliHLTDataSegment segment(offset, size);
fSegments.push_back(segment);
int AliHLTConsumerDescriptor::CheckActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size)
{
+ // see header file for function documentation
int iResult=0;
if (fSegments.size()>0) {
vector<AliHLTDataSegment>::iterator segment=fSegments.begin();
int AliHLTConsumerDescriptor::ReleaseActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size)
{
+ // see header file for function documentation
int iResult=0;
if (fSegments.size()>0) {
vector<AliHLTDataSegment>::iterator segment=fSegments.begin();
fpBuffer(NULL),
fFlags(0)
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
fSegments.empty();
fConsumers.empty();
fActiveConsumers.empty();
fReleasedConsumers.empty();
- fNofInstances++;
+ fgNofInstances++;
}
AliHLTDataBuffer::AliHLTDataBuffer(const AliHLTDataBuffer&)
fpBuffer(NULL),
fFlags(0)
{
+ // see header file for function documentation
HLTFatal("copy constructor untested");
}
AliHLTDataBuffer& AliHLTDataBuffer::operator=(const AliHLTDataBuffer&)
{
+ // see header file for function documentation
HLTFatal("assignment operator untested");
return *this;
}
-int AliHLTDataBuffer::fNofInstances=0;
-vector<AliHLTRawBuffer*> AliHLTDataBuffer::fFreeBuffers;
-vector<AliHLTRawBuffer*> AliHLTDataBuffer::fActiveBuffers;
-AliHLTUInt32_t AliHLTDataBuffer::fMargin=1024;
+int AliHLTDataBuffer::fgNofInstances=0;
+vector<AliHLTRawBuffer*> AliHLTDataBuffer::fgFreeBuffers;
+vector<AliHLTRawBuffer*> AliHLTDataBuffer::fgActiveBuffers;
+AliHLTUInt32_t AliHLTDataBuffer::fgMargin=1024;
AliHLTLogging AliHLTDataBuffer::fgLogging;
AliHLTDataBuffer::~AliHLTDataBuffer()
{
- if (--fNofInstances<=0) {
+ // see header file for function documentation
+ if (--fgNofInstances<=0) {
DeleteRawBuffers();
}
CleanupConsumerList();
int AliHLTDataBuffer::SetConsumer(AliHLTComponent* pConsumer)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumer) {
if (FindConsumer(pConsumer)) {
int AliHLTDataBuffer::FindMatchingDataBlocks(const AliHLTComponent* pConsumer, vector<AliHLTComponentDataType>* tgtList)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumer) {
vector<AliHLTDataSegment> segments;
int AliHLTDataBuffer::FindMatchingDataSegments(const AliHLTComponent* pConsumer, vector<AliHLTDataSegment>& tgtList)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumer) {
vector<AliHLTComponentDataType> dtlist;
int AliHLTDataBuffer::Subscribe(const AliHLTComponent* pConsumer, AliHLTComponentBlockData* arrayBlockDesc, int iArraySize)
{
+ // see header file for function documentation
int iResult=0;
if (pConsumer && arrayBlockDesc) {
if (fpBuffer) {
int AliHLTDataBuffer::Release(AliHLTComponentBlockData* pBlockDesc, const AliHLTComponent* pConsumer)
{
+ // see header file for function documentation
int iResult=0;
if (pBlockDesc && pConsumer) {
AliHLTConsumerDescriptor* pDesc=FindConsumer(pConsumer, fActiveConsumers);
AliHLTUInt8_t* AliHLTDataBuffer::GetTargetBuffer(int iMinSize)
{
+ // see header file for function documentation
AliHLTUInt8_t* pTargetBuffer=NULL;
fpBuffer=CreateRawBuffer(iMinSize);
if (fpBuffer) {
int AliHLTDataBuffer::SetSegments(AliHLTUInt8_t* pTgt, AliHLTComponentBlockData* arrayBlockData, int iSize)
{
+ // see header file for function documentation
int iResult=0;
if (pTgt && arrayBlockData && iSize>=0) {
if (fpBuffer) {
int AliHLTDataBuffer::IsEmpty()
{
+ // see header file for function documentation
int iResult=fpBuffer==NULL || GetNofSegments()==0;
return iResult;
}
int AliHLTDataBuffer::GetNofSegments()
{
+ // see header file for function documentation
int iResult=fSegments.size();
return iResult;
}
int AliHLTDataBuffer::GetNofConsumers()
{
+ // see header file for function documentation
int iResult=fConsumers.size() + GetNofActiveConsumers() + fReleasedConsumers.size();
return iResult;
}
int AliHLTDataBuffer::GetNofActiveConsumers()
{
+ // see header file for function documentation
int iResult=fActiveConsumers.size();
return iResult;
}
AliHLTRawBuffer* AliHLTDataBuffer::CreateRawBuffer(AliHLTUInt32_t size)
{
+ // see header file for function documentation
AliHLTRawBuffer* pRawBuffer=NULL;
- vector<AliHLTRawBuffer*>::iterator buffer=fFreeBuffers.begin();
- while (buffer!=fFreeBuffers.end() && pRawBuffer==NULL) {
- if ((*buffer)->fTotalSize>=size && ((*buffer)->fTotalSize-size)<fMargin) {
+ vector<AliHLTRawBuffer*>::iterator buffer=fgFreeBuffers.begin();
+ while (buffer!=fgFreeBuffers.end() && pRawBuffer==NULL) {
+ if ((*buffer)->fTotalSize>=size && ((*buffer)->fTotalSize-size)<fgMargin) {
// assign this element
pRawBuffer=*buffer;
pRawBuffer->fSize=size;
- fFreeBuffers.erase(buffer);
+ fgFreeBuffers.erase(buffer);
fgLogging.Logging(kHLTLogDebug, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "raw buffer container %p provided for request of %d bytes (total %d available in buffer %p)", pRawBuffer, size, pRawBuffer->fTotalSize, pRawBuffer->fPtr);
- fActiveBuffers.push_back(pRawBuffer);
+ fgActiveBuffers.push_back(pRawBuffer);
break;
}
buffer++;
if (pRawBuffer->fPtr) {
pRawBuffer->fSize=size;
pRawBuffer->fTotalSize=size;
- fActiveBuffers.push_back(pRawBuffer);
+ fgActiveBuffers.push_back(pRawBuffer);
fgLogging.Logging(kHLTLogDebug, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "new raw buffer %p of size %d created (container %p)", pRawBuffer->fPtr, pRawBuffer->fTotalSize, pRawBuffer);
} else {
delete pRawBuffer;
int AliHLTDataBuffer::ReleaseRawBuffer(AliHLTRawBuffer* pBuffer)
{
+ // see header file for function documentation
int iResult=0;
if (pBuffer) {
- vector<AliHLTRawBuffer*>::iterator buffer=fActiveBuffers.begin();
- while (buffer!=fActiveBuffers.end() && (*buffer)!=pBuffer) {
+ vector<AliHLTRawBuffer*>::iterator buffer=fgActiveBuffers.begin();
+ while (buffer!=fgActiveBuffers.end() && (*buffer)!=pBuffer) {
buffer++;
}
- if (buffer!=fActiveBuffers.end()) {
+ if (buffer!=fgActiveBuffers.end()) {
(*buffer)->fSize=0;
- fFreeBuffers.push_back(*buffer);
- fActiveBuffers.erase(buffer);
+ fgFreeBuffers.push_back(*buffer);
+ fgActiveBuffers.erase(buffer);
} else {
fgLogging.Logging(kHLTLogWarning, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "can not find raw buffer container %p in the list of active containers", pBuffer);
iResult=-ENOENT;
int AliHLTDataBuffer::DeleteRawBuffers()
{
+ // see header file for function documentation
int iResult=0;
- vector<AliHLTRawBuffer*>::iterator buffer=fFreeBuffers.begin();
- while (buffer!=fFreeBuffers.end()) {
+ vector<AliHLTRawBuffer*>::iterator buffer=fgFreeBuffers.begin();
+ while (buffer!=fgFreeBuffers.end()) {
free((*buffer)->fPtr);
delete *buffer;
- fFreeBuffers.erase(buffer);
- buffer=fFreeBuffers.begin();
+ fgFreeBuffers.erase(buffer);
+ buffer=fgFreeBuffers.begin();
}
- buffer=fActiveBuffers.begin();
- while (buffer!=fActiveBuffers.end()) {
+ buffer=fgActiveBuffers.begin();
+ while (buffer!=fgActiveBuffers.end()) {
fgLogging.Logging(kHLTLogWarning, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "request to delete active raw buffer container (raw buffer %p, size %d)", (*buffer)->fPtr, (*buffer)->fTotalSize);
free((*buffer)->fPtr);
delete *buffer;
- fActiveBuffers.erase(buffer);
- buffer=fActiveBuffers.begin();
+ fgActiveBuffers.erase(buffer);
+ buffer=fgActiveBuffers.begin();
}
return iResult;
}
-AliHLTConsumerDescriptor* AliHLTDataBuffer::FindConsumer(const AliHLTComponent* pConsumer, vector<AliHLTConsumerDescriptor*> &list)
+AliHLTConsumerDescriptor* AliHLTDataBuffer::FindConsumer(const AliHLTComponent* pConsumer, vector<AliHLTConsumerDescriptor*> &list) const
{
+ // see header file for function documentation
AliHLTConsumerDescriptor* pDesc=NULL;
vector<AliHLTConsumerDescriptor*>::iterator desc=list.begin();
while (desc!=list.end() && pDesc==NULL) {
int AliHLTDataBuffer::ResetDataBuffer()
{
+ // see header file for function documentation
int iResult=0;
AliHLTRawBuffer* pBuffer=fpBuffer;
fpBuffer=NULL;
int AliHLTDataBuffer::Reset()
{
+ // see header file for function documentation
return ResetDataBuffer();
}
int AliHLTDataBuffer::ChangeConsumerState(AliHLTConsumerDescriptor* pDesc, vector<AliHLTConsumerDescriptor*> &srcList, vector<AliHLTConsumerDescriptor*> &tgtList)
{
+ // see header file for function documentation
int iResult=-ENOENT;
if (pDesc) {
vector<AliHLTConsumerDescriptor*>::iterator desc=srcList.begin();
return iResult;
}
-int AliHLTDataBuffer::CleanupConsumerList() {
+int AliHLTDataBuffer::CleanupConsumerList()
+{
+ // see header file for function documentation
int iResult=0;
ResetDataBuffer();
vector<AliHLTConsumerDescriptor*>::iterator desc=fConsumers.begin();
return iResult;
}
-int AliHLTDataBuffer::FindConsumer(AliHLTComponent* pConsumer, int bAllLists) {
+int AliHLTDataBuffer::FindConsumer(AliHLTComponent* pConsumer, int bAllLists)
+{
+ // see header file for function documentation
vector<AliHLTConsumerDescriptor*>::iterator desc=fConsumers.begin();
while (desc!=fConsumers.end()) {
if ((*desc)->GetComponent()==pConsumer)
#include "AliHLTDataTypes.h"
#include "AliHLTDefinitions.h"
#include "TObject.h"
-#include "TList.h"
+//#include "TList.h"
class AliHLTComponent;
/* @name internal data structures
memset(&fDataType, 0, sizeof(AliHLTComponentDataType));
}
/** the data type of this segment */
- AliHLTComponentDataType fDataType;
+ AliHLTComponentDataType fDataType; // see above
/** offset in byte within the data buffer */
- AliHLTUInt32_t fSegmentOffset;
+ AliHLTUInt32_t fSegmentOffset; // see above
/** size of the actual content */
- AliHLTUInt32_t fSegmentSize;
+ AliHLTUInt32_t fSegmentSize; // see above
/** data specification */
- AliHLTUInt32_t fSpecification;
+ AliHLTUInt32_t fSpecification; // see above
};
/**
*/
struct AliHLTRawBuffer {
/** size of the currently occupied partition of the buffer */
- AliHLTUInt32_t fSize;
+ AliHLTUInt32_t fSize; // see above
/** total size of the buffer, including safety margin */
- AliHLTUInt32_t fTotalSize;
+ AliHLTUInt32_t fTotalSize; // see above
/** the buffer */
- void* fPtr;
+ void* fPtr; //! transient
};
/**
* @class AliHLTConsumerDescriptor
* @brief Helper class to describe a consumer component.
*
- * There is unfortunately no unique determination of the data type from the component
- * itself possible, thats why both component and data type have to be initialized
- * and are stored in a compound. The class is intended to make bookkeeping easier.
+ * There is unfortunately no unique determination of the data type from the
+ * component itself possible, thats why both component and data type have to
+ * be initialized and are stored in a compound. The class is intended to make
+ * bookkeeping easier.
*
* @note This class is only used for the @ref alihlt_system.
*
* @ingroup alihlt_system
*/
class AliHLTConsumerDescriptor : public TObject, public AliHLTLogging {
- private:
- AliHLTComponent* fpConsumer;
- vector<AliHLTDataSegment> fSegments;
-
public:
/** standard constructur */
AliHLTConsumerDescriptor();
~AliHLTConsumerDescriptor();
/**
- * Get the component of this descriptor
+ * Get the component of this descriptor.
* @return pointer to the component
*/
AliHLTComponent* GetComponent() {return fpConsumer;}
/**
- * Set an active data segment
- * the pointer will be handled in a container, no allocation, copy or cleanup
+ * Set an active data segment.
+ * the pointer will be handled in a container, no allocation, copy or
+ * cleanup.
* @param offset offset of the segment in the buffer
* @param size size of the segment in the buffer
* @return >=0 if succeeded
int SetActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
/**
- * check whether there is an active data segment of certain size with certain offset
+ * Check whether there is an active data segment of certain size with
+ * certain offset.
* @param offset offset of the data segment in the data buffer
* @param size size of the data segment in the data buffer
* @return > if existend, 0 if not
*/
int ReleaseActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
+ private:
+ /** consumer object */
+ AliHLTComponent* fpConsumer; //! transient
+
+ /** list of data segments */
+ vector<AliHLTDataSegment> fSegments; // see above
+
//ClassDef(AliHLTConsumerDescriptor, 0)
};
* @class AliHLTDataBuffer
* @brief Handling of data buffers for the HLT.
*
- * The class provides handling of data buffers for HLT tasks. Each task gets its
- * own Data Buffer instance. The buffer is grouped into different data segments according
- * to the output of the component.<br>
- * The Data Buffer keeps control over the data requests of the 'child' components. Each
- * component can subscribe to a certain segment of the data buffer. It's state is then
- * changed from 'reserved' to 'active'. After the data processing, the component has to
- * release the segment and it's state is set to 'processed'.
- * If all components have requested and released their data, the Raw Buffer is released
- * and pushed back in the list of available buffers.
+ * The class provides handling of data buffers for HLT tasks. Each task gets
+ * its own Data Buffer instance. The buffer is grouped into different data
+ * segments according to the output of the component.<br>
+ * The Data Buffer keeps control over the data requests of the 'child'
+ * components. Each component can subscribe to a certain segment of the data
+ * buffer. It's state is then changed from 'reserved' to 'active'. After the
+ * data processing, the component has to release the segment and it's state is
+ * set to 'processed'. If all components have requested and released their data,
+ * the Raw Buffer is released and pushed back in the list of available buffers.
*
* @note This class is only used for the @ref alihlt_system.
*
*/
class AliHLTDataBuffer : public TObject, public AliHLTLogging {
public:
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
// condtructors and destructors
/* standard constructor
/** destructor */
virtual ~AliHLTDataBuffer();
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
// initialization
/**
*/
int SetConsumer(AliHLTComponent* pConsumer);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
// component to component communication
/**
- * Determine the number of matching data blocks for the component and a consumer
- * component. <br>
- * The first approach will support only one output data type for processing components.
+ * Determine the number of matching data blocks for the component and a
+ * consumer component. <br>
+ * The first approach will support only one output data type for processing
+ * components.
* @param pConsumer the component which subscribes to the buffer
* @param tgtList (optional) the list to receive the data types
* @return: number of data blocks which match the input data types
* of the consumer, neg. error code if failed <br>
* -EINVAL invalid parameter <br>
*/
- int FindMatchingDataBlocks(const AliHLTComponent* pConsumer, vector<AliHLTComponentDataType>* tgtList=NULL);
+ int FindMatchingDataBlocks(const AliHLTComponent* pConsumer,
+ vector<AliHLTComponentDataType>* tgtList=NULL);
/**
* Subscribe to a segment of the data buffer.
- * The function prepares the block descriptor for subsequent use with the AliHLTComponent::ProcessEvent
- * method, the method can prepare several block descriptors up to the array size specified by
- * iArraySize. The return value is independent from the array size the number of block descriptors
- * which would have been prepared if there was enough space in the array<br>
+ * The function prepares the block descriptor for subsequent use with the
+ * AliHLTComponent::ProcessEvent method, the method can prepare several block
+ * descriptors up to the array size specified by iArraySize. The return value
+ * is independent from the array size the number of block descriptors which
+ * would have been prepared if there was enough space in the array<br>
* The method is used by the consumer component.
* @param pConsumer the component which subscribes to the buffer
* @param arrayBlockDesc pointer to block descriptor to be filled
* @param iArraySize size of the block descriptor array
- * @return: number of matching data blocks if success, negative error code if failed<br>
- * -EACCESS the state of the consumer can not be changed (activated)
+ * @return: number of matching data blocks, neg. error code if failed<br>
+ * -EACCESS the consumer state can't be changed (activated)
* -EBADF unresolved data segments <br>
* -ENOENT consumer component not found <br>
* -ENODATA data buffer does not have raw data <br>
* -EINVAL invalid parameter <br>
*/
- int Subscribe(const AliHLTComponent* pConsumer, AliHLTComponentBlockData* arrayBlockDesc, int iArraySize);
+ int Subscribe(const AliHLTComponent* pConsumer,
+ AliHLTComponentBlockData* arrayBlockDesc,
+ int iArraySize);
/**
* Release an instance of the data buffer.
* @param pBlockDesc descriptor of the data segment
* @param pConsumer the component which subscribes to the buffer
* @return: >0 if success, negative error code if failed <br>
- * -EACCESS the state of the consumer can not be changed (de-activated)
- * -ENOENT consumer component has not subscribed to the buffer <br>
+ * -EACCESS the consumer state can not be changed (de-activated)
+ * -ENOENT consumer has not subscribed to the buffer <br>
* -EINVAL invalid parameter <br>
*/
int Release(AliHLTComponentBlockData* pBlockDesc, const AliHLTComponent* pConsumer);
* which was requested by the @ref GetTargetBuffer method. The component might
* produce different types of data, for each type a segment has to be defined
* which describes the data inside the buffer.<br>
- * The @ref AliHLTComponentBlockData segment descriptor comes directly from the
- * @ref AliHLTComponent::ProcessEvent method.
+ * The @ref AliHLTComponentBlockData segment descriptor comes directly from
+ * the @ref AliHLTComponent::ProcessEvent method.
* @param pTgt the target buffer which the segments refer to
* @param arraySegments the output block descriptors of the component
* @param iSize size of the array
*/
int ResetDataBuffer();
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+
// the data description
// the data segments within this buffer
- vector<AliHLTDataSegment> fSegments;
+ vector<AliHLTDataSegment> fSegments; // see above
// the list of all consumers which are going to subscribe to the buffer
- vector<AliHLTConsumerDescriptor*> fConsumers;
+ vector<AliHLTConsumerDescriptor*> fConsumers; // see above
// the list of all consumers which are currently subscribed to the buffer
- vector<AliHLTConsumerDescriptor*> fActiveConsumers;
+ vector<AliHLTConsumerDescriptor*> fActiveConsumers; // see above
// the list of all consumers which are already released for the current event
- vector<AliHLTConsumerDescriptor*> fReleasedConsumers;
+ vector<AliHLTConsumerDescriptor*> fReleasedConsumers; // see above
// the buffer instance
- AliHLTRawBuffer* fpBuffer;
+ AliHLTRawBuffer* fpBuffer; //! transient
// flags indicating the state of the buffer
- AliHLTUInt32_t fFlags;
+ AliHLTUInt32_t fFlags; // see above
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
// global buffer handling, internal use only
/**
/**
* Mark a buffer as free.
- * After the Data Buffer has finnished using the raw buffer, it is released and
- * added to the list of available buffers.
+ * After the Data Buffer has finnished using the raw buffer, it is released
+ * and added to the list of available buffers.
* @param pBuffer the raw buffer to release
* @return >=0 if succeeded, neg. error code if failed
*/
/**
* Deletes all the raw buffers.
- * When the last Data Buffer object is destructed, all raw data buffers are relesed.
+ * When the last Data Buffer object is destructed, all raw data buffers are
+ * relesed.
*/
static int DeleteRawBuffers();
/**
* Number of instances of AliHLTDataBuffer.
- * The statice variable is incremented and decremented in the constructor/destructor.
- * All internal data structures are cleaned up when the last instance is exiting.
+ * The statice variable is incremented and decremented in the constructor/
+ * destructor. All internal data structures are cleaned up when the last
+ * instance is exiting.
*/
- static int fNofInstances;
+ static int fgNofInstances; // see above
/** global list of free raw buffers */
- static vector<AliHLTRawBuffer*> fFreeBuffers;
+ static vector<AliHLTRawBuffer*> fgFreeBuffers; // see above
/** global list of currently active raw buffers */
- static vector<AliHLTRawBuffer*> fActiveBuffers;
+ static vector<AliHLTRawBuffer*> fgActiveBuffers; // see above
/** determines the raw buffer size margin at buffer requests */
- static AliHLTUInt32_t fMargin;
+ static AliHLTUInt32_t fgMargin; // see above
/** global instance to HLT logging class for static methods */
- static AliHLTLogging fgLogging;
+ static AliHLTLogging fgLogging; // see above
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
// internal helper functions
/**
* Find the consumer descriptor for a certain component and data type in
* a list of consumers.<br>
- * <b>Note:</b> There are three lists which contain the consumers in the different states.
+ * <b>Note:</b> There are three lists which contain the consumers in the
+ * different states.
* @param pConsumer pointer to consumer component
* @param list list where to search for the consumer
*/
- AliHLTConsumerDescriptor* FindConsumer(const AliHLTComponent* pConsumer, vector<AliHLTConsumerDescriptor*> &list);
+ AliHLTConsumerDescriptor* FindConsumer(const AliHLTComponent* pConsumer,
+ vector<AliHLTConsumerDescriptor*> &list) const;
/**
* Change the state of a consumer.
- * The state of a consumer is determined by the list it is strored in, the method moves a consumer from
- * the source to the target list.
+ * The state of a consumer is determined by the list it is strored in, the
+ * method moves a consumer from the source to the target list.
* @param pDesc pointer to consumer descriptor
* @param srcList list where the consumer is currently to be found
* @param tgtList list where to move the consumer
*/
- int ChangeConsumerState(AliHLTConsumerDescriptor* pDesc, vector<AliHLTConsumerDescriptor*> &srcList, vector<AliHLTConsumerDescriptor*> &tgtList);
+ int ChangeConsumerState(AliHLTConsumerDescriptor* pDesc,
+ vector<AliHLTConsumerDescriptor*> &srcList,
+ vector<AliHLTConsumerDescriptor*> &tgtList);
/**
* Cleanup a consumer list.
AliHLTDataSink::AliHLTDataSink()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
}
AliHLTDataSink::~AliHLTDataSink()
{
+ // see header file for class documentation
}
AliHLTComponentDataType AliHLTDataSink::GetOutputDataType()
{
+ // see header file for class documentation
AliHLTComponentDataType dt =
{sizeof(AliHLTComponentDataType),
kAliHLTVoidDataTypeID,
void AliHLTDataSink::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
+ // see header file for class documentation
constBase=0;
inputMultiplier=0;
}
AliHLTComponentBlockData*& outputBlocks,
AliHLTComponentEventDoneData*& edd )
{
+ // see header file for class documentation
int iResult=0;
if (outputPtr==NULL
&& size==0
AliHLTDataSource::AliHLTDataSource()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
}
AliHLTDataSource::~AliHLTDataSource()
{
+ // see header file for class documentation
}
void AliHLTDataSource::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
+ // see header file for class documentation
list.clear(); // there are no input data types
}
AliHLTComponentBlockData*& outputBlocks,
AliHLTComponentEventDoneData*& edd )
{
+ // see header file for class documentation
int iResult=0;
if (blocks) {
// this is currently just to get rid of the warning "unused parameter"
fSpecification(~(AliHLTUInt32_t)0),
fMaxSize(0)
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
// make the lists owners of their objects in order to automatically
// de-allocate the objects
fFileNames.SetOwner();
fSpecification(0),
fMaxSize(0)
{
+ // see header file for class documentation
HLTFatal("copy constructor untested");
}
AliHLTFilePublisher& AliHLTFilePublisher::operator=(const AliHLTFilePublisher&)
{
+ // see header file for class documentation
HLTFatal("assignment operator untested");
return *this;
}
AliHLTFilePublisher::~AliHLTFilePublisher()
{
+ // see header file for class documentation
+
// file list and file name list are owner of their objects and
// delete all the objects
}
const char* AliHLTFilePublisher::GetComponentID()
{
+ // see header file for class documentation
return "FilePublisher";
}
AliHLTComponentDataType AliHLTFilePublisher::GetOutputDataType()
{
+ // see header file for class documentation
AliHLTComponentDataType dt =
{sizeof(AliHLTComponentDataType),
kAliHLTVoidDataTypeID,
void AliHLTFilePublisher::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
+ // see header file for class documentation
constBase=fMaxSize;
inputMultiplier=1.0;
}
AliHLTComponent* AliHLTFilePublisher::Spawn()
{
+ // see header file for class documentation
return new AliHLTFilePublisher;
}
int AliHLTFilePublisher::DoInit( int argc, const char** argv )
{
+ // see header file for class documentation
+
//HLTDebug("%d %s", argc, argv[0]);
int iResult=0;
TString argument="";
int AliHLTFilePublisher::ScanArgument(int argc, const char** argv)
{
+ // see header file for class documentation
+
// there are no other arguments than the standard ones
return -EINVAL;
}
int AliHLTFilePublisher::OpenFiles()
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk=fFileNames.FirstLink();
while (lnk && iResult>=0) {
int AliHLTFilePublisher::DoDeinit()
{
+ // see header file for class documentation
int iResult=0;
fFileNames.Clear();
fFiles.Clear();
virtual int ScanArgument(int argc, const char** argv);
private:
- TList fFileNames;
- TList fFiles;
- TObjLink* fpCurrent; //! transient value
- AliHLTComponentDataType fDataType;
- AliHLTUInt32_t fSpecification;
- Int_t fMaxSize;
+ /** list of file names */
+ TList fFileNames; // see above
+ /** list of opened files */
+ TList fFiles; // see above
+ /** current positions in the file list */
+ TObjLink* fpCurrent; //! transient
+ /** data type */
+ AliHLTComponentDataType fDataType; // see above
+ /** data specification */
+ AliHLTUInt32_t fSpecification; // see above
+ /** the maximum buffer size i.e. size of the biggest file */
+ Int_t fMaxSize; // see above
ClassDef(AliHLTFilePublisher, 0)
};
fCurrentFileName(""),
fMode(0)
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
}
AliHLTFileWriter::AliHLTFileWriter(const AliHLTFileWriter&)
fCurrentFileName(""),
fMode(0)
{
+ // see header file for class documentation
HLTFatal("copy constructor untested");
}
AliHLTFileWriter& AliHLTFileWriter::operator=(const AliHLTFileWriter&)
{
+ // see header file for class documentation
HLTFatal("assignment operator untested");
return *this;
}
AliHLTFileWriter::~AliHLTFileWriter()
{
+ // see header file for class documentation
+
// file list and file name list are owner of their objects and
// delete all the objects
}
const char* AliHLTFileWriter::GetComponentID()
{
+ // see header file for class documentation
return "FileWriter";
}
void AliHLTFileWriter::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
+ // see header file for class documentation
list.clear();
list.push_back(kAliHLTAnyDataType);
}
AliHLTComponent* AliHLTFileWriter::Spawn()
{
+ // see header file for class documentation
return new AliHLTFileWriter;
}
int AliHLTFileWriter::DoInit( int argc, const char** argv )
{
+ // see header file for class documentation
int iResult=0;
TString argument="";
int bMissingParam=0;
int AliHLTFileWriter::InitWriter()
{
+ // see header file for class documentation
return 0; // note: this doesn't mean 'error'
}
int AliHLTFileWriter::ScanArgument(int argc, const char** argv)
{
+ // see header file for class documentation
+
// there are no other arguments than the standard ones
return -EINVAL;
}
int AliHLTFileWriter::DoDeinit()
{
- HLTDebug("");
+ // see header file for class documentation
int iResult=CloseWriter();
ClearMode(kEnumerate);
return iResult;
int AliHLTFileWriter::CloseWriter()
{
+ // see header file for class documentation
return 0; // note: this doesn't mean 'error'
}
const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData )
{
+ // see header file for class documentation
int iResult=0;
if (CheckMode(kConcatenateEvents)==0) {
// reset the current file name in order to open a new file
int AliHLTFileWriter::BuildFileName(const AliHLTEventID_t eventID, const int blockID, const AliHLTComponentDataType& dataType, TString& filename)
{
+ // see header file for class documentation
int iResult=0;
//HLTDebug("build file name for event %d block %d", eventID, blockID);
filename="";
int AliHLTFileWriter::SetMode(Short_t mode)
{
+ // see header file for class documentation
fMode|=mode;
//HLTDebug("mode set to 0x%x", fMode);
return fMode;
int AliHLTFileWriter::ClearMode(Short_t mode)
{
+ // see header file for class documentation
fMode&=~mode;
//HLTDebug("mode set to 0x%x", fMode);
return fMode;
int AliHLTFileWriter::CheckMode(Short_t mode)
{
+ // see header file for class documentation
+
//HLTDebug("check mode 0x%x for flag 0x%x: %d", fMode, mode, (fMode&mode)!=0);
return (fMode&mode)!=0;
}
private:
/** the basename of the output file */
- TString fBaseName;
+ TString fBaseName; // see above
/** the extension of the output file */
- TString fExtension;
+ TString fExtension; // see above
/** target directory */
- TString fDirectory;
+ TString fDirectory; // see above
/** enumeration format string */
- TString fCurrentFileName;
+ TString fCurrentFileName; // see above
/** mode specifier, see @ref TWriterMode */
- Short_t fMode;
+ Short_t fMode; // see above
ClassDef(AliHLTFileWriter, 1)
};
#define HLTFatal( ... ) LoggingVarargs(kHLTLogFatal, this->Class_Name() , __func__ , __VA_ARGS__ )
// helper macro to set the keyword
-#define HLTLogKeyword(a) AliHLTKeyword __hltlog_tmpkey__LINE__(this, a)
+#define HLTLogKeyword(a) AliHLTKeyword hltlogTmpkey__LINE__(this, a)
#define HLT_DEFAULT_LOG_KEYWORD "no key"
AliHLTProcessor::AliHLTProcessor()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
}
AliHLTProcessor::~AliHLTProcessor()
{
+ // see header file for class documentation
}
int AliHLTProcessor::Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv )
{
+ // see header file for class documentation
int iResult=0;
iResult=AliHLTComponent::Init(environ, environ_param, argc, argv);
return iResult;
int AliHLTProcessor::Deinit()
{
+ // see header file for class documentation
int iResult=0;
iResult=AliHLTComponent::Deinit();
return iResult;
AliHLTComponentBlockData*& outputBlocks,
AliHLTComponentEventDoneData*& edd )
{
+ // see header file for class documentation
int iResult=0;
vector<AliHLTComponentBlockData> blockData;
iResult=DoEvent(evtData, blocks, trigData, outputPtr, size, blockData);
fpConfigurationHandler(new AliHLTConfigurationHandler()),
fTaskList()
{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
if (fpComponentHandler) {
AliHLTComponentEnvironment env;
memset(&env, 0, sizeof(AliHLTComponentEnvironment));
fpConfigurationHandler(NULL),
fTaskList()
{
+ // see header file for class documentation
HLTFatal("copy constructor untested");
}
AliHLTSystem& AliHLTSystem::operator=(const AliHLTSystem&)
{
+ // see header file for class documentation
HLTFatal("assignment operator untested");
return *this;
}
AliHLTSystem::~AliHLTSystem()
{
+ // see header file for class documentation
CleanTaskList();
AliHLTConfiguration::GlobalDeinit();
if (fpConfigurationHandler) {
int AliHLTSystem::AddConfiguration(AliHLTConfiguration* pConf)
{
+ // see header file for class documentation
int iResult=0;
if (pConf) {
} else {
int AliHLTSystem::InsertConfiguration(AliHLTConfiguration* pConf, AliHLTConfiguration* pPrec)
{
+ // see header file for class documentation
int iResult=0;
if (pConf) {
if (pPrec) {
int AliHLTSystem::DeleteConfiguration(AliHLTConfiguration* pConf)
{
+ // see header file for class documentation
int iResult=0;
if (pConf) {
} else {
int AliHLTSystem::BuildTaskList(AliHLTConfiguration* pConf)
{
+ // see header file for class documentation
int iResult=0;
if (pConf) {
AliHLTTask* pTask=NULL;
int AliHLTSystem::CleanTaskList()
{
+ // see header file for class documentation
int iResult=0;
TObjLink* lnk=NULL;
while ((lnk=fTaskList.FirstLink())!=NULL) {
int AliHLTSystem::InsertTask(AliHLTTask* pTask)
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk = NULL;
if ((iResult=pTask->CheckDependencies())>0)
AliHLTTask* AliHLTSystem::FindTask(const char* id)
{
+ // see header file for class documentation
AliHLTTask* pTask=NULL;
if (id) {
pTask=(AliHLTTask*)fTaskList.FindObject(id);
void AliHLTSystem::PrintTaskList()
{
+ // see header file for class documentation
HLTLogKeyword("task list");
TObjLink *lnk = NULL;
HLTMessage("Task List");
int AliHLTSystem::Run(Int_t iNofEvents)
{
+ // see header file for class documentation
int iResult=0;
if ((iResult=InitTasks())>=0) {
if ((iResult=StartTasks())>=0) {
int AliHLTSystem::InitTasks()
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk=fTaskList.FirstLink();
while (lnk && iResult>=0) {
int AliHLTSystem::StartTasks()
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk=fTaskList.FirstLink();
while (lnk && iResult>=0) {
int AliHLTSystem::ProcessTasks(Int_t eventNo)
{
+ // see header file for class documentation
int iResult=0;
HLTDebug("processing event no %d", eventNo);
TObjLink *lnk=fTaskList.FirstLink();
int AliHLTSystem::StopTasks()
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk=fTaskList.FirstLink();
while (lnk && iResult>=0) {
int AliHLTSystem::DeinitTasks()
{
+ // see header file for class documentation
int iResult=0;
TObjLink *lnk=fTaskList.FirstLink();
while (lnk && iResult>=0) {
void* AliHLTSystem::AllocMemory( void* param, unsigned long size )
{
+ // see header file for class documentation
return (void*)new char[size];
}
/**
* Pointer to an instance of @ref AliHLTComponentHandler.
*/
- AliHLTComponentHandler* fpComponentHandler;
+ AliHLTComponentHandler* fpComponentHandler; //! transient
/**
* Pointer to an instance of @ref AliHLTConfigurationHandler.
*/
- AliHLTConfigurationHandler* fpConfigurationHandler;
+ AliHLTConfigurationHandler* fpConfigurationHandler; //! transient
/**
* Add a configuration to the end of the list.
int AddConfiguration(AliHLTConfiguration* pConf);
/**
- * Insert a configuration to the end of the list after the specified configuration.
+ * Insert a configuration to the end of the list after the specified
+ * configuration.
* @param pConf pointer to configuration to insert
* @param pPrec pointer to configuration to insert the new one after
*/
/**
* Insert a task to the task list.
* The method first checks whether all dependencies are resolved (i.e. exist
- * already in the task list). During this iteration the cross links between the
- * tasks are set as well. If all dependencies are resolved, the task is added
- * at the end of the list.
+ * already in the task list). During this iteration the cross links between
+ * the tasks are set as well. If all dependencies are resolved, the task is
+ * added at the end of the list.
* @param pTask pointer to task to add
*/
int InsertTask(AliHLTTask* pTask);
/**
* Start task list.
- * The @ref AliHLTTask::StartRun method is called for each task, the components
- * will be prepared for event processing.
+ * The @ref AliHLTTask::StartRun method is called for each task, the
+ * components will be prepared for event processing.
* @return neg error code if failed
*/
int StartTasks();
static void* AllocMemory( void* param, unsigned long size );
protected:
- int ProcessTask();
- int StartEvent();
- int ProcessEvent();
- int StopEvent();
private:
/* TList fConfList; */
/* int fbListChanged; */
- TList fTaskList;
+ TList fTaskList; // see above
private:
ClassDef(AliHLTSystem, 1);
private:
/** the configuration descriptor (external pointer) */
- AliHLTConfiguration* fpConfiguration;
- /** the component described by this task (created and deleted by the task object) */
- AliHLTComponent* fpComponent;
+ AliHLTConfiguration* fpConfiguration; //! transient
+ /** the component described by this task (created and deleted internally) */
+ AliHLTComponent* fpComponent; //! transient
/** the data buffer for the component processing */
- AliHLTDataBuffer* fpDataBuffer;
+ AliHLTDataBuffer* fpDataBuffer; //! transient
/** the list of targets (tasks which depend upon the current one) */
- TList fListTargets;
+ TList fListTargets; // see above
/** the list of sources (tasks upon which the current one depends) */
- TList fListDependencies;
+ TList fListDependencies; // see above
/**
* block data array to be passed as argument to the
* @ref AliHLTComponent::ProcessEvent method.
* Filled through subscription to source tasks (@ref Subscribe).
*/
- AliHLTComponentBlockData* fpBlockDataArray;
+ AliHLTComponentBlockData* fpBlockDataArray; //! transient
/** size of the block data array */
- int fBlockDataArraySize;
+ int fBlockDataArraySize; // see above
ClassDef(AliHLTTask, 1);
};