]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFDCSmaps.cxx
Avoid numerical problems in calc. if eff. mass.
[u/mrichter/AliRoot.git] / TOF / AliTOFDCSmaps.cxx
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 /* $Id:  $ */
17
18 ///////////////////////////////
19 //                           //
20 // AliTOFDCSmaps class       //
21 // container for HV&&LV maps //
22 // as found during a run     //
23 //                           //
24 ///////////////////////////////
25
26 #include "AliTOFDCSmaps.h"
27
28 ClassImp(AliTOFDCSmaps)
29
30 ////////////////////////////////////////////////////////////////////////
31 AliTOFDCSmaps::AliTOFDCSmaps() :
32   TObject(),
33   fTime(0)
34 {
35   //
36   // default ctor
37   //
38   for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=-1;
39
40 }
41
42 ////////////////////////////////////////////////////////////////////////
43 AliTOFDCSmaps::AliTOFDCSmaps(Int_t time, Short_t array[]) :
44   TObject(),
45   fTime(time)
46 {
47   //
48   // ctor
49   //
50   for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=array[ii];
51 }
52
53 ////////////////////////////////////////////////////////////////////////
54 AliTOFDCSmaps::AliTOFDCSmaps(const AliTOFDCSmaps & digit):
55   TObject(digit),
56   fTime(digit.fTime)
57 {
58   // 
59   // copy ctor
60   //
61   for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=digit.fArray[ii];
62
63 }
64
65 ////////////////////////////////////////////////////////////////////////
66 AliTOFDCSmaps& AliTOFDCSmaps::operator=(const AliTOFDCSmaps & digit)
67 {
68   // 
69   // operator =
70   //
71
72   if (this == &digit)
73     return *this;
74
75   TObject::operator=(digit);
76
77   fTime = digit.fTime;
78   for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=digit.fArray[ii];
79   return *this;
80
81 }
82
83 ////////////////////////////////////////////////////////////////////////
84 AliTOFDCSmaps::~AliTOFDCSmaps()
85 {
86   //
87   // dtor
88   //
89 }
90
91 ////////////////////////////////////////////////////////////////////////
92 void AliTOFDCSmaps::Update(AliTOFDCSmaps *object)
93 {
94   //
95   //
96   //
97
98   Short_t value = -1;
99
100   for (Int_t ii=0; ii<91*96*18; ii++) {
101     value = object->GetCellValue(ii);
102     if (fArray[ii]==-1 && value!=-1)
103       fArray[ii] = value;
104   }
105
106 }
107