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

          Line data    Source code
       1             : // -*- Mode: C++ -*-
       2             : // $Id$
       3             : 
       4             : #ifndef ALIHLTROOTFILEPUBLISHERCOMPONENT_H
       5             : #define ALIHLTROOTFILEPUBLISHERCOMPONENT_H
       6             : //* This file is property of and copyright by the                          * 
       7             : //* ALICE Experiment at CERN, All rights reserved.                         *
       8             : //* See cxx source for full Copyright notice                               *
       9             : 
      10             : /// @file   AliHLTRootFilePublisherComponent.h
      11             : /// @author Matthias Richter, Jochen Thaeder
      12             : /// @date   
      13             : /// @brief  component for publishing of Root objects from a root file.
      14             : /// @note   The class is used in Offline (AliRoot) context
      15             : 
      16             : #include "AliHLTFilePublisher.h"
      17             : #include <TList.h>
      18             : 
      19             : /**
      20             :  * @class AliHLTRootFilePublisherComponent
      21             :  * An HLT data source component which publishes root objects from one 
      22             :  * or a sequence of root files. Be aware, one root file can contain 
      23             :  * several root objects. Either all objects or just one object can be selected.<br>
      24             :  *
      25             :  * <h2>General properties:</h2>
      26             :  *
      27             :  * Component ID: \b ROOTFilePublisher <br>
      28             :  * Library: \b libAliHLTUtil.so     <br>
      29             :  * Input Data Types: none <br>
      30             :  * Output Data Types: according to arguments <br>
      31             :  *
      32             :  * <h2>Mandatory arguments:</h2>
      33             :  * @see AliHLTFilePublisher for mandatory defaultarguments
      34             :  *
      35             :  * <h2>Optional arguments:</h2>
      36             :  * @see AliHLTFilePublisher for optional default arguments
      37             :  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
      38             :  * \li -objectname   <i> objectname    </i>
      39             :  *      Name of the object in the root file to be fetched. This is set for 
      40             :  *      all events/files. If not given, all objects are fetched.
      41             :  *      
      42             :  * <h2>Configuration:</h2>
      43             :  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
      44             :  * Configuration by component arguments.
      45             :  *
      46             :  * <h2>Default CDB entries:</h2>
      47             :  * The component loads no CDB entries.
      48             :  *
      49             :  * <h2>Performance:</h2>
      50             :  * The component does not process any event data.
      51             :  *
      52             :  * <h2>Memory consumption:</h2>
      53             :  * The component does not process any event data.
      54             :  *
      55             :  * <h2>Output size:</h2>
      56             :  * According to the available data. The component is an AliHLTDataSource
      57             :  * and inteded to be used in the AliHLTSystem framework only. The component
      58             :  * implements the standard AliHLTSystem adaptive buffer allocation. 
      59             :  *
      60             :  * The component needs at least one argument \em -datafile or \em -datafilelist.
      61             :  * Both can occur multiple times. The \em -datatype and \em -dataspec
      62             :  * parameters are valid for all files until the next occurrence of
      63             :  * \em -datatype/spec.
      64             :  * All files are published within one event, unless the \em -nexevent specifies
      65             :  * where to break into multiple events. Be aware, one root file can contain 
      66             :  * several root objects. If \em -objectname is not used to select one, all 
      67             :  * objects are all published with the same datatype and specification.
      68             :  *
      69             :  * @ingroup alihlt_util_components
      70             :  */
      71             : 
      72             : class AliHLTRootFilePublisherComponent : public AliHLTFilePublisher  {
      73             :  public:
      74             : 
      75             :   /*
      76             :    * ---------------------------------------------------------------------------------
      77             :    *                            Constructor / Destructor
      78             :    * ---------------------------------------------------------------------------------
      79             :    */
      80             :   
      81             :   /** standard constructor */
      82             :   AliHLTRootFilePublisherComponent();
      83             : 
      84             :   /** destructor */
      85             :   virtual ~AliHLTRootFilePublisherComponent();
      86             :   
      87             :   /*
      88             :    * ---------------------------------------------------------------------------------
      89             :    * Public functions to implement AliHLTComponent's interface.
      90             :    * These functions are required for the registration process
      91             :    * ---------------------------------------------------------------------------------
      92             :    */
      93             : 
      94             :   /** interface function, see @ref AliHLTComponent for description */
      95             :   const char* GetComponentID();
      96             : 
      97             :   /** interface function, see @ref AliHLTComponent for description */
      98             :   AliHLTComponent* Spawn();
      99             : 
     100             :  protected:
     101             :   /*
     102             :    * ---------------------------------------------------------------------------------
     103             :    * Protected functions to implement AliHLTComponent's interface.
     104             :    * These functions provide initialization as well as the actual processing
     105             :    * capabilities of the component. 
     106             :    * ---------------------------------------------------------------------------------
     107             :    */
     108             : 
     109             :   /**
     110             :    * Data processing method for the component.
     111             :    * The component uses the @ref alihltcomponent-high-level-interface
     112             :    * to put serialized Root object into the output stream. Despite of that it
     113             :    * implements the low-level DumpEvent method in order to allow child classes
     114             :    * to use the low-level method.
     115             :    * @param evtData       event data structure
     116             :    * @param trigData      trigger data structure
     117             :    * @param outputPtr     not used
     118             :    * @param size          not used
     119             :    * @param outputBlocks  not used
     120             :    * @return
     121             :    */
     122             :   Int_t GetEvent( const AliHLTComponentEventData& evtData,
     123             :                 AliHLTComponentTriggerData& trigData,
     124             :                 AliHLTUInt8_t* outputPtr, 
     125             :                 AliHLTUInt32_t& size,
     126             :                 vector<AliHLTComponentBlockData>& outputBlocks);
     127             : 
     128             :   using AliHLTFilePublisher::GetEvent;
     129             : 
     130             :   /**
     131             :    * Scan one argument and adjacent parameters.
     132             :    * Can be overloaded by child classes in order to add additional arguments
     133             :    * beyond the standard arguments of the file publisher. The method is called
     134             :    * whenever a non-standard argument is recognized.
     135             :    * @param argc           size of the argument array
     136             :    * @param argv           agument array for component initialization
     137             :    * @return number of processed members of the argv <br>
     138             :    *         -EINVAL unknown argument <br>
     139             :    *         -EPROTO parameter for argument missing <br>
     140             :    */
     141             :   virtual Int_t ScanArgument(Int_t argc, const char** argv);
     142             : 
     143             :  private:
     144             : 
     145             :   /*
     146             :    * ---------------------------------------------------------------------------------
     147             :    * Private functions to implement AliHLTComponent's interface.
     148             :    * These functions provide initialization as well as the actual processing
     149             :    * capabilities of the component. 
     150             :    * ---------------------------------------------------------------------------------
     151             :    */
     152             : 
     153             :   /** copy constructor prohibited */
     154             :   AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&);
     155             : 
     156             :   /** assignment operator prohibited */
     157             :   AliHLTRootFilePublisherComponent& operator=(const AliHLTRootFilePublisherComponent&);
     158             : 
     159             :   /*
     160             :    * ---------------------------------------------------------------------------------
     161             :    *                             Members - private
     162             :    * ---------------------------------------------------------------------------------
     163             :    */
     164             : 
     165             :   /** The current event */
     166             :   TObjLink *fpCurrentEvent;                  //! transient
     167             : 
     168             :   /** Name of the object which should be fetched 
     169             :    *  from the root file.
     170             :    */
     171             :   TString   fObjectName;                     //! objectname
     172             : 
     173           8 :   ClassDef(AliHLTRootFilePublisherComponent, 0)
     174             : };
     175             : #endif

Generated by: LCOV version 1.11