ROOT logo
AliRoot » HLT » BASE » AliHLTComponentHandler

class AliHLTComponentHandler: public AliHLTLogging

This file is property of and copyright by the
ALICE Experiment at CERN, All rights reserved.

Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>
Timm Steinbeck <timm@kip.uni-heidelberg.de>
for The ALICE HLT Project.

Permission to use, copy, modify and distribute this software and its
documentation strictly for non-commercial purposes is hereby granted
without fee, provided that the above copyright notice appears in all
copies and that both the copyright notice and this permission notice
appear in the supporting documentation. The authors make no claims
about the suitability of this software for any purpose. It is
provided "as is" without express or implied warranty.

Function Members (Methods)

public:
AliHLTComponentHandler()
AliHLTComponentHandler(AliHLTAnalysisEnvironment* pEnv)
virtual~AliHLTComponentHandler()
intAddComponent(AliHLTComponent* pSample)
intAddStandardComponents()
intAnnounceVersion()
static const char*AliHLTLogging::BuildLogString(const char* format, va_list& ap, bool bAppend = false)
intAliHLTLogging::CheckFilter(AliHLTComponentLogSeverity severity) const
intAliHLTLogging::CheckGroup(const char* originClass) const
static TClass*Class()
intCreateComponent(const char* componentID, AliHLTComponent*& component)
intCreateComponent(const char* componentID, void* pEnvParam, AliHLTComponent*& component)
intCreateComponent(const char* componentID, void* pEnvParam, int argc, const char** argv, AliHLTComponent*& component)
static AliHLTComponentHandler*CreateHandler()
intDeleteOwnedComponents()
intDeregisterComponent(const char* componentID)
intDestroy()
intFindComponentIndex(const char* componentID)
AliHLTfctVoidFindSymbol(const char* library, const char* symbol)
const AliHLTAnalysisEnvironment*GetEnvironment() const
static AliHLTComponentLogSeverityAliHLTLogging::GetGlobalLoggingLevel()
const char*AliHLTLogging::GetKeyword() const
static AliHLTComponentLogSeverityAliHLTLogging::GetLocalLoggingDefault()
AliHLTComponentLogSeverityAliHLTLogging::GetLocalLoggingLevel()
virtual void*AliHLTLogging::GetParameter() const
intHasOutputData(const char* componentID)
static intAliHLTLogging::Init(AliHLTfctLogging pFun)
static intAliHLTLogging::InitAliLogFunc(AliHLTComponentHandler* pHandler)
static intAliHLTLogging::InitAliLogTrap(AliHLTComponentHandler* pHandler)
virtual TClass*IsA() const
voidList()
intLoadLibrary(const char* libraryPath, int bActivateAgents = 1)
intAliHLTLogging::Logging(AliHLTComponentLogSeverity severity, const char* origin, const char* keyword, const char* message)
virtual intAliHLTLogging::LoggingVarargs(AliHLTComponentLogSeverity severity, const char* originClass, const char* originFunc, const char* file, int line) const
static intAliHLTLogging::Message(void* param, AliHLTComponentLogSeverity severity, const char* origin, const char* keyword, const char* message)
intRegisterComponent(AliHLTComponent* pSample)
intRegisterScheduledComponents()
intScheduleRegister(AliHLTComponent* pSample)
intAliHLTLogging::SendMessage(AliHLTComponentLogSeverity severity, const char* originClass, const char* originFunc, const char* file, int line, const char* message) const
static intAliHLTLogging::SetBlackList(const char* classnames)
voidAliHLTLogging::SetDefaultKeyword(const char* keyword)
voidSetEnvironment(AliHLTAnalysisEnvironment* pEnv)
static voidAliHLTLogging::SetGlobalLoggingLevel(AliHLTComponentLogSeverity level)
const char*AliHLTLogging::SetKeyword(const char* keyword)
AliHLTComponentHandler::TLibraryModeSetLibraryMode(AliHLTComponentHandler::TLibraryMode mode)
static voidAliHLTLogging::SetLocalLoggingDefault(AliHLTComponentLogSeverity level)
virtual voidAliHLTLogging::SetLocalLoggingLevel(AliHLTComponentLogSeverity level)
static const char*AliHLTLogging::SetLogString(const void* p, const char* pfmt, const char* format)
intSetRunDescription(const AliHLTRunDesc* desc, const char* runType)
static intAliHLTLogging::SetWhiteList(const char* classnames)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
voidAliHLTLogging::SwitchAliLog(int sw)
intUnloadLibrary(const char* libraryPath)
private:
AliHLTComponentHandler(const AliHLTComponentHandler&)
intActivateAgents(const char* library = 0, const char* blackList = 0)
intDeactivateAgents() const
AliHLTComponent*FindComponent(const char* componentID)
AliHLTComponentHandler::AliHLTLibHandle*FindLibrary(const char* library)
intInsertComponent(AliHLTComponent* pSample)
AliHLTComponentHandler&operator=(const AliHLTComponentHandler&)
intUnloadLibraries()
intUnloadLibrary(AliHLTComponentHandler::AliHLTLibHandle& handle)

Data Members

public:
enum TLibraryMode { kDynamic
kStatic
};
public:
static ostringstreamAliHLTLogging::fgLogstr! transient
protected:
static void*AliHLTLogging::fgAliLoggingFunc! transient
private:
vector<AliHLTComponent*>fComponentListsee above
AliHLTAnalysisEnvironmentfEnvironmentsee above
vector<AliHLTLibHandle>fLibraryListsee above
AliHLTComponentHandler::TLibraryModefLibraryModesee above
vector<AliHLTComponent*>fOwnedComponentssee above
AliHLTRunDescfRunDesc!transient
char*fRunType!transient
vector<AliHLTComponent*>fScheduleListsee above
static intfgNofInstances!transient
static AliHLTComponentHandler*fgpInstance!transient

Class Charts

Inheritance Chart:
AliHLTLogging
AliHLTComponentHandler

Function documentation

AliHLTComponentHandler()
 see header file for class documentation
 or
 refer to README to build package
 or
 visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
AliHLTComponentHandler(AliHLTAnalysisEnvironment* pEnv)
 constructor with environment
~AliHLTComponentHandler()
 destructor
AliHLTComponentHandler* CreateHandler()
 create global instance of handler
int Destroy()
 destroy/delete 'this', checks if 'this' pointer is the global instance,
 reduce the instance counter and delete if there are no instances left
 IMPORTANT: the object must be considered self-destroyed after the function
int AnnounceVersion()
 printout for version
Int_t AddComponent(AliHLTComponent* pSample)
 add and register a component, handler becomes owner
Int_t RegisterComponent(AliHLTComponent* pSample)
 register a component, handler creates clone of sample
int DeregisterComponent(const char* componentID)
 deregister component
Int_t ScheduleRegister(AliHLTComponent* pSample)
 schedule registration
int CreateComponent(const char* componentID, void* pEnvParam, int argc, const char** argv, AliHLTComponent*& component)
 create a component
int CreateComponent(const char* componentID, AliHLTComponent*& component)
 create a component
Int_t FindComponentIndex(const char* componentID)
 find component by ID in the list and return index
AliHLTComponent* FindComponent(const char* componentID)
 find component sample by ID
Int_t InsertComponent(AliHLTComponent* pSample)
 insert a component sample in the list
void List()
 print list content
 TODO: implement Print()
int HasOutputData(const char* componentID)
 check if a component has output data
void SetEnvironment(AliHLTAnalysisEnvironment* pEnv)
 set global environment
int LoadLibrary(const char* libraryPath, int bActivateAgents = 1)
 load a library
int UnloadLibrary(const char* libraryPath)
 unload a library
int UnloadLibrary(AliHLTComponentHandler::AliHLTLibHandle& handle)
 unload a library
int UnloadLibraries()
 unload all libraries
AliHLTfctVoid FindSymbol(const char* library, const char* symbol)
 find symbol in library
int AddStandardComponents()
 TODO: not quite clear what was the meaning behind this function
int RegisterScheduledComponents()
 register all scheduled components
int ActivateAgents(const char* library = 0, const char* blackList = 0)
 activate module agents
int DeactivateAgents() const
int DeleteOwnedComponents()
 delete all component samples owned by the handler
int SetRunDescription(const AliHLTRunDesc* desc, const char* runType)
 set global run description
AliHLTComponentHandler()
 standard constructor 
const AliHLTAnalysisEnvironment* GetEnvironment() const
   * Get the current environment.

{return &fEnvironment;}
TLibraryMode SetLibraryMode(AliHLTComponentHandler::TLibraryMode mode)
   * Set library mode.
   * The mode effects all loaded libraries until another mode is set.
   * @param mode             persistent library or not
   * @return previous mode

int CreateComponent(const char* componentID, void* pEnvParam, int argc, const char** argv, AliHLTComponent*& component)
   * Find the ID of a component with the given output data.
   * @param dtype     data type descriptor
   * @param prevType  can be used to iterate if there are multiple components
   *                  with the same output data type.
   * @return component id

const char* FindComponentType( AliHLTComponentDataType dtype,
                               const char* prevType = NULL )
  { return NULL;}

   * Create a component of the given name (ID).
   * The method tries to find a registerd component of id \em componentID and
   * calls the \em Spawn method of the template component. After successful
   * creation of a new object, the Init method is called in order to initialize
   * the environment and the component arguments. <br>
   * The environment is the same for all components, but each component can
   * have an additional private parameter \em pEnvParam.<br>
   * The component arguments consist of an array of strings and the array size
   * in the usual manner of the main() function.
   * @param componentID  ID of the component to create
   * @param pEnvParam    environment parameter for the component
   * @param argc         number of arguments in argv
   * @param argv         argument array like in main()
   * @param component    reference to receive the create component instance
   * @return component pointer in component, neg. error code if failed

AliHLTComponentHandler& operator=(const AliHLTComponentHandler& )
 assignment operator prohibited 
AliHLTLibHandle* FindLibrary(const char* library)
   * Find a specific library among the loaded libraries.
   * @param library     library name/path
   * @return pointer to AliHLTLibHandle