]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalPad.cxx
Incrementing the version in AliRunTag
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPad.cxx
CommitLineData
7754cd1f 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 parameters which saved per pad //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliTRDCalPad.h"
25#include "AliTRDCalROC.h"
26#include "AliTRDCalDet.h"
27
28ClassImp(AliTRDCalPad)
29
30//_____________________________________________________________________________
31AliTRDCalPad::AliTRDCalPad():TNamed()
32{
33 //
34 // AliTRDCalPad default constructor
35 //
36
37 for (Int_t idet = 0; idet < kNdet; idet++) {
38 fROC[idet] = 0;
39 }
40
41}
42
43//_____________________________________________________________________________
44AliTRDCalPad::AliTRDCalPad(const Text_t *name, const Text_t *title)
45 :TNamed(name,title)
46{
47 //
48 // AliTRDCalPad constructor
49 //
50
51 for (Int_t isec = 0; isec < kNsect; isec++) {
52 for (Int_t ipla = 0; ipla < kNplan; ipla++) {
53 for (Int_t icha = 0; icha < kNcham; icha++) {
54 Int_t idet = GetDet(ipla,icha,isec);
55 fROC[idet] = new AliTRDCalROC(ipla,icha);
56 }
57 }
58 }
59
60}
61
7754cd1f 62//_____________________________________________________________________________
63AliTRDCalPad::AliTRDCalPad(const AliTRDCalPad &c):TNamed(c)
64{
65 //
66 // AliTRDCalPad copy constructor
67 //
68
69 ((AliTRDCalPad &) c).Copy(*this);
70
71}
72
73///_____________________________________________________________________________
74AliTRDCalPad::~AliTRDCalPad()
75{
76 //
77 // AliTRDCalPad destructor
78 //
79
80 for (Int_t idet = 0; idet < kNdet; idet++) {
81 if (fROC[idet]) {
82 delete fROC[idet];
83 fROC[idet] = 0;
84 }
85 }
86
87}
88
89//_____________________________________________________________________________
90AliTRDCalPad &AliTRDCalPad::operator=(const AliTRDCalPad &c)
91{
92 //
93 // Assignment operator
94 //
95
96 if (this != &c) ((AliTRDCalPad &) c).Copy(*this);
97 return *this;
98
99}
100
101//_____________________________________________________________________________
102void AliTRDCalPad::Copy(TObject &c) const
103{
104 //
105 // Copy function
106 //
107
108 for (Int_t idet = 0; idet < kNdet; idet++) {
109 if (fROC[idet]) {
110 fROC[idet]->Copy(*((AliTRDCalPad &) c).fROC[idet]);
111 }
112 }
113
114 TObject::Copy(c);
2745a409 115
7754cd1f 116}
117
118//_____________________________________________________________________________
119void AliTRDCalPad::ScaleROCs(AliTRDCalDet* values)
120{
121 //
122 // Scales ROCs of this class with the values from the class <values>
123 // Is used if an AliTRDCalPad object defines local variations of a parameter
124 // defined per detector using a AliTRDCalDet class
125 //
126
127 if (!values)
128 return;
129
130 for (Int_t idet = 0; idet < kNdet; idet++) {
131 if (fROC[idet]) {
132 fROC[idet]->Scale(values->GetValue(idet));
133 }
134 }
2745a409 135
7754cd1f 136}
137