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():TObject()
33 // Default constructor
46 //_____________________________________________________________________________
47 AliTRDCalSingleChamberStatus::AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols):TObject()
50 // Constructor that initializes a given pad plane type
59 // The pad plane parameter
124 fNchannels = fNrows * fNcols;
126 fData = new Char_t[fNchannels];
128 for (Int_t i=0; i<fNchannels; ++i)
132 //_____________________________________________________________________________
133 AliTRDCalSingleChamberStatus::AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c):TObject(c)
136 // AliTRDCalSingleChamberStatus copy constructor
139 ((AliTRDCalSingleChamberStatus &) c).Copy(*this);
143 //_____________________________________________________________________________
144 AliTRDCalSingleChamberStatus::~AliTRDCalSingleChamberStatus()
147 // AliTRDCalSingleChamberStatus destructor
156 //_____________________________________________________________________________
157 AliTRDCalSingleChamberStatus &AliTRDCalSingleChamberStatus::operator=(const AliTRDCalSingleChamberStatus &c)
160 // Assignment operator
163 if (this != &c) ((AliTRDCalSingleChamberStatus &) c).Copy(*this);
168 //_____________________________________________________________________________
169 void AliTRDCalSingleChamberStatus::Copy(TObject &c) const
175 ((AliTRDCalSingleChamberStatus &) c).fPla = fPla;
176 ((AliTRDCalSingleChamberStatus &) c).fCha = fCha;
178 ((AliTRDCalSingleChamberStatus &) c).fNrows = fNrows;
179 ((AliTRDCalSingleChamberStatus &) c).fNcols = fNcols;
183 ((AliTRDCalSingleChamberStatus &) c).fNchannels = fNchannels;
185 if (((AliTRDCalSingleChamberStatus &) c).fData) delete [] ((AliTRDCalSingleChamberStatus &) c).fData;
186 ((AliTRDCalSingleChamberStatus &) c).fData = new Char_t[fNchannels];
187 for (iBin = 0; iBin < fNchannels; iBin++) {
188 ((AliTRDCalSingleChamberStatus &) c).fData[iBin] = fData[iBin];