]>
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 -> ADC channels mapping // | |
19 | // author: Chiara Oppedisano // | |
20 | // // | |
21 | /////////////////////////////////////////////////////////////// | |
22 | ||
23 | #include "AliZDCChMap.h" | |
24 | ||
25 | ClassImp(AliZDCChMap) | |
26 | ||
27 | //________________________________________________________________ | |
28 | AliZDCChMap::AliZDCChMap(): | |
29 | TNamed() | |
30 | { | |
31 | Reset(); | |
32 | } | |
33 | ||
34 | //________________________________________________________________ | |
35 | AliZDCChMap::AliZDCChMap(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<48; i++){ | |
45 | fADCModule[i] = 0; | |
46 | fADCChannel[i] = 0; | |
47 | fDetector[i] = 0; | |
48 | fSector[i] = 0; | |
49 | } | |
50 | ||
51 | ||
52 | } | |
53 | ||
54 | //________________________________________________________________ | |
55 | AliZDCChMap::AliZDCChMap(const AliZDCChMap& calibda) : | |
56 | TNamed(calibda) | |
57 | { | |
58 | // Copy constructor | |
59 | SetName(calibda.GetName()); | |
60 | SetTitle(calibda.GetName()); | |
61 | Reset(); | |
62 | for(int t=0; t<48; t++){ | |
63 | fADCModule[t] = calibda.GetADCModule(t); | |
64 | fADCChannel[t] = calibda.GetADCChannel(t); | |
65 | fDetector[t] = calibda.GetDetector(t); | |
66 | fSector[t] = calibda.GetSector(t); | |
67 | } | |
68 | } | |
69 | ||
70 | //________________________________________________________________ | |
71 | AliZDCChMap &AliZDCChMap::operator =(const AliZDCChMap& calibda) | |
72 | { | |
73 | // assignment operator | |
74 | SetName(calibda.GetName()); | |
75 | SetTitle(calibda.GetName()); | |
76 | Reset(); | |
77 | for(int t=0; t<48; t++){ | |
78 | fADCModule[t] = calibda.GetADCModule(t); | |
79 | fADCChannel[t] = calibda.GetADCChannel(t); | |
80 | fDetector[t] = calibda.GetDetector(t); | |
81 | fSector[t] = calibda.GetSector(t); | |
82 | } | |
83 | ||
84 | return *this; | |
85 | } | |
86 | ||
87 | //________________________________________________________________ | |
88 | AliZDCChMap::~AliZDCChMap() | |
89 | { | |
90 | } | |
91 | ||
92 | //________________________________________________________________ | |
93 | void AliZDCChMap::Reset() | |
94 | { | |
95 | // Reset | |
96 | memset(fADCModule,0,48*sizeof(Int_t)); | |
97 | memset(fADCChannel,0,48*sizeof(Int_t)); | |
98 | memset(fDetector,0,48*sizeof(Int_t)); | |
99 | memset(fSector,0,48*sizeof(Int_t)); | |
100 | } | |
101 | ||
102 | ||
103 | //________________________________________________________________ | |
104 | void AliZDCChMap::Print(Option_t *) const | |
105 | { | |
106 | // Printing of calibration object | |
11b06725 | 107 | printf("\n\n\t ******************* AliZDCChMap object *******************\n\n"); |
b1d0c8c5 | 108 | for(Int_t i=0; i<48; i++) |
11b06725 | 109 | printf(" ADCmod. %d ch. %d -> detector %d sector %d\n", |
b1d0c8c5 | 110 | fADCModule[i], fADCChannel[i],fDetector[i], fSector[i]); |
11b06725 | 111 | printf("\n\n\t **********************************************************\n\n"); |
b1d0c8c5 | 112 | |
113 | } |