]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CRT/AliCRTdigit.cxx
Now the full chain includes raw data.
[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
803d1ab0 16/* $Id$ */
fb7a1f55 17
783ffa18 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
fddb5247 27#include "AliCRTdigit.h"
28
387cc25e 29#include <TArrayF.h>
30#include <TArrayI.h>
31
fb7a1f55 32ClassImp(AliCRTdigit)
33
34//_____________________________________________________________________________
35AliCRTdigit::AliCRTdigit()
387cc25e 36 : AliDigit(),
37 fSector(0),
38 fPlate(0),
39 fStrip(0),
40 fPadx(0),
41 fPadz(0),
42 fNDigits(0),
43 fTdc(0),
783ffa18 44 fAdc(0)
fb7a1f55 45{
387cc25e 46 //
47 // Default constructor
48 //
fb7a1f55 49}
50
51//_____________________________________________________________________________
783ffa18 52AliCRTdigit::AliCRTdigit(Int_t* tracks, Int_t *vol, Float_t *digit)
53 : AliDigit(tracks),
387cc25e 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)),
783ffa18 61 fAdc(new TArrayF(fNDigits))
fb7a1f55 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 //
fb7a1f55 69 (*fTdc)[0] = digit[0];
fb7a1f55 70 (*fAdc)[0] = digit[1];
fb7a1f55 71}
72
73//_____________________________________________________________________________
387cc25e 74AliCRTdigit::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),
783ffa18 83 fAdc(digit.fAdc)
fb7a1f55 84{
85 //
387cc25e 86 //-- Copy constructor
fb7a1f55 87 //
387cc25e 88}
fb7a1f55 89
387cc25e 90//_____________________________________________________________________________
91AliCRTdigit::~AliCRTdigit()
92{
93 //
94 //
95 //
387cc25e 96 if ( fAdc ) { delete fAdc; fAdc = 0; }
97 if ( fTdc ) { delete fTdc; fTdc = 0; }
fb7a1f55 98}
fa15ea42 99
100//_____________________________________________________________________________
387cc25e 101AliCRTdigit& AliCRTdigit::operator=(const AliCRTdigit& digit)
fa15ea42 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;
387cc25e 112 fTdc = digit.fTdc;
113 fAdc = digit.fAdc;
fa15ea42 114 return *this;
115}