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