226{
228
229 static std::atomic<bool>
first =
true;
230 if (!first) {
232 return StatusCode::SUCCESS;
233 }
235
237 typedef CONTAINER::chan_const_iterator chan_const_iterator;
238 typedef CONTAINER::iov_const_iterator iov_const_iterator;
239
242
243 const LArRampMC* ramps = 0;
244
245
247 const ILArRamp* iramps = 0;
249 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSingleGroup " );
250 ramps = dynamic_cast<const LArRampMC*>(iramps);
251 if (!ramps) {
252 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
253 return( StatusCode::FAILURE);
254 }
255 }
256 else {
257 LArRampMC* ramps_rw = new LArRampMC;
258 ramps = ramps_rw;
259 ATH_MSG_INFO (
"Created ramps for LArRampsSingleGroup " );
262 }
263
266
268
269 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSingleGroup") );
270 const ILArRamp* iramps = 0;
272
274 if (ramps) {
277 }
279
280 LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
281 if (!ramps_rw) {
283 return StatusCode::FAILURE;
284 }
287 }
292 }
293
294
296 const ILArRamp* iramps = 0;
298 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSubDetectorGrouping " );
299 ramps = dynamic_cast<const LArRampMC*>(iramps);
300 if (!ramps) {
301 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
302 return( StatusCode::FAILURE);
303 }
304 }
305 else {
306 LArRampMC* ramps_rw = new LArRampMC;
307 ramps = ramps_rw;
308
310 }
311
314
316
317 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
318 const ILArRamp* iramps = 0;
321 if (ramps) {
324 }
326
327 LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
328 if (!ramps_rw) {
330 return StatusCode::FAILURE;
331 }
334 }
339 }
340
341
343 const ILArRamp* iramps = 0;
345 ATH_MSG_INFO (
"Retrieved ramps for LArRampsFeedThroughGrouping " );
346 ramps = dynamic_cast<const LArRampMC*>(iramps);
347 if (!ramps) {
348 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
349 return( StatusCode::FAILURE);
350 }
351 }
352 else {
353 LArRampMC* ramps_rw = new LArRampMC;
354 ramps = ramps_rw;
357 }
358
361
363
364 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
365 const ILArRamp* iramps = 0;
368 if (ramps) {
371 }
373
374 LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
375 if (!ramps_rw) {
377 return StatusCode::FAILURE;
378 }
381 }
386 }
387
388 ATH_MSG_DEBUG (
"Statistics for LArRampsFeedThroughGrouping " );
391
392 iov_const_iterator iovIt = ramps->
iov_begin();
393 iov_const_iterator iovEnd = ramps->
iov_end ();
394 msg() << MSG::DEBUG <<
"IOVs found: ";
395 for (; iovIt != iovEnd; ++iovIt) {
396 msg() << MSG::DEBUG << (*iovIt) <<
", ";
397 }
399
400 chan_const_iterator chIt = ramps->
chan_begin();
401 chan_const_iterator chEnd = ramps->
chan_end ();
402 for (; chIt != chEnd; ++chIt) {
405 }
406
407 for (
unsigned int i = 0;
i < ramps->
nGroups(); ++
i) {
410 }
412
413 for (
unsigned int i = 0;
i < ramps->
nGains(); ++
i) {
416 }
421
422
424
425 return StatusCode::SUCCESS;
426}
void setGroupingType(GroupingType type)
allow group type to be set externally - need to (re)initialize after setting grouping type
void removeConditions()
Remove conditions leaving the corrections - may be needed to only write out the corrections when both...
iov_const_iterator iov_begin() const
Access to IOVs via iterators - from MultChanCollection.
unsigned int nGroups() const
Number of groups - minimum is 2 (1 correction group, 1 FEB ID group)
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators - from MultChanCollection.
iov_const_iterator iov_end() const
unsigned int conditionsPerGain(unsigned int gain) const
Statistics: number of conditions per gain.
unsigned int conditionsPerChannel(unsigned int coolChannel) const
Statistics: number of conditions per COOL channel.
chan_size_type chan_size() const
number of channels - from MultChanCollection
unsigned int conditionsPerGroup(unsigned int group) const
Statistics: number of conditions per group.
iov_size_type iov_size() const
number of IOVs - from MultChanCollection
unsigned int totalNumberOfCorrections() const
Statistics: total number of corrections.
unsigned int totalNumberOfConditions() const
Statistics: total number of conditions.
chan_const_iterator chan_end() const
unsigned int nGains() const
Number of gain values.
StatusCode testChannelSet()
StatusCode createCompareObjects()
LArRampComplete::CONTAINER CONTAINER
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.