LCOV - code coverage report
Current view: top level - MUON/MUONbase - AliMUONRealDigit.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 14 30 46.7 %
Date: 2016-06-14 17:26:59 Functions: 9 12 75.0 %

          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 "AliMUONRealDigit.h"
      19             : 
      20             : //-----------------------------------------------------------------------------
      21             : /// \class AliMUONRealDigit
      22             : ///
      23             : /// Implementation of AliMUONVDigit for real digit.
      24             : /// 
      25             : /// This class should store the bare minimum in order to save disk space
      26             : ///
      27             : /// \author Laurent Aphecetche
      28             : //-----------------------------------------------------------------------------
      29             : 
      30             : /// \cond CLASSIMP
      31          18 : ClassImp(AliMUONRealDigit)
      32             : /// \endcond
      33             : 
      34             : //_____________________________________________________________________________
      35             : AliMUONRealDigit::AliMUONRealDigit() 
      36           0 :   : AliMUONVDigit(),
      37           0 :   fCharge(0),
      38           0 :   fPadXY(0),
      39           0 :   fADC(0),
      40           0 :   fStatusMap(0)
      41           0 : {
      42             :       /// default ctor
      43           0 : }
      44             : 
      45             : //_____________________________________________________________________________
      46             : AliMUONRealDigit::AliMUONRealDigit(Int_t detElemId, Int_t manuId, 
      47             :                                    Int_t manuChannel, Int_t cathode)
      48      243197 : : AliMUONVDigit(detElemId,manuId,manuChannel,cathode),
      49      243197 : fCharge(0),
      50      243197 : fPadXY(0),
      51      243197 : fADC(0),
      52      243197 : fStatusMap(0)
      53     1215985 : {
      54             :   /// normal ctor
      55      486394 : }
      56             : 
      57             : //_____________________________________________________________________________
      58             : AliMUONRealDigit::~AliMUONRealDigit()
      59     1479068 : {
      60             :   /// empty ctor
      61     1479068 : }
      62             : 
      63             : //_____________________________________________________________________________
      64             : Bool_t
      65             : AliMUONRealDigit::MergeWith(const AliMUONVDigit& src)
      66             : {
      67             :   /// Merge with src.
      68             :   
      69           0 :   Bool_t check = ( src.DetElemId() == DetElemId() &&
      70           0 :                    src.PadX() == PadX() &&
      71           0 :                    src.PadY() == PadY() &&
      72           0 :                    src.Cathode() == Cathode() );
      73           0 :   if (!check)
      74             :   {
      75           0 :     return kFALSE;
      76             :   }
      77             :   
      78           0 :   AddCharge(src.Charge());
      79           0 :   return kTRUE;
      80           0 : }
      81             : 
      82             : //_____________________________________________________________________________
      83             : Int_t
      84             : AliMUONRealDigit::PadX() const
      85             : {
      86             :   /// Return (integer) position in x (within the detection element)
      87      414338 :   return fPadXY & 0xFFFF;
      88             : }
      89             : 
      90             : //_____________________________________________________________________________
      91             : Int_t
      92             : AliMUONRealDigit::PadY() const
      93             : {
      94             :   /// Return (integer) position in y (within the detection element)
      95      414338 :   return ( fPadXY & 0xFFFF0000 ) >> 16;
      96             : }
      97             : 
      98             : //_____________________________________________________________________________
      99             : void
     100             : AliMUONRealDigit::SetPadXY(Int_t padx, Int_t pady)
     101             : {
     102             :   /// Set the pad (integer) positions
     103      414056 :   fPadXY = ( padx | (pady << 16) );
     104      207028 : }
     105             : 

Generated by: LCOV version 1.11