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: AliZDCTDCCalib.cxx 46092 2010-12-16 13:18:21Z coppedis $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // class for ZDC calibration -> values for TDC offset calibration //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliZDCTDCCalib.h"
26 ClassImp(AliZDCTDCCalib)
28 //________________________________________________________________
29 AliZDCTDCCalib::AliZDCTDCCalib():
35 //________________________________________________________________
36 AliZDCTDCCalib::AliZDCTDCCalib(const char* name):
40 TString namst = "Calib_";
42 SetName(namst.Data());
43 SetTitle(namst.Data());
45 for(Int_t i=0; i<6; i++){
53 //________________________________________________________________
54 AliZDCTDCCalib::AliZDCTDCCalib(const AliZDCTDCCalib& calibda) :
58 SetName(calibda.GetName());
59 SetTitle(calibda.GetName());
61 for(int t=0; t<6; t++){
62 fMeanTDC[t] = calibda.GetMeanTDC(t);
63 fWidthTDC[t] = calibda.GetWidthTDC(t);
67 //________________________________________________________________
68 AliZDCTDCCalib &AliZDCTDCCalib::operator =(const AliZDCTDCCalib& calibda)
70 // assignment operator
71 SetName(calibda.GetName());
72 SetTitle(calibda.GetName());
74 for(int t=0; t<6; t++){
75 fMeanTDC[t] = calibda.GetMeanTDC(t);
76 fWidthTDC[t] = calibda.GetWidthTDC(t);
82 //________________________________________________________________
83 AliZDCTDCCalib::~AliZDCTDCCalib()
87 //________________________________________________________________
88 void AliZDCTDCCalib::Reset()
91 memset(fMeanTDC,0,6*sizeof(Float_t));
92 memset(fWidthTDC,0,6*sizeof(Float_t));
96 //________________________________________________________________
97 void AliZDCTDCCalib::Print(Option_t *) const
99 // Printing of calibration object
100 printf("\n ####### TDC calibration values ####### \n");
101 for(int t=0; t<6; t++)
102 printf("\t ch.%d (%f, %f)\n",t,fMeanTDC[t],fWidthTDC[t]);
106 //________________________________________________________________
107 void AliZDCTDCCalib::SetMeanTDC(Float_t* mean)
109 if(mean) for(int t=0; t<6; t++) fMeanTDC[t] = mean[t];
110 else for(int t=0; t<6; t++) fMeanTDC[t] = 0.;
112 //________________________________________________________________
113 void AliZDCTDCCalib::SetWidthTDC(Float_t* width)
115 if(width) for(int t=0; t<6; t++) fWidthTDC[t] = width[t];
116 else for(int t=0; t<6; t++) fWidthTDC[t] = 0.;