Bug fix by Prashant
[u/mrichter/AliRoot.git] / MUON / AliMUONDigit.cxx
CommitLineData
a9e2aefa 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
88cb7938 16/* $Id$ */
a9e2aefa 17
18#include "AliMUONDigit.h"
19
8c343c7c 20
a9e2aefa 21ClassImp(AliMUONDigit)
22//_____________________________________________________________________________
61adb9bd 23 AliMUONDigit::AliMUONDigit(const AliMUONDigit& digits):TObject(digits)
24{
25// copy constructor
26
27 fPadX = digits.fPadX;
28 fPadY = digits.fPadY;
29 fCathode = digits.fCathode;
30 fSignal = digits.fSignal;
31 fPhysics = digits.fPhysics;
32 fHit = digits.fHit;
33
34 for(Int_t i=0; i<kMAXTRACKS; i++) {
35 fTcharges[i] = digits.fTcharges[i];
36 fTracks[i] = digits.fTracks[i];
37 }
38}
39
40//_____________________________________________________________________________
30178c30 41 AliMUONDigit::AliMUONDigit()
42 : TObject()
43{
44// Default constructor
45}
46
47//_____________________________________________________________________________
a9e2aefa 48AliMUONDigit::AliMUONDigit(Int_t *digits)
49{
50 //
51 // Creates a MUON digit object to be updated
52 //
53 fPadX = digits[0];
54 fPadY = digits[1];
a450cfad 55 fCathode = digits[2];
56 fSignal = digits[3];
57 fPhysics = digits[4];
58 fHit = digits[5];
a9e2aefa 59
60}
61//_____________________________________________________________________________
62AliMUONDigit::AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits)
63{
64 //
65 // Creates a MUON digit object
66 //
67 fPadX = digits[0];
68 fPadY = digits[1];
a450cfad 69 fCathode = digits[2];
70 fSignal = digits[3];
71 fPhysics = digits[4];
72 fHit = digits[5];
73
cb73aa80 74 for(Int_t i=0; i<kMAXTRACKS; i++) {
a9e2aefa 75 fTcharges[i] = charges[i];
76 fTracks[i] = tracks[i];
77 }
78}
79
80AliMUONDigit::~AliMUONDigit()
81{
82 // Destructor
83}
61adb9bd 84
85//_____________________________________________________________________________
86AliMUONDigit& AliMUONDigit::operator=(const AliMUONDigit& digits)
87{
88 if (this == &digits)
89 return *this;
90
91 fPadX = digits.fPadX;
92 fPadY = digits.fPadY;
93 fCathode = digits.fCathode;
94 fSignal = digits.fSignal;
95 fPhysics = digits.fPhysics;
96 fHit = digits.fHit;
97
98 for(Int_t i=0; i<kMAXTRACKS; i++) {
99 fTcharges[i] = digits.fTcharges[i];
100 fTracks[i] = digits.fTracks[i];
101 }
102
103 return *this;
104}