1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // TRD calibration class for parameters which saved per pad //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTRDCalPad.h"
25 #include "AliTRDCalROC.h"
26 #include "AliTRDCalDet.h"
28 ClassImp(AliTRDCalPad)
30 //_____________________________________________________________________________
31 AliTRDCalPad::AliTRDCalPad():TNamed()
34 // AliTRDCalPad default constructor
37 for (Int_t idet = 0; idet < kNdet; idet++) {
43 //_____________________________________________________________________________
44 AliTRDCalPad::AliTRDCalPad(const Text_t *name, const Text_t *title)
48 // AliTRDCalPad constructor
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);
63 //_____________________________________________________________________________
64 AliTRDCalPad::AliTRDCalPad(const AliTRDCalPad &c):TNamed(c)
67 // AliTRDCalPad copy constructor
70 ((AliTRDCalPad &) c).Copy(*this);
74 ///_____________________________________________________________________________
75 AliTRDCalPad::~AliTRDCalPad()
78 // AliTRDCalPad destructor
81 for (Int_t idet = 0; idet < kNdet; idet++) {
90 //_____________________________________________________________________________
91 AliTRDCalPad &AliTRDCalPad::operator=(const AliTRDCalPad &c)
94 // Assignment operator
97 if (this != &c) ((AliTRDCalPad &) c).Copy(*this);
102 //_____________________________________________________________________________
103 void AliTRDCalPad::Copy(TObject &c) const
109 for (Int_t idet = 0; idet < kNdet; idet++) {
111 fROC[idet]->Copy(*((AliTRDCalPad &) c).fROC[idet]);
118 //_____________________________________________________________________________
119 void AliTRDCalPad::ScaleROCs(AliTRDCalDet* values)
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
130 for (Int_t idet = 0; idet < kNdet; idet++) {
132 fROC[idet]->Scale(values->GetValue(idet));