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 ///////////////////////////////////////////////////////////////
18 // Class for ZDC calibration -> LASER signal monitoring //
19 // author: Chiara Oppedisano //
21 ///////////////////////////////////////////////////////////////
23 #include "AliZDCLaserCalib.h"
25 ClassImp(AliZDCLaserCalib)
27 //________________________________________________________________
28 AliZDCLaserCalib::AliZDCLaserCalib():
34 //________________________________________________________________
35 AliZDCLaserCalib::AliZDCLaserCalib(const char* name):
39 TString namst = "Calib_";
41 SetName(namst.Data());
42 SetTitle(namst.Data());
44 for(Int_t i=0; i<2; i++){
45 fReferenceValue[i] = 0.;
55 //________________________________________________________________
56 AliZDCLaserCalib::AliZDCLaserCalib(const AliZDCLaserCalib& calibda) :
60 SetName(calibda.GetName());
61 SetTitle(calibda.GetName());
63 for(int t=0; t<2; t++){
64 fReferenceValue[t] = calibda.GetReferenceValue(t);
65 fSector[t] = calibda.GetSector(t);
66 fGain[t] = calibda.GetGain(t);
67 fPMRefValue[t] = calibda.GetPMRefValue(t);
68 fPMRefWidth[t] = calibda.GetPMRefWidth(t);
72 //________________________________________________________________
73 AliZDCLaserCalib &AliZDCLaserCalib::operator =(const AliZDCLaserCalib& calibda)
75 // assignment operator
76 SetName(calibda.GetName());
77 SetTitle(calibda.GetName());
79 for(int t=0; t<2; t++){
80 fReferenceValue[t] = calibda.GetReferenceValue(t);
81 fSector[t] = calibda.GetSector(t);
82 fGain[t] = calibda.GetGain(t);
83 fPMRefValue[t] = calibda.GetPMRefValue(t);
84 fPMRefWidth[t] = calibda.GetPMRefWidth(t);
90 //________________________________________________________________
91 AliZDCLaserCalib::~AliZDCLaserCalib()
95 //________________________________________________________________
96 void AliZDCLaserCalib::Reset()
99 memset(fReferenceValue,0,2*sizeof(Float_t));
100 memset(fSector,0,2*sizeof(Float_t));
101 memset(fGain,0,2*sizeof(Float_t));
102 memset(fPMRefValue,0,2*sizeof(Float_t));
103 memset(fPMRefWidth,0,2*sizeof(Float_t));
107 //________________________________________________________________
108 void AliZDCLaserCalib::Print(Option_t *) const
110 // Printing of calibration object
111 printf("\n\n ******************* AliZDCLaserCalib object *******************\n");
112 for(Int_t i=0; i<2; i++){
113 if(fSector[i]==1.) printf(" side C ->");
114 else if(fSector[i]==4.) printf(" side A->");
115 printf(" Ref.Values %1.2f Gain %1.0f",fReferenceValue[i], fGain[i]);
116 printf(" PMRefValue = %1.0f PMRefWidth = %1.0f\n",fPMRefValue[i],fPMRefWidth[i]);
118 printf(" ***************************************************************\n\n");