49{
51
53
54
55
57
58 const LArPedestalComplete* PedestalIN;
59 LArPedestalComplete* PedestalOUT;
61 PedestalOUT=const_cast<LArPedestalComplete*>(PedestalIN);
62
63 unsigned int n_tot_ped = 0;
64 unsigned int n_dup_ped = 0;
65
68 if ( ped_it == ped_it_e ) {
70 }
71 for ( ; ped_it!=ped_it_e; ped_it++) {
72 const HWIdentifier chid = ped_it.
channelId();
74 n_tot_ped++;
75 const LArPedestalP1& ped_t = PedestalOUT->
get(chid,
m_gainOUT);
77 n_dup_ped++;
82 } else {
84 <<
" in gain " <<
m_gainOUT <<
" exists! Not duplicating..." );
85 }
86 }
87 }
90 << " (" << n_dup_ped << "/" << n_tot_ped << " PS channels)" );
91 }
92
93
94
96
97 const LArRampComplete* RampIN = nullptr;
98 LArRampComplete* RampOUT = nullptr;
100 RampOUT=const_cast<LArRampComplete*>(RampIN);
101
102 bool undoCorr=false;
103
106 undoCorr=true;
108 }
110 float scaleRamp =
pow(10.,deltaGain);
112
113 unsigned int n_tot_ramp = 0;
114 unsigned int n_dup_ramp = 0;
115 unsigned nCorrChans=0;
116
119 if ( ramp_it == ramp_it_e ) {
121 }
122 for ( ; ramp_it!=ramp_it_e; ramp_it++) {
123 const HWIdentifier chid = ramp_it.
channelId();
125 n_tot_ramp++;
128 n_dup_ramp++;
129 const LArRampP1& ramp = RampIN->
get(chid,
m_gainIN);
130
132 LArRampP1 newramp;
135 for (
unsigned i=0;
i<
s;
i++) {
137 }
141 } else {
143 <<
" in gain " <<
m_gainOUT <<
" exists! Not duplicating..." );
144 }
145 }
146 }
147 if (undoCorr) {
150 }
151 else {
152
155 for (;cit!=cit_e;cit++) {
156 const HWIdentifier chid(cit->first);
158 const LArRampP1& ramp=cit->second;
159 const unsigned s = ramp.
m_vRamp.size();
160 LArRampP1 newramp;
163 for (
unsigned i=0;
i<
s;
i++) {
165 }
167 ++nCorrChans;
168 }
169 }
170 }
173 << " (" << n_dup_ramp << "/" << n_tot_ramp << " + " << nCorrChans << " PS channels)" );
174 }
175
176
177
179
180 const LArMphysOverMcalComplete* MphysMcaliIN = nullptr;
181 LArMphysOverMcalComplete* MphysMcaliOUT = nullptr;
183 MphysMcaliOUT=const_cast<LArMphysOverMcalComplete*>(MphysMcaliIN);
184
185 unsigned int n_tot_mpmc = 0;
186 unsigned int n_dup_mpmc = 0;
187
190 if ( mpmc_it == mpmc_it_e ) {
192 }
193 for ( ; mpmc_it!=mpmc_it_e; mpmc_it++) {
194 const HWIdentifier chid = mpmc_it.
channelId();
196 n_tot_mpmc++;
197 const LArSingleFloatP& mpmc_t = MphysMcaliOUT->
get(chid,
m_gainOUT);
199 n_dup_mpmc++;
200 const LArSingleFloatP& mpmc = MphysMcaliIN->
get(chid,
m_gainIN);
204 } else {
206 <<
" in gain " <<
m_gainOUT <<
" exists! Not duplicating..." );
207 }
208 }
209 }
212 << " (" << n_dup_mpmc << "/" << n_tot_mpmc << " PS channels)" );
213 }
214
215
216
218
219 const LArOFCComplete* OFCIN = nullptr;
220 LArOFCComplete* OFCOUT = nullptr;
222 OFCOUT=const_cast<LArOFCComplete*>(OFCIN);
223
224 unsigned int n_tot_ofc = 0;
225 unsigned int n_dup_ofc = 0;
226
229 if ( ofc_it == ofc_it_e ) {
231 }
232 for ( ; ofc_it!=ofc_it_e; ofc_it++) {
233 const HWIdentifier chid = ofc_it.
channelId();
235 n_tot_ofc++;
236
237
238
239
240
241
243 if (!vOFCa_t.size()) {
244
245 n_dup_ofc++;
250 } else {
252 <<
" in gain " <<
m_gainOUT <<
" exists! Not duplicating..." );
253
254 }
255 }
256 }
259 << " (" << n_dup_ofc << "/" << n_tot_ofc << " PS channels)" );
260 }
261
262
263
265
266 const LArShapeComplete* ShapeIN = nullptr;
267 LArShapeComplete* ShapeOUT = nullptr;
269 ShapeOUT=const_cast<LArShapeComplete*>(ShapeIN);
270
271 unsigned int n_tot_shape = 0;
272 unsigned int n_dup_shape = 0;
273
276 if ( shape_it == shape_it_e ) {
278 }
279 for ( ; shape_it!=shape_it_e; shape_it++) {
280 const HWIdentifier chid = shape_it.
channelId();
282 n_tot_shape++;
283
284
285
286
288 if (!vShape_t.size()) {
289
290 n_dup_shape++;
291 const LArShapeP2& shape = ShapeIN->
get(chid,
m_gainIN);
295 } else {
297 <<
" in gain " <<
m_gainOUT <<
" exists! Not duplicating..." );
298 }
299 }
300 }
303 << " (" << n_dup_shape << "/" << n_tot_shape << " PS channels)" );
304
305 }
306
308 return StatusCode::SUCCESS;
309}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
LArPedestalComplete::ConstConditionsMapIterator PedestalIt
LArMphysOverMcalComplete::ConstConditionsMapIterator MpMcIt
LArShapeComplete::ConstConditionsMapIterator ShapeIt
LArRampComplete::ConstConditionsMapIterator RampIt
LArOFCComplete::ConstConditionsMapIterator OFCIt
constexpr int pow(int base, int exp) noexcept
const ServiceHandle< StoreGateSvc > & detStore() const
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
value_type get_compact() const
Get the compact id.
HWIdentifier channelId() const
StatusCode insertCorrection(HWIdentifier id, const T &cond, unsigned int gain, bool corrChannel=true)
access to corrections -
bool correctionsApplied() const
Have corrections been applied?
void setPdata(const HWIdentifier id, const T &payload, unsigned int gain=0)
put payload in persistent data
StatusCode applyCorrections()
apply correction set
StatusCode undoCorrections()
undo corrections that have been already applied
ConstCorrectionIt undoCorrBegin(unsigned int gain) const
get iterator over the Undo-Vector for a certain gain
ConstCorrectionIt undoCorrEnd(unsigned int gain) const
ConstReference get(const HWIdentifier id, unsigned int gain=0) const
get data with online identifier
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
Subset::ConstCorrectionVecIt ConstCorrectionIt
virtual OFCRef_t OFC_a(const HWIdentifier &CellID, int gain, int tbin=0) const override
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
std::vector< float > m_vRamp
virtual ShapeRef_t Shape(const HWIdentifier &CellID, int gain, int tbin=0, int mode=0) const override
retrieve(aClass, aKey=None)