//-*- Mode: C++ -*-
// $Id$
#ifndef ALIHLTSAMPLECOMPONENT1_H
#define ALIHLTSAMPLECOMPONENT1_H
//* This file is property of and copyright by the *
//* ALICE Experiment at CERN, All rights reserved. *
//* See cxx source for full Copyright notice */
// @file AliHLTSampleComponent1.h
// @author Matthias Richter, Timm Steinbeck
// @date
// @brief A sample processing component for the HLT.
//
#include "AliHLTProcessor.h"
/**
* @class AliHLTSampleComponent1
* An HLT sample component.
* This component does not any data processing at all. It just
* illustrates the existence of several components in ine library and
* allows to set up a very simple chain with different components.
* Component illustrates the basic functionality and component initialization.
* See @ref sample-component1.C
*
*
General properties:
*
* Component ID: \b Sample-component1
* Library: \b libAliHLTSample.so
* Input Data Types: @ref kAliHLTAnyDataType
* Output Data Types: none
*
* Mandatory arguments:
*
* \li -mandatory1 teststring
* an argument with one parameter
* \li -mandatory2
* an argument without parameters
*
* Optional configuration arguments:
*
* \li -config1 teststring
* a configuration argument with one parameter
* \li -config2
* a configuration argument without parameters
*
* Default CDB entries:
* The component has just one default CDB entry in
* HLT/ConfigSample/SampleComponent1.
* It does not load any configuration from the global ConfigHLT
* folder.
* \li -TObjString object holding a string with the configuration parameters
* explained above
*
* Performance:
* The component does not any event data processing.
*
* Memory consumption:
* The component does not any event data processing.
*
* Output size:
* The component has no output data.
*
* Furthermore it illustrates the component argument scanning and the
* component configuration. There are actually two methods to init/
* configure a component:
* - via command line arguments. The arguments are specified in the HLT
* chain configuration and are passed to the component during
* initialization in @ref DoInit()
* - from a CDB entry. The CDB can contain configuration objects for a
* component and the component can implement the handling
*
* The component implements the @ref alihltcomponent-low-level-interface.
* for data processing.
*
* Using the latter case, a component can also be reconfigured. Special
* events are propageted through the chain in order to trigger the re-
* configuration. The component needs to implement the function
* @ref Reconfigure(). The simplest version of a configuration object is
* a string object (TObjString) containing configuration arguments.
*
* @ingroup alihlt_tutorial
*/
class AliHLTSampleComponent1 : public AliHLTProcessor {
public:
AliHLTSampleComponent1();
virtual ~AliHLTSampleComponent1();
// AliHLTComponent interface functions
const char* GetComponentID();
void GetInputDataTypes( AliHLTComponentDataTypeList& list);
AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
void GetOCDBObjectDescription( TMap* const targetArray);
// Spawn function, return new class instance
AliHLTComponent* Spawn();
protected:
// AliHLTComponent interface functions
int DoInit( int argc, const char** argv );
int DoDeinit();
int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, AliHLTComponentBlockDataList& outputBlocks );
int ScanConfigurationArgument(int argc, const char** argv);
int Reconfigure(const char* cdbEntry, const char* chainId);
int ReadPreprocessorValues(const char* modules);
using AliHLTProcessor::DoEvent;
private:
int fArgument1; //!transient
int fArgument2; //!transient
// version no 0 -> no streamer for member variables
ClassDef(AliHLTSampleComponent1, 0)
};
#endif