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