LCOV - code coverage report
Current view: top level - HLT/EMCAL - AliHLTEMCALTriggerQAComponent.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 2 50.0 %
Date: 2016-06-14 17:26:59 Functions: 1 6 16.7 %

          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: Salvatore Aiola                                       *
       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             : 
      16             : #ifndef ALIHLTEMCALTRIGGERQACOMPONENT_H
      17             : #define ALIHLTEMCALTRIGGERQACOMPONENT_H
      18             : 
      19             : /**
      20             :  * @file   AliHLTEMCALTriggerQAComponent.h
      21             :  * @author Salvatore Aiola
      22             :  * @date   Nov. 2, 2015
      23             :  * @brief  A trigger QA component for EMCAL HLT
      24             :  */
      25             : 
      26             : #include "AliHLTCaloProcessor.h"
      27             : 
      28             : class AliEMCALTriggerQA;
      29             : class AliEMCALTriggerPatchInfo;
      30             : class AliEMCALTriggerBitConfig;
      31             : class AliEMCALGeometry;
      32             : class AliEMCALTriggerFastOR;
      33             : class AliHLTCaloTriggerPatchDataStruct;
      34             : class AliHLTEMCALGeometry;
      35             : class AliHLTEMCALCaloCells;
      36             : 
      37             : /**
      38             :  * @class AliHLTEMCALTriggerQAComponent
      39             :  * @brief HLT component for EMCAL/DCAL trigger QA
      40             :  */
      41             : class AliHLTEMCALTriggerQAComponent : public AliHLTCaloProcessor {
      42             : public:
      43             : 
      44             :   enum EBeamType_t {
      45             :     kPP,
      46             :     kPbPb
      47             :   };
      48             : 
      49             :   AliHLTEMCALTriggerQAComponent();
      50             :   virtual ~AliHLTEMCALTriggerQAComponent();
      51             : 
      52           0 :   void SetTriggerBitConfig(const AliEMCALTriggerBitConfig* const config) { fTriggerBitConfig = config; }
      53             :         
      54             :         /**
      55             :          *
      56             :          * @param evtData
      57             :          * @param blocks
      58             :          * @param trigData
      59             :          * @param outputPtr
      60             :          * @param size
      61             :          * @param outputBlocks
      62             :          * @return
      63             :          */
      64             :   int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
      65             :               AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
      66             :               std::vector<AliHLTComponentBlockData>& outputBlocks);
      67             : 
      68             :   /** interface function, see @ref AliHLTComponent for description */
      69             :   const char* GetComponentID();
      70             : 
      71             :   /** interface function, see @ref AliHLTComponent for description */
      72             :   void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
      73             : 
      74             :   /** interface function, see @ref AliHLTComponent for description */
      75             :   AliHLTComponentDataType GetOutputDataType();
      76             : 
      77             :   /** interface function, see @ref AliHLTComponent for description */
      78             :   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
      79             : 
      80             :   /** interface function, see @ref AliHLTComponent for description */
      81             :   AliHLTComponent* Spawn();
      82             : 
      83             :   bool CheckInputDataType(const AliHLTComponentDataType &datatype);
      84             : 
      85             :   void SetPbPb2015TriggerClasses();
      86             :   void SetPP2016TriggerClasses();
      87             : 
      88             : protected:
      89             :   /** interface function, see @ref AliHLTComponent for description */
      90             :    int DoInit(int argc, const char** argv);
      91             : 
      92             :    /** interface function, see @ref AliHLTComponent for description */
      93             :    virtual int Deinit();
      94             : 
      95             :    /** retrieve fired trigger classes for the current event **/
      96             :    int RetrieveFiredTriggerClasses();
      97             : 
      98             :    /** process trigger patches contained in block **/
      99             :    //void ProcessCells(const AliHLTComponentBlockData* block, AliHLTEMCALCaloCells& cells);
     100             : 
     101             :    /** process trigger patches contained in block **/
     102             :    void ProcessTriggerPatches(const AliHLTComponentBlockData* block);
     103             : 
     104             :    /** process trigger FastORs contained in block **/
     105             :    void ProcessTriggerFastors(const AliHLTComponentBlockData* block, const AliHLTEMCALCaloCells* cells);
     106             :    
     107             :    /** converts the HLT trigger patch flat structure into an AliEMCALTriggerPatchInfo object */
     108             :    void HLTPatch2Patch(const AliHLTCaloTriggerPatchDataStruct& htlpatch, AliEMCALTriggerPatchInfo& patch) const;
     109             : 
     110             :    /** converts the HLT trigger FastOR flat structure into an AliEMCALTriggerFastOR object */
     111             :    void HLTFastor2Fastor(const AliHLTCaloTriggerDataStruct& htlfastor, AliEMCALTriggerFastOR& fastor) const;
     112             : 
     113             :    /** push histograms contained in the list */
     114             :    void PushHistograms(TCollection* list);
     115             : 
     116             :    /** initialise the geometry */
     117             :    void InitialiseGeometry();
     118             : 
     119             :    const AliEMCALTriggerBitConfig       *fTriggerBitConfig   ;  ///<  Trigger bit configuration, aliroot-dependent
     120             :    Bool_t                                fHistoResetOnPush   ;  ///<  Reset histograms when data is pushed
     121             :    TString                               fFilterTrgClass     ;  ///<  Space-separated trigger classes to be taken into consideration
     122             :    EBeamType_t                           fBeamType           ;  ///<  Beam type
     123             :    int                                   fLocalEventCount    ;  //!<! Event counter
     124             :    AliHLTEMCALGeometry                  *fGeometry           ;  //!<! EMCal geometry
     125             :    std::vector<TString>                  fFiredTriggerClasses;  //!<! Trigger classes fired in the current event
     126             : 
     127             : private:
     128             :    /** Pointer to the trigger QA class */
     129             :    AliEMCALTriggerQA                          *fTriggerQAPtr;            //! Transient
     130             : 
     131             :    /** Copy constructor,  not implemented */
     132             :    AliHLTEMCALTriggerQAComponent(const AliHLTEMCALTriggerQAComponent&);
     133             : 
     134             :    /** Assignment operator, not implemented */
     135             :    AliHLTEMCALTriggerQAComponent& operator=(const AliHLTEMCALTriggerQAComponent);
     136             : 
     137           6 :    ClassDef(AliHLTEMCALTriggerQAComponent, 1);
     138             : };
     139             : 
     140             : #endif

Generated by: LCOV version 1.11