LCOV - code coverage report
Current view: top level - HLT/BASE - AliHLTHOMERBlockDesc.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 22 4.5 %

          Line data    Source code
       1             : //-*- Mode: C++ -*-
       2             : // $Id$
       3             : #ifndef ALIHLTHOMERBLOCKDESC_H
       4             : #define ALIHLTHOMERBLOCKDESC_H
       5             : 
       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   AliHLTHOMERBlockDesc.h
      11             :     @author Jochen Thaeder
      12             :     @date   
      13             :     @brief  Container for HOMER Blocks
      14             : */
      15             : 
      16             : // see below for class documentation
      17             : // or
      18             : // refer to README to build package
      19             : // or
      20             : // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
      21             : 
      22             : class AliHLTMessage;
      23             : 
      24             : #include "TString.h"
      25             : #include "TObject.h"
      26             : 
      27             : #include "AliHLTLoggingVariadicFree.h"
      28             : 
      29             : /**
      30             :  * @class AliHLTHOMERBlockDesc
      31             :  * This class contains the data which comes from 1 block, delivered via the 
      32             :  * HOMER interface. It used in order to fill these block in TLists. ( It has 
      33             :  * to inherit from TObject ). Further more it reads the specification of the 
      34             :  * block and classifies the data as TObject, raw data, or something else. Mainly 
      35             :  * used in the AliEVEHOMERManager, as data objects for AliEVE.
      36             :  * 
      37             :  * @ingroup alihlt_homer
      38             :  */
      39             : class AliHLTHOMERBlockDesc : public TObject, public AliHLTLogging {
      40             : 
      41             : public:
      42             : 
      43             :  /*
      44             :   * ---------------------------------------------------------------------------------
      45             :   *                            Constructor / Destructor 
      46             :   * --------------------------------------------------------------------------------- 
      47             :   */
      48             : 
      49             :   /** standard constructor */
      50             :   AliHLTHOMERBlockDesc();       
      51             : 
      52             :   /** destructor */
      53             :   virtual ~AliHLTHOMERBlockDesc();
      54             : 
      55             :   /*
      56             :    * ---------------------------------------------------------------------------------
      57             :    *                            Data Handling - Setter - public
      58             :    * --------------------------------------------------------------------------------- 
      59             :    */
      60             : 
      61             :   /** Set block data 
      62             :    * @param data           Pointer to data
      63             :    * @param size           Size of data
      64             :    * @param origin         Detector
      65             :    * @param dataType       HLT data type  
      66             :    * @param specification  HLT specification
      67             :    */
      68             :   void SetBlock( void * data, ULong_t size, TString origin, TString dataType, ULong_t specification );
      69             : 
      70             :   /*
      71             :    * ---------------------------------------------------------------------------------
      72             :    *                            TObject Handling - public
      73             :    * --------------------------------------------------------------------------------- 
      74             :    */
      75             : 
      76             :   /** Returns if block contains a TObject
      77             :    * @return           Returns kTRUE if block contains a TObject, kFALSE otherwise.
      78             :    */
      79           0 :   Bool_t IsTObject()              { return fIsTObject;} 
      80             : 
      81             :   /** Returns Pointer to TObject */
      82           0 :   TObject* GetTObject()           { return fTObject;   }
      83             : 
      84             :   /** Get class name of this block 
      85             :    * @return           class name
      86             :    */
      87           0 :   TString GetClassName()          { return fClassName; }
      88             : 
      89             :   /*
      90             :    * ---------------------------------------------------------------------------------
      91             :    *                            Data Handling - Getter - public
      92             :    * --------------------------------------------------------------------------------- 
      93             :    */
      94             :   
      95             :   /** Returns if block contains a raw data, fClassName is not set in this case.
      96             :    * @return           Returns kTRUE if block contains raw data, kFALSE otherwise.
      97             :    */
      98           0 :   Bool_t IsRawData()              { return fIsRawData;} 
      99             : 
     100             :   /** Get pointer to data 
     101             :    * @return           Pointer to data
     102             :    */
     103           0 :   void* GetData()                 { return fData; }
     104             : 
     105             :   /** Get size of data 
     106             :    * @return           Size of data
     107             :    */
     108           0 :   ULong_t GetSize()               { return fSize; }
     109             : 
     110             :   /** Get name of this block
     111             :    * @return           name
     112             :    */
     113           0 :   TString GetBlockName()          { return fBlockName; }
     114             : 
     115             :   /** Get detector of this block 
     116             :    * @return           Detector name
     117             :    */
     118           0 :   TString GetDetector()           { return fDetector; }
     119             :   
     120             :   /** Get HLT data type of this block 
     121             :    * @return           HLT data type
     122             :    */
     123           0 :   TString GetDataType()           { return fDataType; }
     124             :   
     125             :   /** Get HLT specification of this block 
     126             :    * @return           HLT specification
     127             :    */
     128           0 :   ULong_t GetSpecification()      { return fSpecification; }
     129             : 
     130             :   /** Get sub detector of this block 
     131             :    * @return           subdetector
     132             :    */
     133           0 :   Int_t   GetSubDetector()        { return fSubDetector; }
     134             : 
     135             :   /** Get sub sub detector of this block
     136             :    * @return           subsubdetector
     137             :    */
     138           0 :   Int_t   GetSubSubDetector()     { return fSubSubDetector; }
     139             : 
     140             :   /** Returns kTRUE if HLT specification indicates a subdetector range
     141             :    * @return           kTRUE if subdetector range
     142             :    */
     143           0 :   Bool_t  HasSubDetectorRange()   { return fHasSubDetectorRange; }
     144             : 
     145             :   /** Returns kTRUE if HLT specification indicates a subsubdetector range
     146             :    * @return           kTRUE if subsubdetector range
     147             :    */
     148           0 :   Bool_t  HasSubSubDetectorRange(){ return fHasSubSubDetectorRange; }
     149             : 
     150             :   /** Fill a struct of type AliHLTComponentDataType
     151             :    */
     152             :   void ComponentDataType(AliHLTComponentDataType& dataType);
     153             : 
     154             :   /** Fill a topic string with data type and origin
     155             :    */
     156             :   void Topic(char* topic, int topicSize=kAliHLTComponentDataTypeTopicSize);
     157             : 
     158             :   ///////////////////////////////////////////////////////////////////////////////////
     159             : 
     160             : private:
     161             : 
     162             :   /** copy constructor prohibited */
     163             :   AliHLTHOMERBlockDesc(const AliHLTHOMERBlockDesc&);
     164             : 
     165             :   /** assignment operator prohibited */
     166             :   AliHLTHOMERBlockDesc& operator=(const AliHLTHOMERBlockDesc&);
     167             : 
     168             :   /*
     169             :    * ---------------------------------------------------------------------------------
     170             :    *                            Data Handling - private
     171             :    * --------------------------------------------------------------------------------- 
     172             :    */
     173             : 
     174             :   /** Set all additional members*/
     175             :   void SetBlockParameters();
     176             : 
     177             :   /** Checks if Block contains a TObject. 
     178             :    * If so, set fIsTObject to kTRUE, otherwise kFALSE
     179             :    * @return           fIsTObject
     180             :    */
     181             :   Bool_t CheckIfTObject();
     182             : 
     183             :   /** Checks if Block contains a TObject raw data.
     184             :    * If so, set fIsRawData to kTRUE, otherwise kFALSE
     185             :    * @return           fIsRawData
     186             :    */
     187             :   Bool_t CheckIfRawData();
     188             : 
     189             :   /*
     190             :    * ---------------------------------------------------------------------------------
     191             :    *                            Members - private
     192             :    * --------------------------------------------------------------------------------- 
     193             :    */
     194             : 
     195             :   // -- Block properties --
     196             :   // ----------------------
     197             : 
     198             :   /** Pointer to data of the block */
     199             :   Char_t* fData;                    //
     200             :               
     201             :   /** Size of data */
     202             :   ULong_t fSize;                    // see above
     203             : 
     204             :   /** Block Name */
     205             :   TString fBlockName;               // see above
     206             : 
     207             :   // -- Data flags --
     208             :   // ----------------
     209             : 
     210             :   /** States if block contains a TObject */
     211             :   Bool_t fIsTObject;                // see above
     212             : 
     213             :   /** States if block contains a raw data */
     214             :   Bool_t fIsRawData;                // see above
     215             : 
     216             :   // -- TObject properties --
     217             :   // ------------------------
     218             : 
     219             :   /** AliHTMessage object containg a TObject */
     220             :   AliHLTMessage* fMessage;          //
     221             : 
     222             :   /** TObject extracted out of @see AliHLTMessage */
     223             :   TObject*       fTObject;          //
     224             : 
     225             :   /** Class Name of the block */
     226             :   TString        fClassName;        // see above
     227             :   
     228             :   // -- Data Specifications --
     229             :   // -------------------------
     230             : 
     231             :   /** HLT DataType */
     232             :   TString fDataType;                // see above 
     233             : 
     234             :   /** Detector Name, e.g. PHOS */
     235             :   TString fDetector;                // see above
     236             : 
     237             :   /** HLT Specification */
     238             :   ULong_t fSpecification;           // see above
     239             : 
     240             :   // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     241             : 
     242             :   // -- Sub Detector Specifications --
     243             :   // ---------------------------------
     244             :   
     245             :   /** SubDetector Name e.g. MODULE */
     246             :   Int_t   fSubDetector;             // see above
     247             : 
     248             :   /** SubSubDetector Name e.g. PARTITION */
     249             :   Int_t   fSubSubDetector;          // see above
     250             : 
     251             :   /** States id block has a subdetector range */
     252             :   Bool_t  fHasSubDetectorRange;     // see above
     253             : 
     254             :   /** States id block has a subsubdetector range */
     255             :   Bool_t  fHasSubSubDetectorRange;  // see above
     256             : 
     257             :   // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     258             : 
     259         126 :   ClassDef( AliHLTHOMERBlockDesc, 2 )
     260             : };
     261             : 
     262             : #endif

Generated by: LCOV version 1.11