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 // Calibration base class for a single ROC //
21 // Contains one float value per pad //
23 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliTRDCalROC.h"
27 ClassImp(AliTRDCalROC)
29 //_____________________________________________________________________________
30 AliTRDCalROC::AliTRDCalROC():TObject()
33 // Default constructor
46 //_____________________________________________________________________________
47 AliTRDCalROC::AliTRDCalROC(Int_t p, Int_t c):TObject()
50 // Constructor that initializes a given pad plane type
59 // The pad plane parameter
124 fNchannels = fNrows * fNcols;
126 fData = new Float_t[fNchannels];
129 //_____________________________________________________________________________
130 AliTRDCalROC::AliTRDCalROC(const AliTRDCalROC &c):TObject(c)
133 // AliTRDCalROC copy constructor
136 ((AliTRDCalROC &) c).Copy(*this);
140 //_____________________________________________________________________________
141 AliTRDCalROC::~AliTRDCalROC()
144 // AliTRDCalROC destructor
153 //_____________________________________________________________________________
154 AliTRDCalROC &AliTRDCalROC::operator=(const AliTRDCalROC &c)
157 // Assignment operator
160 if (this != &c) ((AliTRDCalROC &) c).Copy(*this);
165 //_____________________________________________________________________________
166 void AliTRDCalROC::Copy(TObject &c) const
172 ((AliTRDCalROC &) c).fPla = fPla;
173 ((AliTRDCalROC &) c).fCha = fCha;
175 ((AliTRDCalROC &) c).fNrows = fNrows;
176 ((AliTRDCalROC &) c).fNcols = fNcols;
180 ((AliTRDCalROC &) c).fNchannels = fNchannels;
182 if (((AliTRDCalROC &) c).fData) delete [] ((AliTRDCalROC &) c).fData;
183 ((AliTRDCalROC &) c).fData = new Float_t[fNchannels];
184 for (iBin = 0; iBin < fNchannels; iBin++) {
185 ((AliTRDCalROC &) c).fData[iBin] = fData[iBin];
192 //_____________________________________________________________________________
193 void AliTRDCalROC::Scale(Float_t value)
196 // Scales all values of this ROC with the provided parameter. Is used if ROC defines
197 // local variations of a global (or per detector defined) parameter
200 for (Int_t iBin = 0; iBin < fNchannels; iBin++) {
201 fData[iBin] *= value;