]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CRT/AliCRTdigit.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / CRT / AliCRTdigit.cxx
CommitLineData
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
16/*
17$Log:
18
19*/
20
21#include "AliCRT.h"
22#include "AliCRTdigit.h"
23#include "AliRun.h"
24
25ClassImp(AliCRTdigit)
26
27//_____________________________________________________________________________
28AliCRTdigit::AliCRTdigit()
29{
30 // Default ctor.
31
32 fNDigits = 0;
33 fTdc = 0;
34 fAdc = 0;
35 fTracks = 0;
36}
37
38//_____________________________________________________________________________
39AliCRTdigit::AliCRTdigit(Int_t tracknum, Int_t *vol,Float_t *digit)
40{
41
42 //
43 // Creates CRT digit
44 // The creator for the AliCRTdigit class. This routine fills the
45 // AliCRTdigit data members from the array digits.
46 //
47
48 fSector = vol[0];
49 fPlate = vol[1];
50 fStrip = vol[2];
51 fPadx = vol[3];
52 fPadz = vol[4];
53 fNDigits = 1;
54 fTdc = new TArrayF(fNDigits);
55 (*fTdc)[0] = digit[0];
56 fAdc = new TArrayF(fNDigits);
57 (*fAdc)[0] = digit[1];
58 //fTracks = new TArrayI(kMAXDIGITS*fNDigits);
59 fTracks = new TArrayI(fNDigits);
60 (*fTracks)[0] = tracknum;
61 //for (Int_t i = 1; i <kMAXDIGITS*fNDigits; i++) {
62 for (Int_t i = 1; i <fNDigits; i++) {
63 (*fTracks)[i] = -1;
64 }
65
66}
67
68//_____________________________________________________________________________
69AliCRTdigit::AliCRTdigit(const AliCRTdigit & digit)
70{
71 //
72 //-- Copy ctor.
73 //
74 fSector = digit.fSector;
75 fPlate = digit.fPlate;
76 fStrip = digit.fStrip;
77 fPadx = digit.fPadx;
78 fPadz = digit.fPadz;
79 fNDigits = digit.fNDigits;
80 fTdc = new TArrayF(*digit.fTdc);
81 fAdc = new TArrayF(*digit.fAdc);
82 fTracks = new TArrayI(*digit.fTracks);
83
84}
fa15ea42 85
86//_____________________________________________________________________________
87AliCRTdigit& AliCRTdigit::operator= (const AliCRTdigit & digit)
88{
89 //
90 //-- Asingment operator.
91 //
92 fSector = digit.fSector;
93 fPlate = digit.fPlate;
94 fStrip = digit.fStrip;
95 fPadx = digit.fPadx;
96 fPadz = digit.fPadz;
97 fNDigits = digit.fNDigits;
98 fTdc = new TArrayF(*digit.fTdc);
99 fAdc = new TArrayF(*digit.fAdc);
100 fTracks = new TArrayI(*digit.fTracks);
101
102 return *this;
103}