]>
Commit | Line | Data |
---|---|---|
b1d0c8c5 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /////////////////////////////////////////////////////////////// | |
17 | // // | |
18 | // Class for ZDC calibration -> LASER signal monitoring // | |
19 | // author: Chiara Oppedisano // | |
20 | // // | |
21 | /////////////////////////////////////////////////////////////// | |
22 | ||
23 | #include "AliZDCLaserCalib.h" | |
24 | ||
25 | ClassImp(AliZDCLaserCalib) | |
26 | ||
27 | //________________________________________________________________ | |
28 | AliZDCLaserCalib::AliZDCLaserCalib(): | |
29 | TNamed() | |
30 | { | |
31 | Reset(); | |
32 | } | |
33 | ||
34 | //________________________________________________________________ | |
35 | AliZDCLaserCalib::AliZDCLaserCalib(const char* name): | |
36 | TNamed() | |
37 | { | |
38 | // Constructor | |
39 | TString namst = "Calib_"; | |
40 | namst += name; | |
41 | SetName(namst.Data()); | |
42 | SetTitle(namst.Data()); | |
43 | Reset(); | |
44 | for(Int_t i=0; i<2; i++){ | |
45 | fReferenceValue[i] = 0.; | |
46 | fSector[i] = 0; | |
47 | fGain[i] = 0; | |
48 | fPMRefValue[i] = 0.; | |
49 | fPMRefWidth[i] = 0.; | |
50 | } | |
51 | ||
52 | ||
53 | } | |
54 | ||
55 | //________________________________________________________________ | |
56 | AliZDCLaserCalib::AliZDCLaserCalib(const AliZDCLaserCalib& calibda) : | |
57 | TNamed(calibda) | |
58 | { | |
59 | // Copy constructor | |
60 | SetName(calibda.GetName()); | |
61 | SetTitle(calibda.GetName()); | |
62 | Reset(); | |
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); | |
69 | } | |
70 | } | |
71 | ||
72 | //________________________________________________________________ | |
73 | AliZDCLaserCalib &AliZDCLaserCalib::operator =(const AliZDCLaserCalib& calibda) | |
74 | { | |
75 | // assignment operator | |
76 | SetName(calibda.GetName()); | |
77 | SetTitle(calibda.GetName()); | |
78 | Reset(); | |
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); | |
85 | } | |
86 | ||
87 | return *this; | |
88 | } | |
89 | ||
90 | //________________________________________________________________ | |
91 | AliZDCLaserCalib::~AliZDCLaserCalib() | |
92 | { | |
93 | } | |
94 | ||
95 | //________________________________________________________________ | |
96 | void AliZDCLaserCalib::Reset() | |
97 | { | |
98 | // 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)); | |
104 | } | |
105 | ||
106 | ||
107 | //________________________________________________________________ | |
108 | void AliZDCLaserCalib::Print(Option_t *) const | |
109 | { | |
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]); | |
117 | } | |
118 | printf(" ***************************************************************\n\n"); | |
119 | } |