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 **************************************************************************/
16 /* $Id: AliTRDPrfInfo.cxx 27946 2008-08-13 15:26:24Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // Calibration base class for a single ROC //
21 // Contains one UShort_t value per pad //
22 // However, values are set and get as float, there are stored internally as //
23 // (UShort_t) value * 10000 //
25 ///////////////////////////////////////////////////////////////////////////////
32 #include "AliTRDPrfInfo.h"
34 #include "AliMathBase.h"
35 #include "TLinearFitter.h"
41 #include "TGraphDelaunay.h"
44 #include "AliTRDCommonParam.h"
45 #include "AliTRDpadPlane.h"
48 ClassImp(AliTRDPrfInfo)
50 //_____________________________________________________________________________
51 AliTRDPrfInfo::AliTRDPrfInfo()
57 // Default constructor
62 //_____________________________________________________________________________
63 AliTRDPrfInfo::AliTRDPrfInfo(Int_t n)
69 // Constructor that initializes a given size
72 fData = new UChar_t[n];
73 for(Int_t k = 0; k < fSize; k++){
77 //_____________________________________________________________________________
78 AliTRDPrfInfo::AliTRDPrfInfo(const AliTRDPrfInfo &c)
84 // AliTRDPrfInfo copy constructor
89 fData = new UChar_t[fSize];
90 for (iBin = 0; iBin < fSize; iBin++) {
91 fData[iBin] = ((AliTRDPrfInfo &) c).fData[iBin];
95 //_____________________________________________________________________________
96 AliTRDPrfInfo::~AliTRDPrfInfo()
99 // AliTRDPrfInfo destructor
108 //_____________________________________________________________________________
109 AliTRDPrfInfo &AliTRDPrfInfo::operator=(const AliTRDPrfInfo &c)
112 // Assignment operator
115 if (this != &c) ((AliTRDPrfInfo &) c).Copy(*this);
120 //_____________________________________________________________________________
121 void AliTRDPrfInfo::Copy(TObject &c) const
129 ((AliTRDPrfInfo &) c).fSize = fSize;
131 if (((AliTRDPrfInfo &) c).fData) delete [] ((AliTRDPrfInfo &) c).fData;
132 ((AliTRDPrfInfo &) c).fData = new UChar_t[fSize];
133 for (iBin = 0; iBin < fSize; iBin++) {
134 ((AliTRDPrfInfo &) c).fData[iBin] = fData[iBin];
140 //_____________________________________________________________________________
141 void AliTRDPrfInfo::SetSize(Int_t n)
147 if(fData) delete [] fData;
148 fData = new UChar_t[n];