]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDCalROCVdrift.cxx
Addding new class AliTRDseed (M.Ivanov)
[u/mrichter/AliRoot.git] / TRD / AliTRDCalROCVdrift.cxx
CommitLineData
ed25c022 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// //
20// Calibration base class for a single ROC //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliTRDCalROCVdrift.h"
25
26ClassImp(AliTRDCalROCVdrift)
27
28//_____________________________________________________________________________
29AliTRDCalROCVdrift::AliTRDCalROCVdrift():AliTRDCalROC()
30{
31 //
32 // Default constructor
33 //
34
35 fNchannels = 0;
36 fVdrift = 0;
37
38}
39
40//_____________________________________________________________________________
41AliTRDCalROCVdrift::AliTRDCalROCVdrift(Int_t p, Int_t c)
42 :AliTRDCalROC(p,c)
43{
44 //
45 // Constructor that initializes a given pad plane type
46 //
47
48 fNchannels = fNrows * fNcols;
49 fVdrift = new Float_t[fNchannels];
50
51}
52
53//_____________________________________________________________________________
54AliTRDCalROCVdrift::AliTRDCalROCVdrift(const AliTRDCalROCVdrift &c)
55 :AliTRDCalROC(c)
56{
57 //
58 // AliTRDCalROCVdrift copy constructor
59 //
60
61 ((AliTRDCalROCVdrift &) c).Copy(*this);
62
63}
64
65//_____________________________________________________________________________
66AliTRDCalROCVdrift::~AliTRDCalROCVdrift()
67{
68 //
69 // AliTRDCalROCVdrift destructor
70 //
71
72 if (fVdrift) {
73 delete [] fVdrift;
74 fVdrift = 0;
75 }
76
77}
78
79//_____________________________________________________________________________
80AliTRDCalROCVdrift &AliTRDCalROCVdrift::operator=(const AliTRDCalROCVdrift &c)
81{
82 //
83 // Assignment operator
84 //
85
86 if (this != &c) ((AliTRDCalROCVdrift &) c).Copy(*this);
87 return *this;
88
89}
90
91//_____________________________________________________________________________
92void AliTRDCalROCVdrift::Copy(TObject &c) const
93{
94 //
95 // Copy function
96 //
97
98 Int_t iBin = 0;
99
100 ((AliTRDCalROCVdrift &) c).fNchannels = fNchannels;
101
102 if (((AliTRDCalROCVdrift &) c).fVdrift) delete [] ((AliTRDCalROCVdrift &) c).fVdrift;
103 ((AliTRDCalROCVdrift &) c).fVdrift = new Float_t[fNchannels];
104 for (iBin = 0; iBin < fNchannels; iBin++) {
105 ((AliTRDCalROCVdrift &) c).fVdrift[iBin] = fVdrift[iBin];
106 }
107
108 AliTRDCalROC::Copy(c);
109
110}
111