Line data Source code
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 : // Author: A. De Caro //
25 : // Email: decaro@sa.innf.it //
26 : // //
27 : ///////////////////////////////
28 :
29 : #include "AliTOFDCSmaps.h"
30 :
31 26 : ClassImp(AliTOFDCSmaps)
32 :
33 : ////////////////////////////////////////////////////////////////////////
34 : AliTOFDCSmaps::AliTOFDCSmaps() :
35 0 : TObject(),
36 0 : fTime(0)
37 0 : {
38 : //
39 : // default ctor
40 : //
41 0 : for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=-1;
42 :
43 0 : }
44 :
45 : ////////////////////////////////////////////////////////////////////////
46 : AliTOFDCSmaps::AliTOFDCSmaps(Int_t time, Short_t array[]) :
47 0 : TObject(),
48 0 : fTime(time)
49 0 : {
50 : //
51 : // ctor
52 : //
53 0 : for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=array[ii];
54 0 : }
55 :
56 : ////////////////////////////////////////////////////////////////////////
57 : AliTOFDCSmaps::AliTOFDCSmaps(const AliTOFDCSmaps & digit):
58 0 : TObject(digit),
59 0 : fTime(digit.fTime)
60 0 : {
61 : //
62 : // copy ctor
63 : //
64 0 : for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=digit.fArray[ii];
65 :
66 0 : }
67 :
68 : ////////////////////////////////////////////////////////////////////////
69 : AliTOFDCSmaps& AliTOFDCSmaps::operator=(const AliTOFDCSmaps & digit)
70 : {
71 : //
72 : // operator =
73 : //
74 :
75 0 : if (this == &digit)
76 0 : return *this;
77 :
78 0 : TObject::operator=(digit);
79 :
80 0 : fTime = digit.fTime;
81 0 : for (Int_t ii=0; ii<91*96*18; ii++) fArray[ii]=digit.fArray[ii];
82 0 : return *this;
83 :
84 0 : }
85 :
86 : ////////////////////////////////////////////////////////////////////////
87 : AliTOFDCSmaps::~AliTOFDCSmaps()
88 0 : {
89 : //
90 : // dtor
91 : //
92 0 : }
93 :
94 : ////////////////////////////////////////////////////////////////////////
95 : void AliTOFDCSmaps::Update(AliTOFDCSmaps *object)
96 : {
97 : //
98 : // Update aready exsisting AliTOFDCSmap
99 : // with the value of the passed object
100 : //
101 :
102 : Short_t value = -1;
103 :
104 0 : for (Int_t ii=0; ii<91*96*18; ii++) {
105 0 : value = object->GetCellValue(ii);
106 0 : if (fArray[ii]==-1 && value!=-1)
107 0 : fArray[ii] = value;
108 : }
109 :
110 0 : }
111 :
|