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

          Line data    Source code
       1             : #ifndef ALIHLTMUONRECHITSBLOCKSTRUCT_H
       2             : #define ALIHLTMUONRECHITSBLOCKSTRUCT_H
       3             : /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : // $Id$
       7             : 
       8             : /**
       9             :  * @file   AliHLTMUONRecHitsBlockStruct.h
      10             :  * @author Indranil Das <indra.das@saha.ac.in>,
      11             :  *         Artur Szostak <artursz@iafrica.com>
      12             :  * @date   17 May 2007
      13             :  * @brief  Definition of internal dimuon HLT reconstructed hit data block structure.
      14             :  *
      15             :  * The structures are defined with C linkage since C generally gives us more
      16             :  * binary compatibility between compilers.
      17             :  */
      18             : 
      19             : #include "AliHLTMUONDataTypes.h"
      20             : 
      21             : extern "C"
      22             : {
      23             : 
      24             : /**
      25             :  * A 3D reconstructed hit point structure.
      26             :  * These are used to store the hits reconstructed on the tracking or trigger
      27             :  * chambers.
      28             :  * Reconstructed hit values of (0, 0, 0) indicate an invalid or nil hit.
      29             :  */
      30             : struct AliHLTMUONRecHitStruct
      31             : {
      32             :         // The flags word constains the following bit fields (bit 31 is most
      33             :         // significant):
      34             :         //
      35             :         // bits:  [ 31 -- 16 ][ 15 -- 12 ][ 11 --- 0 ]
      36             :         // field:   reserved    chamber    detElemId
      37             :         //
      38             :         // Where we have,
      39             :         // reserved bits must be set to zero.
      40             :         // chamber - specifies the chamber number in the range [0..13], 0xF for invalid.
      41             :         // detElemId - specifies the detector element ID number.
      42             :         AliHLTUInt32_t fFlags;
      43             :         
      44             :         AliHLTFloat32_t fX; // X coordinate.
      45             :         AliHLTFloat32_t fY; // Y coordinate.
      46             :         AliHLTFloat32_t fZ; // Z coordinate.
      47             : };
      48             : 
      49             : /**
      50             :  * AliHLTMUONRecHitsBlockStruct defines the format of the internal
      51             :  * reconstructed hit data block.
      52             :  */
      53             : struct AliHLTMUONRecHitsBlockStruct
      54             : {
      55             :         AliHLTMUONDataBlockHeader fHeader; // Common data block header
      56             : 
      57             :         // Array of reconstructed hits.
      58             :         //AliHLTMUONRecHitStruct fHit[/*fHeader.fNrecords*/];
      59             : };
      60             : 
      61             : } // extern "C"
      62             : 
      63             : 
      64             : /**
      65             :  * Stream operator for usage with std::ostream classes which prints the
      66             :  * reconstructed hit in the following format: {fX = xx, fY = yy, fZ = zz}
      67             :  */
      68             : inline std::ostream& operator << (
      69             :                 std::ostream& stream, const AliHLTMUONRecHitStruct& hit
      70             :         )
      71             : {
      72           0 :         std::ios::fmtflags oldflags = stream.flags();
      73           0 :         stream  << "{fFlags = " << std::showbase << std::hex
      74           0 :                 << hit.fFlags << std::dec << ", fX = " << hit.fX
      75           0 :                 << ", fY = " << hit.fY << ", fZ = " << hit.fZ << "}";
      76           0 :         stream.flags(oldflags);
      77           0 :         return stream;
      78             : }
      79             : 
      80             : /**
      81             :  * Stream operator for usage with std::ostream classes which prints the
      82             :  * AliHLTMUONRecHitsBlockStruct in the following format:
      83             :  *   {fHeader = xx, fHit[] = [{..}, {..}, ...]}
      84             :  */
      85             : std::ostream& operator << (
      86             :                 std::ostream& stream, const AliHLTMUONRecHitsBlockStruct& block
      87             :         );
      88             : 
      89             : 
      90             : inline bool operator == (
      91             :                 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
      92             :         )
      93             : {
      94           0 :         return a.fFlags == b.fFlags and a.fX == b.fX and a.fY == b.fY and a.fZ == b.fZ;
      95             : }
      96             : 
      97             : inline bool operator != (
      98             :                 const AliHLTMUONRecHitStruct& a, const AliHLTMUONRecHitStruct& b
      99             :         )
     100             : {
     101           0 :         return not operator == (a, b);
     102             : }
     103             : 
     104             : 
     105             : bool operator == (
     106             :                 const AliHLTMUONRecHitsBlockStruct& a,
     107             :                 const AliHLTMUONRecHitsBlockStruct& b
     108             :         );
     109             : 
     110             : inline bool operator != (
     111             :                 const AliHLTMUONRecHitsBlockStruct& a,
     112             :                 const AliHLTMUONRecHitsBlockStruct& b
     113             :         )
     114             : {
     115             :         return not operator == (a, b);
     116             : }
     117             : 
     118             : #endif // ALIHLTMUONRECHITSBLOCKSTRUCT_H

Generated by: LCOV version 1.11