// -*- Mode: C++ -*-
// $Id$
#ifndef ALIHLTOBJECTCOMPRESSIONCOMPONENT_H
#define ALIHLTOBJECTCOMPRESSIONCOMPONENT_H
//* This file is property of and copyright by the ALICE HLT Project *
//* ALICE Experiment at CERN, All rights reserved. *
//* See cxx source for full Copyright notice *
/// @file AliHLTObjectCompressionComponent.h
/// @author Matthias Richter
/// @date 2010-11-09
/// @brief
///
#include "AliHLTProcessor.h"
/**
* @class AliHLTObjectCompressionComponent
* Component for compression of TObjects with a different compression level.
* The level is adjusted by the common AliHLTComponent @ref alihlt_component_arguments.
*
*
General properties:
*
* Component ID: \b TObjectCompressor
* Library: \b libAliHLTUtil.so
* Input Data Types: kAliHLTAnyDataType
* Output Data Types: according to input blocks
*
* Mandatory arguments:
*
*
* Optional arguments:
*
* \li -object-compression=level
*
*
* Configuration:
*
* Configuration by component arguments.
*
* Default CDB entries:
* The component loads no CDB entries.
*
* Performance:
* Low profile: input objects are unpacked and binary copied, no streaming
* of obejcts.
*
* Memory consnumption:
* The component allocates memory of the maximum size for every input
* object.
*
* Output size:
*
* @ingroup alihlt_util_components
*/
class AliHLTObjectCompressionComponent : public AliHLTProcessor
{
public:
/// standard constructor
AliHLTObjectCompressionComponent();
/// destructor
virtual ~AliHLTObjectCompressionComponent();
/// inherited from AliHLTComponent, get component id
virtual const char* GetComponentID() {return "TObjectCompressor";};
/// inherited from AliHLTComponent, get the input data type
void GetInputDataTypes( AliHLTComponentDataTypeList& );
/// inherited from AliHLTComponent, get the output data type
AliHLTComponentDataType GetOutputDataType();
/// inherited from AliHLTComponent, get the output data size estimator
void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
/// inherited from AliHLTComponent, create a component
virtual AliHLTComponent* Spawn() {return new AliHLTObjectCompressionComponent;}
protected:
/// inherited from AliHLTProcessor, data processing
int DoEvent( const AliHLTComponentEventData& evtData,
AliHLTComponentTriggerData& trigData );
using AliHLTProcessor::DoEvent;
/// inherited from AliHLTComponent, component initialisation
int DoInit( int argc, const char** argv );
/// inherited from AliHLTComponent, scan argument
int ScanConfigurationArgument(int argc, const char** argv);
/// inherited from AliHLTComponent, component cleanup.
int DoDeinit();
private:
/// copy constructor prohibited
AliHLTObjectCompressionComponent(const AliHLTObjectCompressionComponent&);
/// assignment operator prohibited
AliHLTObjectCompressionComponent& operator=(const AliHLTObjectCompressionComponent&);
ClassDef(AliHLTObjectCompressionComponent, 0)
};
#endif