1 /**************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN. *
3 * All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this *
9 * software and its documentation strictly for non-commercial *
10 * purposes is hereby granted without fee, provided that the *
11 * above copyright notice appears in all copies and that both *
12 * the copyright notice and this permission notice appear in *
13 * the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It *
15 * is provided "as is" without express or implied warranty. *
16 **************************************************************/
18 //__________________________________________________________
20 // Map of per strip Float_t information
22 // Created Mon Nov 8 12:51:51 2004 by Christian Holm Christensen
24 #include "AliFMDFloatMap.h" //ALIFMDFLOATMAP_H
25 //__________________________________________________________
26 ClassImp(AliFMDFloatMap)
28 ; // This is here to keep Emacs for indenting the next line
30 //__________________________________________________________
31 AliFMDFloatMap::AliFMDFloatMap(const AliFMDFloatMap& other)
32 : AliFMDMap(other.fMaxDetectors,
39 fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
40 fData = new Float_t[fTotal];
41 for (size_t i = 0; i < fMaxDetectors * fMaxRings
42 * fMaxSectors * fMaxStrips; i++)
43 fData[i] = other.fData[i];
46 //__________________________________________________________
47 AliFMDFloatMap::AliFMDFloatMap(size_t maxDet,
51 : AliFMDMap(maxDet, maxRing, maxSec, maxStr),
56 // maxDet Maximum number of detectors
57 // maxRing Maximum number of rings per detector
58 // maxSec Maximum number of sectors per ring
59 // maxStr Maximum number of strips per sector
60 fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
61 fData = new Float_t[fTotal];
65 //__________________________________________________________
67 AliFMDFloatMap::operator=(const AliFMDFloatMap& other)
69 // Assignment operator
70 fMaxDetectors = other.fMaxDetectors;
71 fMaxRings = other.fMaxRings;
72 fMaxSectors = other.fMaxSectors;
73 fMaxStrips = other.fMaxStrips;
74 fTotal = fMaxDetectors * fMaxRings * fMaxSectors * fMaxStrips;
75 if (fData) delete [] fData;
76 fData = new Float_t[fTotal];
77 for (size_t i = 0; i < fTotal; i++) fData[i] = other.fData[i];
81 //__________________________________________________________
83 AliFMDFloatMap::Reset(const Float_t& val)
86 for (size_t i = 0; i < fTotal; i++) fData[i] = val;
89 //__________________________________________________________
91 AliFMDFloatMap::operator()(UShort_t det,
102 // Returns appropriate data
103 return fData[CalcIndex(det, ring, sec, str)];
106 //__________________________________________________________
108 AliFMDFloatMap::operator()(UShort_t det,
119 // Returns appropriate data
120 return fData[CalcIndex(det, ring, sec, str)];
123 //__________________________________________________________