AliIT
[u/mrichter/AliRoot.git] / TPC / AliTPCCalPad.cxx
CommitLineData
07627591 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// TPC calibration class for parameters which saved per pad //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliTPCCalPad.h"
25#include "AliTPCCalROC.h"
07627591 26
27ClassImp(AliTPCCalPad)
28
29//_____________________________________________________________________________
30AliTPCCalPad::AliTPCCalPad():TNamed()
31{
32 //
33 // AliTPCCalPad default constructor
34 //
35
36 for (Int_t isec = 0; isec < kNsec; isec++) {
37 fROC[isec] = 0;
38 }
39
40}
41
42//_____________________________________________________________________________
43AliTPCCalPad::AliTPCCalPad(const Text_t *name, const Text_t *title)
44 :TNamed(name,title)
45{
46 //
47 // AliTPCCalPad constructor
48 //
49 for (Int_t isec = 0; isec < kNsec; isec++) {
50 fROC[isec] = new AliTPCCalROC(isec);
51 }
52}
53
54
55//_____________________________________________________________________________
56AliTPCCalPad::AliTPCCalPad(const AliTPCCalPad &c):TNamed(c)
57{
58 //
59 // AliTPCCalPad copy constructor
60 //
61
62 ((AliTPCCalPad &) c).Copy(*this);
63
64}
65
66///_____________________________________________________________________________
67AliTPCCalPad::~AliTPCCalPad()
68{
69 //
70 // AliTPCCalPad destructor
71 //
72
73 for (Int_t isec = 0; isec < kNsec; isec++) {
74 if (fROC[isec]) {
75 delete fROC[isec];
76 fROC[isec] = 0;
77 }
78 }
79
80}
81
82//_____________________________________________________________________________
83AliTPCCalPad &AliTPCCalPad::operator=(const AliTPCCalPad &c)
84{
85 //
86 // Assignment operator
87 //
88
89 if (this != &c) ((AliTPCCalPad &) c).Copy(*this);
90 return *this;
91
92}
93
94//_____________________________________________________________________________
95void AliTPCCalPad::Copy(TObject &c) const
96{
97 //
98 // Copy function
99 //
100
101 for (Int_t isec = 0; isec < kNsec; isec++) {
102 if (fROC[isec]) {
103 fROC[isec]->Copy(*((AliTPCCalPad &) c).fROC[isec]);
104 }
105 }
106 TObject::Copy(c);
107}