Line data Source code
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 : // Author : Z. Ahmed
17 : //
18 : #include "TNamed.h"
19 : #include "AliCDBEntry.h"
20 : #include "AliPMDMeanSm.h"
21 :
22 :
23 12 : ClassImp(AliPMDMeanSm)
24 :
25 0 : AliPMDMeanSm::AliPMDMeanSm()
26 0 : {
27 : // Default constructor
28 0 : Reset();
29 0 : }
30 : // ----------------------------------------------------------------- //
31 0 : AliPMDMeanSm::AliPMDMeanSm(const char* name)
32 0 : {
33 : //constructor
34 0 : TString namst = "Calib_";
35 0 : namst += name;
36 0 : SetName(namst.Data());
37 0 : SetTitle(namst.Data());
38 0 : Reset();
39 :
40 0 : }
41 : // ----------------------------------------------------------------- //
42 : AliPMDMeanSm::AliPMDMeanSm(const AliPMDMeanSm& meanda) :
43 0 : TNamed(meanda)
44 0 : {
45 : // copy constructor
46 0 : SetName(meanda.GetName());
47 0 : SetTitle(meanda.GetName());
48 0 : Reset();
49 0 : for(Int_t det = 0; det < kDet; det++)
50 : {
51 0 : for(Int_t smn = 0; smn < kModule; smn++)
52 : {
53 0 : fMeanSm[det][smn] = meanda.GetMeanSm(det,smn);
54 : }
55 : }
56 0 : }
57 : // ----------------------------------------------------------------- //
58 : AliPMDMeanSm &AliPMDMeanSm::operator =(const AliPMDMeanSm& meanda)
59 : {
60 : //asignment operator
61 0 : SetName(meanda.GetName());
62 0 : SetTitle(meanda.GetName());
63 0 : Reset();
64 0 : for(Int_t det = 0; det < kDet; det++)
65 : {
66 0 : for(Int_t smn = 0; smn < kModule; smn++)
67 : {
68 0 : fMeanSm[det][smn] = meanda.GetMeanSm(det,smn);
69 : }
70 : }
71 0 : return *this;
72 : }
73 : // ----------------------------------------------------------------- //
74 : AliPMDMeanSm::~AliPMDMeanSm()
75 0 : {
76 : //destructor
77 0 : }
78 : // ----------------------------------------------------------------- //
79 : void AliPMDMeanSm::Reset()
80 : {
81 : //memset(fgainfact ,1,2*24*48*96*sizeof(Float_t));
82 :
83 0 : for(Int_t det = 0; det < kDet; det++)
84 : {
85 0 : for(Int_t smn = 0; smn < kModule; smn++)
86 : {
87 0 : fMeanSm[det][smn] = 1.;
88 : }
89 : }
90 0 : }
91 : // ----------------------------------------------------------------- //
92 : Float_t AliPMDMeanSm:: GetMeanSm(Int_t det, Int_t smn) const
93 : {
94 0 : return fMeanSm[det][smn];
95 : }
96 : // ----------------------------------------------------------------- //
97 : void AliPMDMeanSm::SetMeanSm(Int_t det, Int_t smn, Float_t smmean)
98 : {
99 0 : fMeanSm[det][smn]= smmean;
100 0 : }
101 :
102 : // ----------------------------------------------------------------- //
103 : void AliPMDMeanSm::Print(Option_t *) const
104 : {
105 0 : printf("\n ######Mean Values of Super Modules are ####\n");
106 0 : for(Int_t det = 0; det < kDet; det++)
107 : {
108 0 : for(Int_t smn = 0; smn < kModule; smn++)
109 : {
110 : {
111 0 : printf("Gain[%d,%d]= %2.1f \n",det,smn,fMeanSm[det][smn]);
112 : }
113 0 : printf("\n");
114 : }
115 : }
116 0 : }
|