]>
Commit | Line | Data |
---|---|---|
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 | // TRD calibration class for Vdrift // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | #include "AliTRDCalVdrift.h" | |
25 | #include "AliTRDCalROCVdrift.h" | |
26 | ||
27 | ClassImp(AliTRDCalVdrift) | |
28 | ||
29 | //_____________________________________________________________________________ | |
30 | AliTRDCalVdrift::AliTRDCalVdrift():TNamed() | |
31 | { | |
32 | // | |
33 | // AliTRDCalVdrift default constructor | |
34 | // | |
35 | ||
36 | for (Int_t idet = 0; idet < kNdet; idet++) { | |
37 | fROCVdrift[idet] = 0; | |
38 | } | |
39 | ||
40 | } | |
41 | ||
42 | //_____________________________________________________________________________ | |
43 | AliTRDCalVdrift::AliTRDCalVdrift(const Text_t *name, const Text_t *title) | |
44 | :TNamed(name,title) | |
45 | { | |
46 | // | |
47 | // AliTRDCalVdrift constructor | |
48 | // | |
49 | ||
50 | for (Int_t isec = 0; isec < kNsect; isec++) { | |
51 | for (Int_t ipla = 0; ipla < kNplan; ipla++) { | |
52 | for (Int_t icha = 0; icha < kNcham; icha++) { | |
53 | Int_t idet = GetDet(ipla,icha,isec); | |
54 | fROCVdrift[idet] = new AliTRDCalROCVdrift(ipla,icha); | |
55 | } | |
56 | } | |
57 | } | |
58 | ||
59 | } | |
60 | ||
61 | ||
62 | //_____________________________________________________________________________ | |
63 | AliTRDCalVdrift::AliTRDCalVdrift(const AliTRDCalVdrift &c):TNamed(c) | |
64 | { | |
65 | // | |
66 | // AliTRDCalVdrift copy constructor | |
67 | // | |
68 | ||
69 | ((AliTRDCalVdrift &) c).Copy(*this); | |
70 | ||
71 | } | |
72 | ||
73 | ///_____________________________________________________________________________ | |
74 | AliTRDCalVdrift::~AliTRDCalVdrift() | |
75 | { | |
76 | // | |
77 | // AliTRDCalVdrift destructor | |
78 | // | |
79 | ||
80 | for (Int_t idet = 0; idet < kNdet; idet++) { | |
81 | if (fROCVdrift[idet]) { | |
82 | delete fROCVdrift[idet]; | |
83 | fROCVdrift[idet] = 0; | |
84 | } | |
85 | } | |
86 | ||
87 | } | |
88 | ||
89 | //_____________________________________________________________________________ | |
90 | AliTRDCalVdrift &AliTRDCalVdrift::operator=(const AliTRDCalVdrift &c) | |
91 | { | |
92 | // | |
93 | // Assignment operator | |
94 | // | |
95 | ||
96 | if (this != &c) ((AliTRDCalVdrift &) c).Copy(*this); | |
97 | return *this; | |
98 | ||
99 | } | |
100 | ||
101 | //_____________________________________________________________________________ | |
102 | void AliTRDCalVdrift::Copy(TObject &c) const | |
103 | { | |
104 | // | |
105 | // Copy function | |
106 | // | |
107 | ||
108 | for (Int_t idet = 0; idet < kNdet; idet++) { | |
109 | if (fROCVdrift[idet]) { | |
110 | fROCVdrift[idet]->Copy(*((AliTRDCalVdrift &) c).fROCVdrift[idet]); | |
111 | } | |
112 | } | |
113 | ||
114 | TObject::Copy(c); | |
115 | ||
116 | } | |
117 |