LCOV - code coverage report
Current view: top level - HLT/EMCAL - AliHLTEMCALTriggerDataMakerComponent.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             :  * This file is property of and copyright by the ALICE HLT Project        *
       3             :  * All rights reserved.                                                   *
       4             :  *                                                                        *
       5             :  * Primary Authors: Markus Fasel                                          *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : #ifndef ALIHLTEMCALTRIGGERDATAMAKERCOMPONENT_H
      16             : #define ALIHLTEMCALTRIGGERDATAMAKERCOMPONENT_H
      17             : 
      18             : /**
      19             :  * @file AliHLTEMCALTriggerRawDigitMaker.h
      20             :  * @brief  Component converting raw data to EMCAL digits
      21             :  * @author Markus Fasel <markus.fasel@cern.ch>
      22             :  * @date Nov 3, 2015
      23             :  */
      24             : 
      25             : #include <vector>
      26             : #include "AliHLTCaloConstants.h"
      27             : #include "AliHLTCaloProcessor.h"
      28             : #include "AliHLTCaloTriggerRawDigitDataStruct.h"
      29             : #include "AliHLTEMCALSTUHeaderStruct.h"
      30             : 
      31             : struct AliHLTCaloTriggerDataStruct;
      32             : class AliHLTEMCALGeometry;
      33             : 
      34             : /**
      35             :  * @class AliHTLEMCALTriggerRawDigitMaker
      36             :  * @brief Combining data from STU and TRU in EMCAL trigger data
      37             :  */
      38             : class AliHLTEMCALTriggerDataMakerComponent : public AliHLTCaloProcessor, protected AliHLTCaloConstantsHandler {
      39             : public:
      40             : 
      41             :   /**
      42             :    * Constructor
      43             :    */
      44             :   AliHLTEMCALTriggerDataMakerComponent();
      45             : 
      46             :   /**
      47             :    * Destructor
      48             :    */
      49             :   virtual ~AliHLTEMCALTriggerDataMakerComponent();
      50             : 
      51             :   /**
      52             :    * Initialize component
      53             :    * @param argc
      54             :    * @param argv
      55             :    * @return status code
      56             :    */
      57             :   virtual int DoInit(int argc =0, const char** argv  = 0) ;
      58             : 
      59             :   /**
      60             :    * Deinit component
      61             :    * @return status code
      62             :    */
      63             :   virtual int DoDeinit();
      64             : 
      65             :   /**
      66             :    * Get the ID (name) of the component
      67             :    * @return name of the component
      68             :    */
      69             :   virtual const char* GetComponentID();
      70             : 
      71             :   /**
      72             :    * Get the list of input data types used by this component
      73             :    * @param list Input data type list
      74             :    */
      75             :   virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list);
      76             : 
      77             :   /**
      78             :    * Get the output data type
      79             :    * @return Return output data type
      80             :    */
      81             :   virtual AliHLTComponentDataType GetOutputDataType();
      82             : 
      83             :   /**
      84             :    * Get the size of the output data
      85             :    * @param constBase Offset
      86             :    * @param inputMultiplier Size mulitplier
      87             :    */
      88             :   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
      89             : 
      90             :   /**
      91             :    * Create new trigger raw digit maker component
      92             :    * @return The new trigger raw digit maker component
      93             :    */
      94             :   virtual AliHLTComponent* Spawn();
      95             : 
      96             : protected:
      97             : 
      98             :   /**
      99             :    * Process the event
     100             :    * @param evtData
     101             :    * @param blocks
     102             :    * @param trigData
     103             :    * @param outputPtr
     104             :    * @param size
     105             :    * @param outputBlocks
     106             :    * @return
     107             :    */
     108             :   virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
     109             :           AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
     110             :           AliHLTUInt32_t& size, std::vector<AliHLTComponentBlockData>& outputBlocks );
     111             : 
     112             :   bool CheckInputDataType(const AliHLTComponentDataType &datatype);
     113             : 
     114             :   void ReadSTUData(AliHLTEMCALSTUHeaderStruct *headerptr, AliHLTCaloTriggerRawDigitDataStruct *dataptr);
     115             :   void ReadTRUData(UShort_t ndigits, AliHLTCaloTriggerRawDigitDataStruct * triggerdata);
     116             :   Int_t MakeTriggerData(AliHLTCaloTriggerDataStruct *outputptr, AliHLTUInt32_t &availableSize);
     117             :   void Reset();
     118             : 
     119             :   void CombineTRUSTUDigit(AliHLTCaloTriggerRawDigitDataStruct &target, const AliHLTCaloTriggerRawDigitDataStruct &trudigit, const AliHLTCaloTriggerRawDigitDataStruct &studigit);
     120             :   void ConvertRawDigit(AliHLTCaloTriggerDataStruct *target, const AliHLTCaloTriggerRawDigitDataStruct * source, Int_t col, Int_t row);
     121             : 
     122             : private:
     123             :   enum {
     124             :     kMaxChannels = 5962
     125             :   };
     126             :   AliHLTEMCALTriggerDataMakerComponent(const AliHLTEMCALTriggerDataMakerComponent &ref);
     127             :   AliHLTEMCALTriggerDataMakerComponent &operator=(const AliHLTEMCALTriggerDataMakerComponent &ref);
     128             : 
     129             :   /** Pointer to the geometry class */
     130             :   AliHLTEMCALGeometry                       *fGeometry;
     131             : 
     132             :   AliHLTEMCALSTUHeaderStruct                fSTUHeader;
     133             :   Short_t                                   fNRawDigitsTRU;
     134             :   Short_t                                   fRawIndexesTRU[kMaxChannels];
     135             :   Short_t                                   fNRawDigitsSTU;
     136             :   Short_t                                   fRawIndexesSTU[kMaxChannels];
     137             :   Short_t                                   fMaxChannel;
     138             :   AliHLTCaloTriggerRawDigitDataStruct       fTRURawDigitBuffer[kMaxChannels];
     139             :   AliHLTCaloTriggerRawDigitDataStruct       fSTURawDigitBuffer[kMaxChannels];
     140             : 
     141           6 :   ClassDef(AliHLTEMCALTriggerDataMakerComponent, 1);
     142             : };
     143             : 
     144             : #endif

Generated by: LCOV version 1.11