LCOV - code coverage report
Current view: top level - HLT/BASE/util - AliHLTOUTPublisherComponent.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          Line data    Source code
       1             : //-*- Mode: C++ -*-
       2             : // $Id$
       3             : 
       4             : #ifndef ALIHLTOUTPUBLISHERCOMPONENT_H
       5             : #define ALIHLTOUTPUBLISHERCOMPONENT_H
       6             : //* This file is property of and copyright by the ALICE HLT Project        * 
       7             : //* ALICE Experiment at CERN, All rights reserved.                         *
       8             : //* See cxx source for full Copyright notice                               *
       9             : 
      10             : /** @file   AliHLTOUTPublisherComponent.h
      11             :     @author Matthias Richter
      12             :     @date   2008-06-11
      13             :     @brief  A data publisher for data block out of the HLTOUT data
      14             : */
      15             : 
      16             : #include "AliHLTOfflineDataSource.h"
      17             : 
      18             : /**
      19             :  * @class AliHLTOUTPublisherComponent
      20             :  * A data publisher component for data blocks out of the HLTOUT data.
      21             :  * All data blocks forwarded to the HLTOUT (either real or simulated),
      22             :  * are encoded in HOMER format and stored in the HLT data links, or
      23             :  * eventually the HLT digit file in case of simulation.
      24             :  *
      25             :  * This component publishes data blocks out of the HLTOUT data. To the
      26             :  * subscribing components the data blocks seem to come directly from
      27             :  * the producing component in the HLT analysis chain. The HLTOUT is just
      28             :  * a transparent transport layer. Filter rules by data type and
      29             :  * specification can be applied.
      30             :  * 
      31             :  * <h2>General properties:</h2>
      32             :  *
      33             :  * Component ID: \b AliHLTOUTPublisher                                  <br>
      34             :  * Library: \b libAliHLTUtil.so                                         <br>
      35             :  * Input Data Types: none                                               <br>
      36             :  * Output Data Types: according to parameters and content of the HLTOUT <br>
      37             :  *
      38             :  * <h2>Mandatory arguments:</h2>
      39             :  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
      40             :  *      
      41             :  * <h2>Optional arguments:</h2>
      42             :  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
      43             :  * \li -datatype     <i> id origin      </i>                            <br>
      44             :  *      e.g. <tt> -datatype 'ESD_TREE' 'TPC ' </tt>                     <br>
      45             :  *      \b Note: due to the 4-character data origin it might be necessary to
      46             :  *      append a blank to the detectorname, e.g. <tt>TPC -> 'TPC '</tt>
      47             :  *
      48             :  * \li -origin  <i> origin  </i>                                        <br>
      49             :  *      e.g. -origin 'TPC ', \b Note:  the filter rule has type id 'ANY'
      50             :  *
      51             :  * \li -typeid  <i> id      </i>                                        <br>
      52             :  *      e.g. -typeid ESD_TREE, \b Note: the filter rule has origin 'ANY'
      53             :  *
      54             :  * \li -dataspec     <i> specification </i>                             <br>
      55             :  *      data specification treated as decimal number or hex number if
      56             :  *      prepended by '0x'
      57             :  *
      58             :  * \li -verbose                                                         <br>
      59             :  *      print out some more info messages, mainly for the sake of tutorials
      60             :  *
      61             :  * <h2>Configuration:</h2>
      62             :  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
      63             :  * Configuration by component arguments.
      64             :  *
      65             :  * <h2>Default CDB entries:</h2>
      66             :  * The component loads no CDB entries.
      67             :  *
      68             :  * <h2>Performance:</h2>
      69             :  * The component does not process any event data.
      70             :  *
      71             :  * <h2>Memory consumption:</h2>
      72             :  * The component does not process any event data.
      73             :  *
      74             :  * <h2>Output size:</h2>
      75             :  * According to the available and selected data. The component is an
      76             :  * AliHLTDataSource and inteded to be used in the AliHLTSystem framework
      77             :  * only. The component implements the standard AliHLTSystem adaptive
      78             :  * buffer allocation. 
      79             :  *
      80             :  * By default, all blocks will be published. By means of the \em -datatype,
      81             :  * \em -origin, and \em -typeid arguments, the blocks can be selected. A list
      82             :  * of filter rules can be built up by multiple usage of the arguments. Each
      83             :  * time a new filter rule is added.
      84             :  *
      85             :  * No filtering by the data specification is applied unless then \em
      86             :  * -specification argument is used. The specification applies to to the
      87             :  * current filter rule, regardless of the sequence of -datatype/-specification
      88             :  * arguments.
      89             :  *
      90             :  * @ingroup alihlt_util_components
      91             :  */
      92             : class AliHLTOUTPublisherComponent : public AliHLTOfflineDataSource {
      93             :  public:
      94             :   /** standard constructor */
      95             :   AliHLTOUTPublisherComponent();
      96             :   /** destructor */
      97             :   virtual ~AliHLTOUTPublisherComponent();
      98             : 
      99             :   const char* GetComponentID();
     100             :   AliHLTComponentDataType GetOutputDataType();
     101             :   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
     102             :   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
     103             :   virtual AliHLTComponent* Spawn();
     104             : 
     105             :  protected:
     106             :   int DoInit( int argc, const char** argv );
     107             :   int DoDeinit();
     108             : 
     109             :   /**
     110             :    * Data source method.
     111             :    * @param [in] evtData       event data structure
     112             :    * @param [in] trigData         trigger data structure
     113             :    * @param [in] outputPtr        pointer to target buffer
     114             :    * @param [in,out] size         <i>input</i>: size of target buffer
     115             :    *                      <i>output</i>:size of produced data
     116             :    * @param [in] outputBlocks  list to receive output block descriptors
     117             :    * @return neg. error code if failed
     118             :    */
     119             :   int GetEvent( const AliHLTComponentEventData& evtData,
     120             :                 AliHLTComponentTriggerData& trigData,
     121             :                 AliHLTUInt8_t* outputPtr, 
     122             :                 AliHLTUInt32_t& size,
     123             :                 AliHLTComponentBlockDataList& outputBlocks );
     124             : 
     125             :   using AliHLTOfflineDataSource::GetEvent;
     126             : 
     127             :  protected:
     128             : 
     129             :  private:
     130             :   /** copy constructor prohibited */
     131             :   AliHLTOUTPublisherComponent(const AliHLTOUTPublisherComponent&);
     132             :   /** assignment operator prohibited */
     133             :   AliHLTOUTPublisherComponent& operator=(const AliHLTOUTPublisherComponent&);
     134             : 
     135             :   /** filtering rules, only the data type and specification members are use */
     136             :   AliHLTComponentBlockDataList fFilterRules;                       //! transient
     137             : 
     138             :   /** maximum output size */
     139             :   int fMaxSize; //!
     140             : 
     141           8 :   ClassDef(AliHLTOUTPublisherComponent, 0);
     142             : };
     143             : 
     144             : #endif

Generated by: LCOV version 1.11