]>
Commit | Line | Data |
---|---|---|
fb7a1f55 | 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 | ||
803d1ab0 | 16 | /* $Id$ */ |
fb7a1f55 | 17 | |
fddb5247 | 18 | #include "AliCRTdigit.h" |
19 | ||
387cc25e | 20 | #include <TArrayF.h> |
21 | #include <TArrayI.h> | |
22 | ||
fb7a1f55 | 23 | ClassImp(AliCRTdigit) |
24 | ||
25 | //_____________________________________________________________________________ | |
26 | AliCRTdigit::AliCRTdigit() | |
387cc25e | 27 | : AliDigit(), |
28 | fSector(0), | |
29 | fPlate(0), | |
30 | fStrip(0), | |
31 | fPadx(0), | |
32 | fPadz(0), | |
33 | fNDigits(0), | |
34 | fTdc(0), | |
35 | fAdc(0), | |
36 | fTracks(0) | |
fb7a1f55 | 37 | { |
387cc25e | 38 | // |
39 | // Default constructor | |
40 | // | |
fb7a1f55 | 41 | } |
42 | ||
43 | //_____________________________________________________________________________ | |
387cc25e | 44 | AliCRTdigit::AliCRTdigit(Int_t tracknum, Int_t *vol, Float_t *digit) |
45 | : AliDigit(), | |
46 | fSector(vol[0]), | |
47 | fPlate(vol[1]), | |
48 | fStrip(vol[2]), | |
49 | fPadx(vol[3]), | |
50 | fPadz(vol[4]), | |
51 | fNDigits(1), | |
52 | fTdc(new TArrayF(fNDigits)), | |
53 | fAdc(new TArrayF(fNDigits)), | |
54 | fTracks(new TArrayI(fNDigits)) | |
fb7a1f55 | 55 | { |
56 | ||
57 | // | |
58 | // Creates CRT digit | |
59 | // The creator for the AliCRTdigit class. This routine fills the | |
60 | // AliCRTdigit data members from the array digits. | |
61 | // | |
fb7a1f55 | 62 | (*fTdc)[0] = digit[0]; |
fb7a1f55 | 63 | (*fAdc)[0] = digit[1]; |
64 | //fTracks = new TArrayI(kMAXDIGITS*fNDigits); | |
fb7a1f55 | 65 | (*fTracks)[0] = tracknum; |
66 | //for (Int_t i = 1; i <kMAXDIGITS*fNDigits; i++) { | |
67 | for (Int_t i = 1; i <fNDigits; i++) { | |
68 | (*fTracks)[i] = -1; | |
69 | } | |
70 | ||
71 | } | |
72 | ||
73 | //_____________________________________________________________________________ | |
387cc25e | 74 | AliCRTdigit::AliCRTdigit(const AliCRTdigit& digit) |
75 | : AliDigit(digit), | |
76 | fSector(digit.fSector), | |
77 | fPlate(digit.fPlate), | |
78 | fStrip(digit.fStrip), | |
79 | fPadx(digit.fPadx), | |
80 | fPadz(digit.fPadz), | |
81 | fNDigits(digit.fNDigits), | |
82 | fTdc(digit.fTdc), | |
83 | fAdc(digit.fAdc), | |
84 | fTracks(digit.fTracks) | |
fb7a1f55 | 85 | { |
86 | // | |
387cc25e | 87 | //-- Copy constructor |
fb7a1f55 | 88 | // |
387cc25e | 89 | } |
fb7a1f55 | 90 | |
387cc25e | 91 | //_____________________________________________________________________________ |
92 | AliCRTdigit::~AliCRTdigit() | |
93 | { | |
94 | // | |
95 | // | |
96 | // | |
97 | if ( fTracks ) { delete fTracks; fTracks = 0; } | |
98 | if ( fAdc ) { delete fAdc; fAdc = 0; } | |
99 | if ( fTdc ) { delete fTdc; fTdc = 0; } | |
fb7a1f55 | 100 | } |
fa15ea42 | 101 | |
102 | //_____________________________________________________________________________ | |
387cc25e | 103 | AliCRTdigit& AliCRTdigit::operator=(const AliCRTdigit& digit) |
fa15ea42 | 104 | { |
105 | // | |
106 | //-- Asingment operator. | |
107 | // | |
108 | fSector = digit.fSector; | |
109 | fPlate = digit.fPlate; | |
110 | fStrip = digit.fStrip; | |
111 | fPadx = digit.fPadx; | |
112 | fPadz = digit.fPadz; | |
113 | fNDigits = digit.fNDigits; | |
387cc25e | 114 | fTdc = digit.fTdc; |
115 | fAdc = digit.fAdc; | |
116 | fTracks = digit.fTracks; | |
fa15ea42 | 117 | return *this; |
118 | } |