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 **************************************************************************/
19 #include "AliCDBEntry.h"
20 #include "AliPMDMeanSm.h"
23 ClassImp(AliPMDMeanSm)
25 AliPMDMeanSm::AliPMDMeanSm()
27 // Default constructor
30 // ----------------------------------------------------------------- //
31 AliPMDMeanSm::AliPMDMeanSm(const char* name)
34 TString namst = "Calib_";
36 SetName(namst.Data());
37 SetTitle(namst.Data());
41 // ----------------------------------------------------------------- //
42 AliPMDMeanSm::AliPMDMeanSm(const AliPMDMeanSm& meanda) :
46 SetName(meanda.GetName());
47 SetTitle(meanda.GetName());
49 for(Int_t det = 0; det < kDet; det++)
51 for(Int_t smn = 0; smn < kModule; smn++)
53 fMeanSm[det][smn] = meanda.GetMeanSm(det,smn);
57 // ----------------------------------------------------------------- //
58 AliPMDMeanSm &AliPMDMeanSm::operator =(const AliPMDMeanSm& meanda)
61 SetName(meanda.GetName());
62 SetTitle(meanda.GetName());
64 for(Int_t det = 0; det < kDet; det++)
66 for(Int_t smn = 0; smn < kModule; smn++)
68 fMeanSm[det][smn] = meanda.GetMeanSm(det,smn);
73 // ----------------------------------------------------------------- //
74 AliPMDMeanSm::~AliPMDMeanSm()
78 // ----------------------------------------------------------------- //
79 void AliPMDMeanSm::Reset()
81 //memset(fgainfact ,1,2*24*48*96*sizeof(Float_t));
83 for(Int_t det = 0; det < kDet; det++)
85 for(Int_t smn = 0; smn < kModule; smn++)
87 fMeanSm[det][smn] = 1.;
91 // ----------------------------------------------------------------- //
92 Float_t AliPMDMeanSm:: GetMeanSm(Int_t det, Int_t smn) const
94 return fMeanSm[det][smn];
96 // ----------------------------------------------------------------- //
97 void AliPMDMeanSm::SetMeanSm(Int_t det, Int_t smn, Float_t smmean)
99 fMeanSm[det][smn]= smmean;
102 // ----------------------------------------------------------------- //
103 void AliPMDMeanSm::Print(Option_t *) const
105 printf("\n ######Mean Values of Super Modules are ####\n");
106 for(Int_t det = 0; det < kDet; det++)
108 for(Int_t smn = 0; smn < kModule; smn++)
111 printf("Gain[%d,%d]= %2.1f \n",det,smn,fMeanSm[det][smn]);