LCOV - code coverage report
Current view: top level - MUON/MUONmapping - AliMpMotifPosition.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 7 85.7 %
Date: 2016-06-14 17:26:59 Functions: 6 11 54.5 %

          Line data    Source code
       1             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       2             :  * See cxx source for full Copyright notice                               */
       3             : 
       4             : // $Id$
       5             : // $MpId: AliMpMotifPosition.h,v 1.9 2006/05/24 13:58:18 ivana Exp $
       6             : 
       7             : /// \ingroup motif
       8             : /// \class AliMpMotifPosition
       9             : /// \brief A placed motif.
      10             : ///
      11             : /// \author David Guez, Ivana Hrivnacova; IPN Orsay
      12             : 
      13             : #ifndef ALI_MP_MOTIF_POSITION_H
      14             : #define ALI_MP_MOTIF_POSITION_H
      15             : 
      16             : #include "AliMpVIndexed.h"
      17             : #include "AliMpVMotif.h"
      18             : 
      19             : class AliMpVPadIterator;
      20             : 
      21             : class AliMpMotifPosition : public AliMpVIndexed
      22             : {
      23             :  public:
      24             :   AliMpMotifPosition(Int_t id, AliMpVMotif* motif, Double_t x, Double_t y);
      25             :   AliMpMotifPosition();
      26             :   virtual ~AliMpMotifPosition();
      27             : 
      28             :   // methods
      29             :   virtual AliMpVPadIterator* CreateIterator() const;
      30             : 
      31             :   // get methods
      32             :   Int_t        GetID() const;
      33             :   AliMpVMotif* GetMotif() const;
      34             :   Bool_t       HasPadByIndices(MpPair_t indices) const;
      35             :   Bool_t       HasPadByManuChannel(Int_t manuChannel) const;
      36             : 
      37             :   // Geometry
      38             :   Double_t  GetPositionX() const;
      39             :   Double_t  GetPositionY() const;
      40             :   Double_t  GetDimensionX() const;
      41             :   Double_t  GetDimensionY() const;
      42             :   
      43             :   // Sets the ID (which is the MANU ID)
      44             :   void SetID(Int_t id); 
      45             :   // Sets the position.
      46             :   void SetPosition(Double_t x, Double_t y);
      47             : 
      48             :   void Print(Option_t* option="") const;
      49             : 
      50             :  private:
      51             :   /// Not implemented
      52             :   AliMpMotifPosition(const AliMpMotifPosition& right);
      53             :   /// Not implemented
      54             :   AliMpMotifPosition&  operator = (const AliMpMotifPosition& right);
      55             : 
      56             :   // methods
      57             :   // data members 
      58             :   Int_t         fID;        ///< identifier=manu id
      59             :   AliMpVMotif*  fMotif;     ///< motif
      60             :   Double_t      fPositionX; ///< x position
      61             :   Double_t      fPositionY; ///< y position
      62             : 
      63          18 :   ClassDef(AliMpMotifPosition,2) // A motif position
      64             : };
      65             : 
      66             : // inline functions
      67             : 
      68             : /// Return motif position ID = manu id
      69             : inline Int_t  AliMpMotifPosition::GetID() const 
      70     5960494 : { return fID; }
      71             : 
      72             : /// Return motif 
      73             : inline AliMpVMotif*  AliMpMotifPosition::GetMotif() const
      74    14951598 : { return fMotif; }
      75             :  
      76             : /// Return x position
      77             : inline Double_t AliMpMotifPosition::GetPositionX() const
      78    11301010 : { return fPositionX; }
      79             : 
      80             : /// Return y position
      81             : inline Double_t AliMpMotifPosition::GetPositionY() const
      82    11199850 : { return fPositionY; }
      83             : 
      84             : /// Return x dimension
      85             : inline Double_t AliMpMotifPosition::GetDimensionX() const
      86       43104 : { return fMotif->DimensionX(); }
      87             : 
      88             : /// Return y dimension
      89             : inline Double_t AliMpMotifPosition::GetDimensionY() const
      90           0 : { return fMotif->DimensionY(); }
      91             : 
      92             : #endif //ALI_MP_MOTIF_POSITION_H

Generated by: LCOV version 1.11