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 char value per pad //
23 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliTRDCalSingleChamberStatus.h"
27 ClassImp(AliTRDCalSingleChamberStatus)
29 //_____________________________________________________________________________
30 AliTRDCalSingleChamberStatus::AliTRDCalSingleChamberStatus()
40 // Default constructor
45 //_____________________________________________________________________________
46 AliTRDCalSingleChamberStatus::AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols)
56 // Constructor that initializes a given pad plane type
60 // The pad plane parameter
125 fNchannels = fNrows * fNcols;
126 if (fNchannels != 0) {
127 fData = new Char_t[fNchannels];
129 for (Int_t i=0; i<fNchannels; ++i) {
135 //_____________________________________________________________________________
136 AliTRDCalSingleChamberStatus::AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c)
142 ,fNchannels(c.fNchannels)
146 // AliTRDCalSingleChamberStatus copy constructor
149 fData = new Char_t[fNchannels];
150 for (Int_t iBin = 0; iBin < fNchannels; iBin++) {
151 fData[iBin] = ((AliTRDCalSingleChamberStatus &) c).fData[iBin];
156 //_____________________________________________________________________________
157 AliTRDCalSingleChamberStatus::~AliTRDCalSingleChamberStatus()
160 // AliTRDCalSingleChamberStatus destructor
170 //_____________________________________________________________________________
171 AliTRDCalSingleChamberStatus &AliTRDCalSingleChamberStatus::operator=(const AliTRDCalSingleChamberStatus &c)
174 // Assignment operator
185 fNchannels = c.fNchannels;
190 fData = new Char_t[fNchannels];
191 for (Int_t iBin = 0; iBin < fNchannels; iBin++) {
192 fData[iBin] = ((AliTRDCalSingleChamberStatus &) c).fData[iBin];
199 //_____________________________________________________________________________
200 void AliTRDCalSingleChamberStatus::Copy(TObject &c) const
208 ((AliTRDCalSingleChamberStatus &) c).fPla = fPla;
209 ((AliTRDCalSingleChamberStatus &) c).fCha = fCha;
211 ((AliTRDCalSingleChamberStatus &) c).fNrows = fNrows;
212 ((AliTRDCalSingleChamberStatus &) c).fNcols = fNcols;
214 ((AliTRDCalSingleChamberStatus &) c).fNchannels = fNchannels;
216 if (((AliTRDCalSingleChamberStatus &) c).fData) {
217 delete [] ((AliTRDCalSingleChamberStatus &) c).fData;
219 ((AliTRDCalSingleChamberStatus &) c).fData = new Char_t[fNchannels];
220 for (iBin = 0; iBin < fNchannels; iBin++) {
221 ((AliTRDCalSingleChamberStatus &) c).fData[iBin] = fData[iBin];