]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCChMap.cxx
Removing unuseful prints
[u/mrichter/AliRoot.git] / ZDC / AliZDCChMap.cxx
CommitLineData
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
25ClassImp(AliZDCChMap)
26
27//________________________________________________________________
28AliZDCChMap::AliZDCChMap():
29TNamed()
30{
31 Reset();
32}
33
34//________________________________________________________________
35AliZDCChMap::AliZDCChMap(const char* name):
36TNamed()
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++){
ba3863d5 45 fADCModule[i] = -1;
46 fADCChannel[i] = -1;
47 fDetector[i] = -1;
48 fSector[i] = -1;
aee13a2d 49 }
50 for(Int_t i=0; i<32; i++){
ba3863d5 51 fScalerChannel[i] = -1;
52 fScDetector[i] = -1;
53 fScSector[i] = -1;
b1d0c8c5 54 }
55
56
57}
58
59//________________________________________________________________
60AliZDCChMap::AliZDCChMap(const AliZDCChMap& calibda) :
61 TNamed(calibda)
62{
63 // Copy constructor
64 SetName(calibda.GetName());
65 SetTitle(calibda.GetName());
66 Reset();
67 for(int t=0; t<48; t++){
68 fADCModule[t] = calibda.GetADCModule(t);
69 fADCChannel[t] = calibda.GetADCChannel(t);
70 fDetector[t] = calibda.GetDetector(t);
71 fSector[t] = calibda.GetSector(t);
27afc0c8 72 if(t<32){
73 fScalerChannel[t] = calibda.GetScChannel(t);
74 fScDetector[t] = calibda.GetScDetector(t);
75 fScSector[t] = calibda.GetScSector(t);
76 }
b1d0c8c5 77 }
78}
79
80//________________________________________________________________
81AliZDCChMap &AliZDCChMap::operator =(const AliZDCChMap& calibda)
82{
83// assignment operator
84 SetName(calibda.GetName());
85 SetTitle(calibda.GetName());
86 Reset();
87 for(int t=0; t<48; t++){
88 fADCModule[t] = calibda.GetADCModule(t);
89 fADCChannel[t] = calibda.GetADCChannel(t);
90 fDetector[t] = calibda.GetDetector(t);
91 fSector[t] = calibda.GetSector(t);
27afc0c8 92 if(t<32){
93 fScalerChannel[t] = calibda.GetScChannel(t);
94 fScDetector[t] = calibda.GetScDetector(t);
95 fScSector[t] = calibda.GetScSector(t);
96 }
b1d0c8c5 97 }
98
99 return *this;
100}
101
102//________________________________________________________________
103AliZDCChMap::~AliZDCChMap()
104{
105}
106
107//________________________________________________________________
108void AliZDCChMap::Reset()
109{
110 // Reset
111 memset(fADCModule,0,48*sizeof(Int_t));
112 memset(fADCChannel,0,48*sizeof(Int_t));
113 memset(fDetector,0,48*sizeof(Int_t));
114 memset(fSector,0,48*sizeof(Int_t));
27afc0c8 115 memset(fScalerChannel,0,32*sizeof(Int_t));
116 memset(fScDetector,0,32*sizeof(Int_t));
117 memset(fScSector,0,32*sizeof(Int_t));
b1d0c8c5 118}
119
120
121//________________________________________________________________
122void AliZDCChMap::Print(Option_t *) const
123{
124 // Printing of calibration object
11b06725 125 printf("\n\n\t ******************* AliZDCChMap object *******************\n\n");
b1d0c8c5 126 for(Int_t i=0; i<48; i++)
27afc0c8 127 printf(" ADC - mod. %d ch. %d -> detector %d sector %d\n",
128 fADCModule[i], fADCChannel[i],fDetector[i], fSector[i]);
129 for(Int_t i=0; i<32; i++)
ba3863d5 130 if(fScalerChannel[i]!=-1)
131 printf(" SCALER - ch. %d -> detector %d sector %d\n",
132 fScalerChannel[i],fScDetector[i], fScSector[i]);
11b06725 133 printf("\n\n\t **********************************************************\n\n");
b1d0c8c5 134
135}