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 **************************************************************************/
17 //_________________________________________________________________________
18 // Calibration data class contains two arrays:
19 // data themselves and their quality (or possibility to check
20 // goodness of the data.
21 // There are two kinds of data in PHOS "Gains" and "Pedestals"
22 // each of them have as well title and validity range to distinguish
23 // different calibrations.
25 //*-- Author : D.Peressounko
26 //////////////////////////////////////////////////////////////////////////////
28 // --- ROOT system ---
30 // --- Standard library ---
32 // --- AliRoot header files ---
33 #include "AliPHOSCalibrationData.h"
36 ClassImp(AliPHOSCalibrationData)
39 //____________________________________________________________________________
40 AliPHOSCalibrationData::AliPHOSCalibrationData():TObject()
42 // default ctor : does nothing
51 //____________________________________________________________________________
52 AliPHOSCalibrationData::AliPHOSCalibrationData(const char * category, const char * version, Int_t nchannels)
54 // ctor: sets up the calibration IO
55 fData = new TArrayF(nchannels) ;
56 fDataCheck = new TArrayF(nchannels) ;
60 //____________________________________________________________________________
61 AliPHOSCalibrationData::AliPHOSCalibrationData(const AliPHOSCalibrationData & cd)
65 fData = new TArrayF(*cd.fData) ;
66 fDataCheck = new TArrayF(*cd.fDataCheck) ;
67 fCategory=cd.fCategory;
68 fVersion=cd.fVersion ;
70 //____________________________________________________________________________
71 AliPHOSCalibrationData::~AliPHOSCalibrationData()
73 // dtor: deletes the arrays
83 //____________________________________________________________________________
84 Float_t AliPHOSCalibrationData::Data(Int_t channel)const
86 // returns calibration data for a given channel
87 return fData->At(channel) ;
89 //____________________________________________________________________________
90 Float_t AliPHOSCalibrationData::DataCheck(Int_t channel)const
92 // returns calibration data check for a given channel
93 return fDataCheck->At(channel) ;
95 //____________________________________________________________________________
96 AliPHOSCalibrationData & AliPHOSCalibrationData::operator = (const AliPHOSCalibrationData & rvalue)
101 fData = new TArrayF(*rvalue.fData) ;
104 fDataCheck = new TArrayF(*rvalue.fDataCheck) ;
105 fCategory=rvalue.fCategory;
106 fVersion=rvalue.fVersion ;
107 fBegin=rvalue.fBegin ;