1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 #include "AliMUONDigit.h"
21 ClassImp(AliMUONDigit)
22 //_____________________________________________________________________________
23 AliMUONDigit::AliMUONDigit(const AliMUONDigit& digits):TObject(digits)
29 fCathode = digits.fCathode;
30 fSignal = digits.fSignal;
31 fPhysics = digits.fPhysics;
33 fDetElemId = digits.fDetElemId;
35 for(Int_t i=0; i<kMAXTRACKS; i++) {
36 fTcharges[i] = digits.fTcharges[i];
37 fTracks[i] = digits.fTracks[i];
41 //_____________________________________________________________________________
42 AliMUONDigit::AliMUONDigit()
52 // Default constructor
54 for(Int_t i=0; i<kMAXTRACKS; i++) {
60 //_____________________________________________________________________________
61 AliMUONDigit::AliMUONDigit(Int_t *digits)
64 // Creates a MUON digit object to be updated
72 fDetElemId = digits[6];
74 //_____________________________________________________________________________
75 AliMUONDigit::AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits)
78 // Creates a MUON digit object
86 fDetElemId = digits[6];
88 for(Int_t i=0; i<kMAXTRACKS; i++) {
89 fTcharges[i] = charges[i];
90 fTracks[i] = tracks[i];
94 AliMUONDigit::~AliMUONDigit()
99 //_____________________________________________________________________________
100 AliMUONDigit& AliMUONDigit::operator=(const AliMUONDigit& digits)
105 fPadX = digits.fPadX;
106 fPadY = digits.fPadY;
107 fCathode = digits.fCathode;
108 fSignal = digits.fSignal;
109 fPhysics = digits.fPhysics;
111 fDetElemId = digits.fDetElemId;
113 for(Int_t i=0; i<kMAXTRACKS; i++) {
114 fTcharges[i] = digits.fTcharges[i];
115 fTracks[i] = digits.fTracks[i];
120 //_____________________________________________________________________________
121 Int_t AliMUONDigit::Compare(const TObject *obj) const
125 AliMUONDigit* d = (AliMUONDigit*) obj;
127 return ( fDetElemId > d->DetElemId()) ? 1 : -1;