b0f5e3fc |
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 | #include <TMath.h> |
17 | |
18 | #include "AliITSgeom.h" |
19 | #include "AliITSresponseSDD.h" |
20 | #include "AliITS.h" |
21 | #include "AliRun.h" |
22 | |
23 | class AliITS; |
24 | |
25 | //___________________________________________ |
26 | ClassImp(AliITSresponseSDD) |
27 | |
28 | AliITSresponseSDD::AliITSresponseSDD() |
29 | { |
30 | // constructor |
31 | SetMaxAdc(); |
32 | SetDiffCoeff(); |
33 | SetQref(); |
34 | SetDriftSpeed(); |
35 | // SetClock(); |
36 | SetNoiseParam(); |
37 | SetMagicValue(); |
38 | SetMinVal(); |
39 | SetParamOptions(); |
40 | SetZeroSupp(); |
41 | SetDataType(); |
42 | SetFilenames(); |
43 | SetOutputOption(); |
44 | |
45 | } |
46 | |
47 | //__________________________________________________________________________ |
48 | AliITSresponseSDD::AliITSresponseSDD(const AliITSresponseSDD &source){ |
49 | // Copy Constructor |
a6095b6a |
50 | Int_t i; |
b0f5e3fc |
51 | if(&source == this) return; |
a6095b6a |
52 | for(i=0,i<8,i++){this->fCPar[i] = source.fCPar[i]}; |
b0f5e3fc |
53 | this->fNoise = source.fNoise; |
54 | this->fBaseline = source.fBaseline; |
55 | this->fTopValue = source.fTopValue; |
56 | this->fTemperature = source.fTemperature; |
57 | this->fDriftSpeed = source.fDriftSpeed; |
58 | this->fMaxAdc = source.fMaxAdc; |
59 | this->fDiffCoeff = source.fDiffCoeff; |
60 | this->fQref = source.fQref; |
61 | this->fZeroSuppFlag = source.fZeroSuppFlag; |
62 | this->fMinVal = source.fMinVal; |
63 | this->fWrite = source.fWrite; |
64 | this->fOption = source.fOption; |
65 | this->fParam1 = source.fParam1; |
66 | return; |
67 | } |
68 | |
69 | //_________________________________________________________________________ |
70 | AliITSresponseSDD& |
71 | AliITSresponseSDD::operator=(const AliITSresponseSDD &source) { |
72 | // Assignment operator |
a6095b6a |
73 | Int_t i; |
b0f5e3fc |
74 | if(&source == this) return *this; |
a6095b6a |
75 | for(i=0,i<8,i++){this->fCPar[i] = source.fCPar[i]}; |
b0f5e3fc |
76 | this->fNoise = source.fNoise; |
77 | this->fBaseline = source.fBaseline; |
78 | this->fTopValue = source.fTopValue; |
79 | this->fTemperature = source.fTemperature; |
80 | this->fDriftSpeed = source.fDriftSpeed; |
81 | this->fMaxAdc = source.fMaxAdc; |
82 | this->fDiffCoeff = source.fDiffCoeff; |
83 | this->fQref = source.fQref; |
84 | this->fZeroSuppFlag = source.fZeroSuppFlag; |
85 | this->fMinVal = source.fMinVal; |
86 | this->fWrite = source.fWrite; |
87 | this->fOption = source.fOption; |
88 | this->fParam1 = source.fParam1; |
89 | return *this; |
90 | } |
91 | |
92 | void AliITSresponseSDD::SetCompressParam(Int_t cp[8]) |
93 | { |
94 | // set compression param |
95 | Int_t i; |
96 | for(i=0; i<8; i++) { |
97 | fCPar[i]=cp[i]; |
98 | //printf("\n CompressPar %d %d \n",i,fCPar[i]); |
99 | |
100 | } |
101 | } |
102 | void AliITSresponseSDD::GiveCompressParam(Int_t cp[8]) |
103 | { |
104 | // give compression param |
105 | Int_t i; |
106 | for(i=0; i<8; i++) { |
107 | cp[i]=fCPar[i]; |
108 | } |
109 | } |
110 | //______________________________________________________________________________ |
111 | void AliITSresponseSDD::Streamer(TBuffer &R__b) |
112 | { |
113 | // Stream an object of class AliITSresponseSDD. |
114 | |
115 | if (R__b.IsReading()) { |
116 | Version_t R__v = R__b.ReadVersion(); if (R__v) { } |
117 | AliITSresponse::Streamer(R__b); |
118 | R__b.ReadStaticArray(fCPar); |
119 | R__b >> fNoise; |
120 | R__b >> fBaseline; |
121 | R__b >> fTopValue; |
122 | R__b >> fTemperature; |
123 | R__b >> fDriftSpeed; |
124 | R__b >> fMaxAdc; |
125 | R__b >> fDiffCoeff; |
126 | R__b >> fQref; |
127 | R__b >> fZeroSuppFlag; |
128 | R__b >> fMinVal; |
129 | R__b >> fWrite; |
130 | //R__b.ReadArray(fOption); // Not to be printed out? |
131 | //R__b.ReadArray(fParam1); // Not to be printed out? |
132 | //R__b.ReadArray(fParam2); // Not to be printed out? |
133 | fDataType.Streamer(R__b); |
134 | fFileName1.Streamer(R__b); |
135 | fFileName2.Streamer(R__b); |
136 | fFileName3.Streamer(R__b); |
137 | } else { |
138 | R__b.WriteVersion(AliITSresponseSDD::IsA()); |
139 | AliITSresponse::Streamer(R__b); |
140 | R__b.WriteArray(fCPar, 8); |
141 | R__b << fNoise; |
142 | R__b << fBaseline; |
143 | R__b << fTopValue; |
144 | R__b << fTemperature; |
145 | R__b << fDriftSpeed; |
146 | R__b << fMaxAdc; |
147 | R__b << fDiffCoeff; |
148 | R__b << fQref; |
149 | R__b << fZeroSuppFlag; |
150 | R__b << fMinVal; |
151 | R__b << fWrite; |
152 | //R__b.WriteArray(fOption, __COUNTER__); // Not to be printed out? |
153 | //R__b.WriteArray(fParam1, __COUNTER__); // Not to be printed out? |
154 | //R__b.WriteArray(fParam2, __COUNTER__); // Not to be printed out? |
155 | fDataType.Streamer(R__b); |
156 | fFileName1.Streamer(R__b); |
157 | fFileName2.Streamer(R__b); |
158 | fFileName3.Streamer(R__b); |
159 | } |
160 | } |