LCOV - code coverage report
Current view: top level - MUON/MUONmapping - AliMpPadUID.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 15 13.3 %
Date: 2016-06-14 17:26:59 Functions: 2 12 16.7 %

          Line data    Source code
       1             : /**************************************************************************
       2             : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             : *                                                                        *
       4             : * Author: The ALICE Off-line Project.                                    *
       5             : * Contributors are mentioned in the code where appropriate.              *
       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             : // $Id$
      17             : 
      18             : #include "AliMpPadUID.h"
      19             : 
      20             : /// \class AliMpPadUID
      21             : ///
      22             : /// Unique ID for pads
      23             : /// 
      24             : /// \author Laurent Aphecetche, Subatech
      25             : 
      26             : /// \cond CLASSIMP
      27          18 : ClassImp(AliMpPadUID)
      28             : /// \endcond
      29             : 
      30             : //_____________________________________________________________________________
      31             : AliMpPadUID::AliMpPadUID(UInt_t uid)
      32           0 : : TObject()
      33           0 : {
      34             :   /// ctor
      35           0 :   SetUniqueID(uid);
      36           0 : }
      37             : 
      38             : //_____________________________________________________________________________
      39             : AliMpPadUID::AliMpPadUID(Int_t detElemId, Int_t manuId, Int_t manuChannel)
      40           0 : : TObject()
      41           0 : {
      42             :   /// ctor
      43           0 :   SetUniqueID(BuildUniqueID(detElemId,manuId,manuChannel));
      44           0 : }
      45             : 
      46             : //_____________________________________________________________________________
      47             : AliMpPadUID::~AliMpPadUID()
      48           0 : {
      49             :   /// dtor
      50           0 : }
      51             : 
      52             : //_____________________________________________________________________________
      53             : UInt_t 
      54             : AliMpPadUID::BuildUniqueID(Int_t detElemId, Int_t manuId, 
      55             :                           Int_t manuChannel)
      56             : {
      57             :   /// Build a single integer with id information
      58    15004232 :   return ( ( detElemId ) | ( manuId << 12 ) | ( manuChannel << 24 ) );
      59             : }
      60             : 
      61             : //_____________________________________________________________________________
      62             : Int_t
      63             : AliMpPadUID::DetElemId(UInt_t uniqueID)
      64             : {
      65             :   /// Return detection element id part of the uniqueID
      66           0 :   return uniqueID & 0xFFF;
      67             : }
      68             : 
      69             : //_____________________________________________________________________________
      70             : Int_t
      71             : AliMpPadUID::ManuChannel(UInt_t uniqueID)
      72             : {
      73             :   /// Return manuChannel part of the uniqueID
      74           0 :   return ( uniqueID & 0x3F000000 ) >> 24;
      75             : }
      76             : 
      77             : //_____________________________________________________________________________
      78             : Int_t
      79             : AliMpPadUID::ManuId(UInt_t uniqueID)
      80             : {
      81             :   /// Return manuId part of the uniqueID
      82           0 :   return ( uniqueID & 0xFFF000 ) >> 12;
      83             : }

Generated by: LCOV version 1.11