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
151 if (((AliTRDCalSingleChamberStatus &) c).fData) {
152 delete [] ((AliTRDCalSingleChamberStatus &) c).fData;
154 ((AliTRDCalSingleChamberStatus &) c).fData = new Char_t[fNchannels];
155 for (iBin = 0; iBin < fNchannels; iBin++) {
156 ((AliTRDCalSingleChamberStatus &) c).fData[iBin] = fData[iBin];
161 //_____________________________________________________________________________
162 AliTRDCalSingleChamberStatus::~AliTRDCalSingleChamberStatus()
165 // AliTRDCalSingleChamberStatus destructor
175 //_____________________________________________________________________________
176 AliTRDCalSingleChamberStatus &AliTRDCalSingleChamberStatus::operator=(const AliTRDCalSingleChamberStatus &c)
179 // Assignment operator
182 if (this != &c) ((AliTRDCalSingleChamberStatus &) c).Copy(*this);
187 //_____________________________________________________________________________
188 void AliTRDCalSingleChamberStatus::Copy(TObject &c) const
196 ((AliTRDCalSingleChamberStatus &) c).fPla = fPla;
197 ((AliTRDCalSingleChamberStatus &) c).fCha = fCha;
199 ((AliTRDCalSingleChamberStatus &) c).fNrows = fNrows;
200 ((AliTRDCalSingleChamberStatus &) c).fNcols = fNcols;
202 ((AliTRDCalSingleChamberStatus &) c).fNchannels = fNchannels;
204 if (((AliTRDCalSingleChamberStatus &) c).fData) {
205 delete [] ((AliTRDCalSingleChamberStatus &) c).fData;
207 ((AliTRDCalSingleChamberStatus &) c).fData = new Char_t[fNchannels];
208 for (iBin = 0; iBin < fNchannels; iBin++) {
209 ((AliTRDCalSingleChamberStatus &) c).fData[iBin] = fData[iBin];