LCOV - code coverage report
Current view: top level - HLT/EMCAL - AliHLTEMCALAgent.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             : 
       2             : #ifndef ALIHLTEMCALAGENT_H
       3             : #define ALIHLTEMCALAGENT_H
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /** @file   AliHLTEMCALAgent.h
       8             :     @author Federico Ronchetti
       9             :     @date   
      10             :     @brief  Agent of the libAliHLTEMCAL library
      11             : */
      12             : 
      13             : #include "AliHLTModuleAgent.h"
      14             : #include "AliHLTOUTHandlerEquId.h"
      15             : #include <map>
      16             : 
      17             : class AliHLTOUTHandlerChain;
      18             : class AliHLTEMCALMapper;
      19             : 
      20             : /**
      21             :  * @class AliHLTEMCALAgent
      22             :  * This is the agent for the AliHLTEMCAL library.
      23             :  *
      24             :  * @ingroup alihlt_system
      25             :  */
      26             : class AliHLTEMCALAgent : public AliHLTModuleAgent {
      27             :  public:
      28             :   /**
      29             :    * standard constructor. The agent is automatically registered in the
      30             :    * global agent manager
      31             :    */
      32             :   AliHLTEMCALAgent();
      33             :   /** destructor */
      34             :   virtual ~AliHLTEMCALAgent();
      35             : 
      36             :   UInt_t GetDetectorMask() const;
      37             : 
      38             :   /**
      39             :    * Register all configurations belonging to this module with the
      40             :    * AliHLTConfigurationHandler. The agent can adapt the configurations
      41             :    * to be registered to the current AliRoot setup by checking the
      42             :    * runloader.
      43             :    * @param handler      the configuration handler
      44             :    * @param rawReader    AliRawReader instance
      45             :    * @param runloader    AliRoot runloader
      46             :    * @return neg. error code if failed
      47             :    */
      48             :   int CreateConfigurations(AliHLTConfigurationHandler* handler,
      49             :                            AliRawReader* rawReader=NULL,
      50             :                            AliRunLoader* runloader=NULL) const;
      51             : 
      52             :   /**
      53             :    * Get the top configurations belonging to this module.
      54             :    * A top configuration describes a processing chain. It can simply be
      55             :    * described by the last configuration(s) in the chain. 
      56             :    * The agent can adapt the configurations to be registered to the current
      57             :    * AliRoot setup by checking the runloader.
      58             :    * @param rawReader    AliRawReader instance
      59             :    * @param runloader    AliRoot runloader
      60             :    * @return number of configurations, neg. error code if failed
      61             :    */
      62             :   const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
      63             :                                       AliRunLoader* runloader=NULL) const;
      64             : 
      65             :   /**
      66             :    * Component libraries which the configurations of this agent depend on.
      67             :    * @return list of component libraries as a blank-separated string.
      68             :    */
      69             :   const char* GetRequiredComponentLibraries() const;
      70             : 
      71             :   /**
      72             :    * Register components for the AliHLTEMCAL library.
      73             :    * @param pHandler  [in] instance of the component handler          
      74             :    */
      75             :   int RegisterComponents(AliHLTComponentHandler* pHandler) const;
      76             : 
      77             :   /**
      78             :    * Get handler decription for EMCAL data in the HLTOUT data stream.
      79             :    * @param dt        [in] data type of the block
      80             :    * @param spec      [in] specification of the block
      81             :    * @param desc      [out] handler description
      82             :    * @return 1 if the agent can provide a handler, 0 if not
      83             :    */
      84             :   int GetHandlerDescription(AliHLTComponentDataType dt,
      85             :                             AliHLTUInt32_t spec,
      86             :                             AliHLTOUTHandlerDesc& desc) const;
      87             : 
      88             :   /**
      89             :    * Get specific handler for EMCAL data in the HLTOUT data stream.
      90             :    * @param dt        [in] data type of the block
      91             :    * @param spec      [in] specification of the block
      92             :    * @return pointer to handler
      93             :    */
      94             :   AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
      95             :                                      AliHLTUInt32_t spec);
      96             : 
      97             :   /**
      98             :    * Delete an HLTOUT handler.
      99             :    * @param pInstance      pointer to handler
     100             :    */
     101             :   int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
     102             : 
     103             :   /**
     104             :    * The handler for EMCAL RAW data in the HLTOUT stream.
     105             :    */
     106             :   class AliHLTEMCALRawDataHandler : public AliHLTOUTHandlerEquId {
     107             :   public:
     108             :     /** constructor */
     109             :     AliHLTEMCALRawDataHandler(AliHLTEMCALAgent* pAgent=NULL);
     110             :     /** destructor */
     111             :     ~AliHLTEMCALRawDataHandler();
     112             : 
     113             :     /**
     114             :      * Process a data block.
     115             :      * Decode specification and return equipment id of the data block.
     116             :      * The data itsself i untouched.
     117             :      * @return equipment id the block should be used for.
     118             :      */
     119             :     int ProcessData(AliHLTOUT* pData);
     120             : 
     121             :   private:
     122             :     /// copy constructor prohibited
     123             :     AliHLTEMCALRawDataHandler(const AliHLTEMCALRawDataHandler&);
     124             :     /// assignment operator prohibited
     125             :     AliHLTEMCALRawDataHandler& operator=(const AliHLTEMCALRawDataHandler&);
     126             : 
     127             :     AliHLTEMCALAgent* fpAgent; //! agent instance to retrieve mapper
     128             : 
     129             :   };
     130             : 
     131             :  protected:
     132             : 
     133             :  private:
     134             :   /** copy constructor prohibited */
     135             :   AliHLTEMCALAgent(const AliHLTEMCALAgent&);
     136             :   /** assignment operator prohibited */
     137             :   AliHLTEMCALAgent& operator=(const AliHLTEMCALAgent&);
     138             : 
     139             :   /// get mapper for a specification
     140             :   AliHLTEMCALMapper* GetMapper(AliHLTUInt32_t spec) const;
     141             : 
     142             :   /** handler for EMCAL raw data in the HLTOUT stream */
     143             :   AliHLTEMCALRawDataHandler* fRawDataHandler; //!transient
     144             : 
     145             :   // mappers for different specifications
     146             :   std::map<AliHLTUInt32_t, AliHLTEMCALMapper*> fMappers; //! transient
     147             : 
     148           6 :   ClassDef(AliHLTEMCALAgent, 0);
     149             : };
     150             : 
     151             : #endif

Generated by: LCOV version 1.11