]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDCalROC.cxx
Interface for AddCluster changed, return pointer to cluster (M.Ivanov)
[u/mrichter/AliRoot.git] / TRD / AliTRDCalROC.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 "AliTRDCalROC.h"
25
26ClassImp(AliTRDCalROC)
27
28//_____________________________________________________________________________
29AliTRDCalROC::AliTRDCalROC():TObject()
30{
31 //
32 // Default constructor
33 //
34
35 fPla = 0;
36 fCha = 0;
37
38 fNrows = 0;
39 fNcols = 0;
40
41}
42
43//_____________________________________________________________________________
44AliTRDCalROC::AliTRDCalROC(Int_t p, Int_t c):TObject()
45{
46 //
47 // Constructor that initializes a given pad plane type
48 //
49
50 fPla = p;
51 fCha = c;
52
53 fNcols = 144;
54
55 //
56 // The pad plane parameter
57 //
58 switch (p) {
59 case 0:
60 if (c == 2) {
61 // L0C0 type
62 fNrows = 12;
63 }
64 else {
65 // L0C1 type
66 fNrows = 16;
67 }
68 break;
69 case 1:
70 if (c == 2) {
71 // L1C0 type
72 fNrows = 12;
73 }
74 else {
75 // L1C1 type
76 fNrows = 16;
77 }
78 break;
79 case 2:
80 if (c == 2) {
81 // L2C0 type
82 fNrows = 12;
83 }
84 else {
85 // L2C1 type
86 fNrows = 16;
87 }
88 break;
89 case 3:
90 if (c == 2) {
91 // L3C0 type
92 fNrows = 12;
93 }
94 else {
95 // L3C1 type
96 fNrows = 16;
97 }
98 break;
99 case 4:
100 if (c == 2) {
101 // L4C0 type
102 fNrows = 12;
103 }
104 else {
105 // L4C1 type
106 fNrows = 16;
107 }
108 break;
109 case 5:
110 if (c == 2) {
111 // L5C0 type
112 fNrows = 12;
113 }
114 else {
115 // L5C1 type
116 fNrows = 16;
117 }
118 break;
119 };
120
121}
122
123//_____________________________________________________________________________
124AliTRDCalROC::AliTRDCalROC(const AliTRDCalROC &c):TObject(c)
125{
126 //
127 // AliTRDCalROC copy constructor
128 //
129
130 ((AliTRDCalROC &) c).Copy(*this);
131
132}
133
134//_____________________________________________________________________________
135AliTRDCalROC::~AliTRDCalROC()
136{
137 //
138 // AliTRDCalROC destructor
139 //
140
141}
142
143//_____________________________________________________________________________
144AliTRDCalROC &AliTRDCalROC::operator=(const AliTRDCalROC &c)
145{
146 //
147 // Assignment operator
148 //
149
150 if (this != &c) ((AliTRDCalROC &) c).Copy(*this);
151 return *this;
152
153}
154
155//_____________________________________________________________________________
156void AliTRDCalROC::Copy(TObject &c) const
157{
158 //
159 // Copy function
160 //
161
162 ((AliTRDCalROC &) c).fPla = fPla;
163 ((AliTRDCalROC &) c).fCha = fCha;
164
165 ((AliTRDCalROC &) c).fNrows = fNrows;
166 ((AliTRDCalROC &) c).fNcols = fNcols;
167
168 TObject::Copy(c);
169
170}
171