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