]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CRT/AliCRTdigit.cxx
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / CRT / AliCRTdigit.cxx
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 ////////////////////////////////////////////////////////////////////////////
19 //  CRT digit: Id
20 //
21 // The digits are made in FinishEvent() by summing all the hits in a
22 // counter.
23 //   The main parts of the code need to be written.
24 //
25 ////////////////////////////////////////////////////////////////////////////
26
27 #include "AliCRTdigit.h"
28
29 #include <TArrayF.h>
30 #include <TArrayI.h>
31
32 ClassImp(AliCRTdigit)
33
34 //_____________________________________________________________________________
35 AliCRTdigit::AliCRTdigit()
36   : AliDigit(),
37     fSector(0),
38     fPlate(0),
39     fStrip(0),
40     fPadx(0),
41     fPadz(0),
42     fNDigits(0),
43     fTdc(0),
44     fAdc(0)
45 {
46   //
47   // Default constructor
48   //
49 }
50
51 //_____________________________________________________________________________
52 AliCRTdigit::AliCRTdigit(Int_t* tracks, Int_t *vol, Float_t *digit)
53   : AliDigit(tracks),
54     fSector(vol[0]),
55     fPlate(vol[1]),
56     fStrip(vol[2]),
57     fPadx(vol[3]),
58     fPadz(vol[4]),
59     fNDigits(1),
60     fTdc(new TArrayF(fNDigits)),
61     fAdc(new TArrayF(fNDigits))
62 {
63   
64   //
65   // Creates CRT digit
66   // The creator for the AliCRTdigit class. This routine fills the
67   // AliCRTdigit data members from the array digits. 
68   //
69   (*fTdc)[0] = digit[0];
70   (*fAdc)[0] = digit[1];
71 }
72
73 //_____________________________________________________________________________
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 {
85   //
86   //-- Copy constructor
87   //
88 }
89
90 //_____________________________________________________________________________
91 AliCRTdigit::~AliCRTdigit()
92 {
93   //
94   //
95   //
96   if ( fAdc ) { delete fAdc; fAdc = 0; }
97   if ( fTdc ) { delete fTdc; fTdc = 0; }
98 }
99
100 //_____________________________________________________________________________
101 AliCRTdigit& AliCRTdigit::operator=(const AliCRTdigit& digit)
102 {
103   //
104   //-- Asingment operator.
105   //
106   fSector = digit.fSector;
107   fPlate  = digit.fPlate;
108   fStrip  = digit.fStrip;
109   fPadx   = digit.fPadx;
110   fPadz   = digit.fPadz;
111   fNDigits = digit.fNDigits;
112   fTdc = digit.fTdc;
113   fAdc = digit.fAdc;
114   return *this;
115 }