LCOV - code coverage report
Current view: top level - HLT/TPCLib - AliHLTTPCRawCluster.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 55 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 30 0.0 %

          Line data    Source code
       1             : // $Id$
       2             : #ifndef ALIHLTTPCRAWCLUSTER_H
       3             : #define ALIHLTTPCRAWCLUSTER_H
       4             : 
       5             : #include "Rtypes.h"
       6             : 
       7             : /**
       8             :  * @struct AliHLTTPCRawCluster
       9             :  * Primitive data of a TPC cluster in raw coordinates. The plan is to store the
      10             :  * data in a compressed format by limiting the resolution of the float values.
      11             :  * @ingroup alihlt_tpc_datastructs
      12             :  */
      13             : struct AliHLTTPCRawCluster {
      14             :   AliHLTTPCRawCluster()
      15           0 :     : fPadRow(0)
      16           0 :     , fPad(0.)
      17           0 :     , fTime(0.)
      18           0 :     , fSigmaPad2(0.)
      19           0 :     , fSigmaTime2(0.)
      20           0 :     , fCharge(0)
      21           0 :     , fQMax(0)
      22           0 :     , fFlags(0)
      23           0 :   {}
      24             : 
      25             :   AliHLTTPCRawCluster(short PadRow,
      26             :                       float Pad,
      27             :                       float Time,
      28             :                       float SigmaPad2,
      29             :                       float SigmaTime2,
      30             :                       unsigned short Charge,
      31             :                       unsigned short QMax,
      32             :                       unsigned short Flags
      33             :                       )
      34           0 :     : fPadRow(PadRow)
      35           0 :     , fPad(Pad)
      36           0 :     , fTime(Time)
      37           0 :     , fSigmaPad2(SigmaPad2)
      38           0 :     , fSigmaTime2(SigmaTime2)
      39           0 :     , fCharge(Charge)
      40           0 :     , fQMax(QMax)
      41           0 :     , fFlags(Flags)
      42           0 :   {}
      43             : 
      44             :   AliHLTTPCRawCluster(const AliHLTTPCRawCluster& other)
      45           0 :     : fPadRow(other.fPadRow)
      46           0 :     , fPad(other.fPad)
      47           0 :     , fTime(other.fTime)
      48           0 :     , fSigmaPad2(other.fSigmaPad2)
      49           0 :     , fSigmaTime2(other.fSigmaTime2)
      50           0 :     , fCharge(other.fCharge)
      51           0 :     , fQMax(other.fQMax)
      52           0 :     , fFlags(other.fFlags)
      53           0 :   {}
      54             : 
      55             :   AliHLTTPCRawCluster& operator=(const AliHLTTPCRawCluster& other) {
      56           0 :     if (this==&other) return *this;
      57             :     this->~AliHLTTPCRawCluster();
      58           0 :     new (this) AliHLTTPCRawCluster(other);
      59           0 :     return *this;
      60           0 :   }
      61             : 
      62             :   void Clear() {
      63             :     this->~AliHLTTPCRawCluster();
      64           0 :     new (this) AliHLTTPCRawCluster;
      65           0 :   }
      66             : 
      67             :   short fPadRow;
      68             :   unsigned short fFlags; //Flags: (1 << 0): Split in pad direction
      69             :                          //       (1 << 1): Split in time direction
      70             :                          //During cluster merging, flags are or'd
      71             :   float fPad;
      72             :   float fTime;
      73             :   float fSigmaPad2;
      74             :   float fSigmaTime2;
      75             :   unsigned short fCharge;
      76             :   unsigned short fQMax;
      77             : 
      78           0 :   Int_t   GetPadRow()  const {return fPadRow;}
      79           0 :   Float_t GetPad()     const {return fPad;}
      80           0 :   Float_t GetTime()    const {return fTime;}
      81           0 :   Float_t GetSigmaPad2() const {return fSigmaPad2;}
      82           0 :   Float_t GetSigmaTime2() const {return fSigmaTime2;}
      83           0 :   Int_t   GetCharge()  const {return fCharge;}
      84           0 :   Int_t   GetQMax()    const {return fQMax;}
      85           0 :   Bool_t  GetFlagSplitPad() const {return (fFlags & (1 << 0));}
      86           0 :   Bool_t  GetFlagSplitTime() const {return (fFlags & (1 << 1));}
      87           0 :   Bool_t  GetFlagSplitAny() const {return (fFlags & 3);}
      88           0 :   unsigned short GetFlags() const {return(fFlags);}
      89             : 
      90           0 :   void SetPadRow(Short_t padrow)  {fPadRow=padrow;}
      91           0 :   void SetPad(Float_t pad)     {fPad=pad;}
      92           0 :   void SetTime(Float_t time)    {fTime=time;}
      93           0 :   void SetSigmaPad2(Float_t sigmaPad2) {fSigmaPad2=sigmaPad2;}
      94           0 :   void SetSigmaTime2(Float_t sigmaTime2) {fSigmaTime2=sigmaTime2;}
      95           0 :   void SetCharge(UShort_t charge)  {fCharge=charge;}
      96           0 :   void SetQMax(UShort_t qmax)    {fQMax=qmax;}
      97             : 
      98           0 :   void ClearFlags() {fFlags = 0;}
      99           0 :   void SetFlags(unsigned short flags) {fFlags = flags;}
     100           0 :   void SetFlagSplitPad() {fFlags |= (1 << 0);}
     101           0 :   void SetFlagSplitTime() {fFlags |= (1 << 1);}
     102             : };
     103             : typedef struct AliHLTTPCRawCluster AliHLTTPCRawCluster;
     104             : 
     105             : struct AliHLTTPCRawClusterData
     106             : {
     107             :   UInt_t fVersion; // version number
     108             :   UInt_t fCount;   // number of clusters
     109             : #if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
     110             :   AliHLTTPCRawCluster  fClusters[1]; // array of clusters  
     111             : #else
     112             :   AliHLTTPCRawCluster  fClusters[0]; // array of clusters 
     113             : #endif
     114             : };
     115             : typedef struct AliHLTTPCRawClusterData AliHLTTPCRawClusterData;
     116             : 
     117             : #endif

Generated by: LCOV version 1.11