141 if (readCdo_DerRunPars == 0) {
143 return StatusCode::FAILURE;
146 auto writeCdoDerRunPars = std::make_unique<L1CaloDerivedRunParsContainer>();
148 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapDerRunPars;
149 if (readCdo_DerRunPars) {
150 ATH_MSG_DEBUG(
"AttrListCollection for Derivated Run Parameters= "<<readCdo_DerRunPars);
152 writeCdoDerRunPars->makeTransient(condAttrListCollectionMapDerRunPars);
156 std::string timingRegime ;
158 timingRegime = std::cbegin(*writeCdoDerRunPars)->timingRegime();
167 if (timingRegime ==
"Physics") {
170 else if (timingRegime ==
"Calib1") {
173 else if (timingRegime ==
"Calib2") {
178 "; must be one of Physics, Calib1, Calib2" );
179 return StatusCode::FAILURE;
187 if (readCdo_PprChanStrategy == 0) {
189 return StatusCode::FAILURE;
191 auto writeCdoPprChanStrategy = std::make_unique<L1CaloPprChanStrategyContainer>();
193 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapPprChanStrategy;
194 if (readCdo_PprChanStrategy) {
195 ATH_MSG_DEBUG(
"AttrListCollection for Ppr Chan Strategy= "<<readCdo_PprChanStrategy);
197 writeCdoPprChanStrategy->makeTransient(condAttrListCollectionMapPprChanStrategy);
208 for(
const auto&
it: *writeCdoPprChanStrategy){
209 if (
it.timingRegime() == timingRegime){
221 const std::string keyPprChanCalib= (*pprKeys)[
PPRCHANCALIB].key();
250 if (readCdo_DisTowers == 0) {
252 return StatusCode::FAILURE;
256 if (readCdo_PprChanCalib == 0) {
258 return StatusCode::FAILURE;
261 if (readCdo_PprChanDefaults == 0) {
263 return StatusCode::FAILURE;
266 if (readCdo_PpmFineTimeRefs == 0) {
268 return StatusCode::FAILURE;
272 if (readCdo_RunParameters == 0) {
274 return StatusCode::FAILURE;
277 if (readCdo_PpmDeadChannels == 0) {
279 return StatusCode::FAILURE;
283 if (readCdo_ReadoutConfig == 0) {
285 return StatusCode::FAILURE;
293 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandleDisTowers.fullKey() <<
" readCdo_DisTower->size()= " << readCdo_DisTowers->size());
294 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandleDerRunPars.fullKey() <<
" readCdo_DerRunPars->size()= " << readCdo_DerRunPars->size());
295 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePprChanCalib.fullKey() <<
" readCdo_PprChanCalib->size()= " << readCdo_PprChanCalib->size());
296 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePprChanDefaults.fullKey() <<
" readCdo_PprChanDefaults->size()= " << readCdo_PprChanDefaults->size());
297 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePpmFineTimeRefs.fullKey() <<
" readCdo_PpmFineTimeRefs->size()= " << readCdo_PpmFineTimeRefs->size());
298 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandleRunParameters.fullKey() <<
" readCdo_RunParameters->size()= " << readCdo_RunParameters->size());
299 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePprChanStrategy.fullKey() <<
" readCdo_PprChanStrategy->size()= " << readCdo_PprChanStrategy->size());
300 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePpmDeadChannels.fullKey() <<
" readCdo_PpmDeadChannels->size()= " << readCdo_PpmDeadChannels->size());
301 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandleReadoutConfig.fullKey() <<
" readCdo_ReadoutConfig->size()= " << readCdo_ReadoutConfig->size());
302 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandleReadoutConfigJSON.fullKey() <<
" readCdo_ReadoutConfigJSON->size()= " << readCdo_ReadoutConfigJSON->size());
307 auto writeCdoDisTowers = std::make_unique<L1CaloDisabledTowersContainer>();
308 auto writeCdoPprChanCalib = std::make_unique<L1CaloPprChanCalibContainer>();
309 auto writeCdoPprChanDefaults = std::make_unique<L1CaloPprChanDefaultsContainer>();
310 auto writeCdoPpmFineTimeRefs = std::make_unique<L1CaloPpmFineTimeRefsContainer>();
311 auto writeCdoRunParameters = std::make_unique<L1CaloRunParametersContainer>();
312 auto writeCdoPpmDeadChannels = std::make_unique<L1CaloPpmDeadChannelsContainer>();
313 auto writeCdoPprConditions = std::make_unique<L1CaloPprConditionsContainerRun2>();
314 auto writeCdoPprDisabledChannel = std::make_unique<L1CaloPprDisabledChannelContainerRun2>();
315 auto writeCdoReadoutConfig = std::make_unique<L1CaloReadoutConfigContainer>();
316 auto writeCdoReadoutConfigJSON = std::make_unique<L1CaloReadoutConfigContainerJSON>();
322 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapDisTowers;
323 if (readCdo_DisTowers) {
324 ATH_MSG_DEBUG(
"AttrListCollection for Disabled Towers= "<<readCdo_DisTowers);
326 writeCdoDisTowers->makeTransient(condAttrListCollectionMapDisTowers);
330 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapPprChanCalib;
331 if (readCdo_PprChanCalib) {
332 ATH_MSG_DEBUG(
"AttrListCollection for Ppr Channel Calib = "<<readCdo_PprChanCalib);
333 condAttrListCollectionMapPprChanCalib[keyPprChanCalib] = readCdo_PprChanCalib;
334 writeCdoPprChanCalib->makeTransient(condAttrListCollectionMapPprChanCalib);
341 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapPprChanDefaults;
342 if (readCdo_PprChanDefaults) {
343 ATH_MSG_DEBUG(
"AttrListCollection for Ppr Channel Defaults = "<<readCdo_PprChanDefaults);
345 writeCdoPprChanDefaults->makeTransient(condAttrListCollectionMapPprChanDefaults);
350 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapPpmFineTimeRefs;
351 if (readCdo_PpmFineTimeRefs) {
352 ATH_MSG_DEBUG(
"AttrListCollection for Ppm FineTime Refs = "<<readCdo_PpmFineTimeRefs);
354 writeCdoPpmFineTimeRefs->makeTransient(condAttrListCollectionMapPpmFineTimeRefs);
359 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapRunParameters;
360 if (readCdo_RunParameters) {
361 ATH_MSG_DEBUG(
"AttrListCollection for Run Parameters = "<<readCdo_RunParameters);
362 condAttrListCollectionMapRunParameters[
m_runParameters.
key() ] = readCdo_RunParameters;
363 writeCdoRunParameters->makeTransient(condAttrListCollectionMapRunParameters);
368 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapPpmDeadChannels;
369 if (readCdo_PpmDeadChannels) {
370 ATH_MSG_DEBUG(
"AttrListCollection for Ppm Dead Channels= "<<readCdo_PpmDeadChannels);
372 writeCdoPpmDeadChannels->makeTransient(condAttrListCollectionMapPpmDeadChannels);
376 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapReadoutConfig;
377 if (readCdo_ReadoutConfig) {
378 ATH_MSG_DEBUG(
"AttrListCollection for ReadoutConfig= "<<readCdo_ReadoutConfig);
379 condAttrListCollectionMapReadoutConfig[
m_readoutConfig.
key() ] = readCdo_ReadoutConfig;
380 writeCdoReadoutConfig->makeTransient(condAttrListCollectionMapReadoutConfig);
384 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapReadoutConfigJSON;
385 if (readCdo_ReadoutConfigJSON) {
386 ATH_MSG_DEBUG(
"AttrListCollection for ReadoutConfigJSON= "<<readCdo_ReadoutConfigJSON);
388 writeCdoReadoutConfigJSON->makeTransient(condAttrListCollectionMapReadoutConfigJSON);
393 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapDisableChannels;
394 condAttrListCollectionMapDisableChannels[keyPprChanCalib] = readCdo_PprChanCalib;
397 writeCdoPprDisabledChannel->makeTransient(condAttrListCollectionMapDisableChannels);
402 EventIDRange range_DisTowers;
403 if ( !readHandleDisTowers.range(range_DisTowers) ) {
404 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandleDisTowers.key());
405 return StatusCode::FAILURE;
408 ATH_MSG_DEBUG(
"Range of input is Disable Towers" << range_DisTowers);
410 EventIDRange range_DerRunPars;
411 if ( !readHandleDerRunPars.range(range_DerRunPars) ) {
412 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandleDerRunPars.key());
413 return StatusCode::FAILURE;
416 ATH_MSG_DEBUG(
"Range of input is DerRunPars" << range_DerRunPars);
419 EventIDRange range_PprChanCalib;
420 if ( !readHandlePprChanCalib.range(range_PprChanCalib) ) {
421 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePprChanCalib.key());
422 return StatusCode::FAILURE;
425 ATH_MSG_DEBUG(
"Range of input is PprChanCalib" << range_PprChanCalib);
430 EventIDRange range_PprChanDefaults;
431 if ( !readHandlePprChanDefaults.range(range_PprChanDefaults) ) {
432 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePprChanDefaults.key());
433 return StatusCode::FAILURE;
436 ATH_MSG_DEBUG(
"Range of input is PprChanDefaults" << range_PprChanDefaults);
437 writeHandlePprConditions.addDependency( range_PprChanDefaults );
440 EventIDRange range_PpmFineTimeRefs;
441 if ( !readHandlePpmFineTimeRefs.range(range_PpmFineTimeRefs) ) {
442 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePpmFineTimeRefs.key());
443 return StatusCode::FAILURE;
446 ATH_MSG_DEBUG(
"Range of input is PpmFineTimeRefs" << range_PpmFineTimeRefs);
450 EventIDRange range_RunParameters;
451 if ( !readHandleRunParameters.range(range_RunParameters) ) {
452 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandleRunParameters.key());
453 return StatusCode::FAILURE;
456 ATH_MSG_DEBUG(
"Range of input is RunParameters" << range_RunParameters);
459 EventIDRange range_PprChanStrategy;
460 if ( !readHandlePprChanStrategy.range(range_PprChanStrategy) ) {
461 ATH_MSG_DEBUG(
"Failed to retrieve validity range for " << readHandlePprChanStrategy.key());
462 return StatusCode::FAILURE;
465 ATH_MSG_DEBUG(
"Range of input is PprChanStrategy" << range_PprChanStrategy);
468 EventIDRange range_PpmDeadChannels;
469 if ( !readHandlePpmDeadChannels.range(range_PpmDeadChannels) ) {
470 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePpmDeadChannels.key());
471 return StatusCode::FAILURE;
473 ATH_MSG_DEBUG(
"Range of input is PpmDeadChannels" << range_PpmDeadChannels);
477 EventIDRange range_ReadoutConfig;
478 if ( !readHandleReadoutConfig.range(range_ReadoutConfig) ) {
479 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandleReadoutConfig.key());
480 return StatusCode::FAILURE;
482 ATH_MSG_DEBUG(
"Range of input is Readout Config" << range_ReadoutConfig);
485 EventIDRange range_ReadoutConfigJSON;
486 if ( !readHandleReadoutConfigJSON.range(range_ReadoutConfigJSON) ) {
487 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandleReadoutConfigJSON.key());
488 return StatusCode::FAILURE;
490 ATH_MSG_DEBUG(
"Range of input is Readout Config JSON" << range_ReadoutConfigJSON);
495 writeHandlePprDisabledChannel.addDependency(readHandlePpmDeadChannels);
496 writeHandlePprDisabledChannel.addDependency(readHandlePprChanCalib);
497 writeHandlePprDisabledChannel.addDependency(readHandleDisTowers);
504 if (writeHandleDisTowers.record(range_DisTowers, std::move(writeCdoDisTowers)).isFailure()) {
505 ATH_MSG_FATAL(
"Could not record " << writeHandleDisTowers.key()
506 <<
" with EventRange " << range_DisTowers
507 <<
" into Conditions Store");
508 return StatusCode::FAILURE;
512 if (writeHandleDerRunPars.record(range_DerRunPars, std::move(writeCdoDerRunPars)).isFailure()) {
513 ATH_MSG_FATAL(
"Could not record " << writeHandleDerRunPars.key()
514 <<
" with EventRange " << range_DerRunPars
515 <<
" into Conditions Store");
516 return StatusCode::FAILURE;
520 if (writeHandlePprChanCalib.record(range_PprChanCalib, std::move(writeCdoPprChanCalib)).isFailure()) {
521 ATH_MSG_FATAL(
"Could not record " << writeHandlePprChanCalib.key()
522 <<
" with EventRange " << range_PprChanCalib
523 <<
" into Conditions Store");
524 return StatusCode::FAILURE;
530 if (writeHandlePprChanDefaults.record(range_PprChanDefaults, std::move(writeCdoPprChanDefaults)).isFailure()) {
531 ATH_MSG_FATAL(
"Could not record " << writeHandlePprChanDefaults.key()
532 <<
" with EventRange " << range_PprChanDefaults
533 <<
" into Conditions Store");
534 return StatusCode::FAILURE;
538 if (writeHandlePpmFineTimeRefs.record(range_PpmFineTimeRefs, std::move(writeCdoPpmFineTimeRefs)).isFailure()) {
539 ATH_MSG_FATAL(
"Could not record " << writeHandlePpmFineTimeRefs.key()
540 <<
" with EventRange " << range_PpmFineTimeRefs
541 <<
" into Conditions Store");
542 return StatusCode::FAILURE;
547 if (writeHandleRunParameters.record(range_RunParameters, std::move(writeCdoRunParameters)).isFailure()) {
548 ATH_MSG_FATAL(
"Could not record " << writeHandleRunParameters.key()
549 <<
" with EventRange " << range_RunParameters
550 <<
" into Conditions Store");
551 return StatusCode::FAILURE;
556 if (writeHandlePprChanStrategy.record(range_PprChanStrategy, std::move(writeCdoPprChanStrategy)).isFailure()) {
557 ATH_MSG_FATAL(
"Could not record " << writeHandlePprChanStrategy.key()
558 <<
" with EventRange " << range_PprChanStrategy
559 <<
" into Conditions Store");
560 return StatusCode::FAILURE;
565 if (writeHandlePpmDeadChannels.record(range_PpmDeadChannels, std::move(writeCdoPpmDeadChannels)).isFailure()) {
566 ATH_MSG_FATAL(
"Could not record " << writeHandlePpmDeadChannels.key()
567 <<
" with EventRange " << range_PpmDeadChannels
568 <<
" into Conditions Store");
569 return StatusCode::FAILURE;
573 if (writeHandleReadoutConfig.record(range_ReadoutConfig, std::move(writeCdoReadoutConfig)).isFailure()) {
574 ATH_MSG_FATAL(
"Could not record " << writeHandleReadoutConfig.key()
575 <<
" with EventRange " << range_ReadoutConfig
576 <<
" into Conditions Store");
577 return StatusCode::FAILURE;
582 if (writeHandleReadoutConfigJSON.record(range_ReadoutConfigJSON, std::move(writeCdoReadoutConfigJSON)).isFailure()) {
583 ATH_MSG_FATAL(
"Could not record " << writeHandleReadoutConfigJSON.key()
584 <<
" with EventRange " << range_ReadoutConfigJSON
585 <<
" into Conditions Store");
586 return StatusCode::FAILURE;
592 if (writeHandlePprDisabledChannel.record(std::move(writeCdoPprDisabledChannel)).isFailure()) {
593 ATH_MSG_FATAL(
"Could not record " << writeHandlePprDisabledChannel.key()
594 <<
" into Conditions Store");
595 return StatusCode::FAILURE;
602 std::map<std::string, const CondAttrListCollection*> condAttrListCollectionMapCond;
606 const std::string keyPprChanCommon = (*pprKeys)[
PPRCHANCOMMON].key();
617 "; should be either HighMu or LowMu" );
618 return StatusCode::FAILURE;
620 const std::string keyPprChanStrategy = pprChanStrategy->
key();
625 ATH_MSG_DEBUG(
"PprChanStrategy folder " << keyPprChanStrategy);
635 if (readCdo_PprChanCommon == 0) {
637 return StatusCode::FAILURE;
640 if (readCdo_PprChanStrategy == 0) {
642 return StatusCode::FAILURE;
646 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePprChanCommon.fullKey() <<
" readCdo_PprChanCommon->size()= " << readCdo_PprChanCommon->size());
647 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandlePprChanStrategy.fullKey() <<
" readCdo_PprChanMu->size()= " << readCdo_PprChanStrategy->size());
649 condAttrListCollectionMapCond[ keyPprChanCommon ] = readCdo_PprChanCommon;
650 condAttrListCollectionMapCond[ keyPprChanStrategy ] = readCdo_PprChanStrategy;
653 writeCdoPprConditions->makeTransient(condAttrListCollectionMapCond);
656 EventIDRange range_PprChanCommon;
657 if ( !readHandlePprChanCommon.range(range_PprChanCommon) ) {
658 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePprChanCommon.key());
659 return StatusCode::FAILURE;
662 ATH_MSG_DEBUG(
"Range of input is PprChanCommon" << range_PprChanCommon);
663 writeHandlePprConditions.addDependency(range_PprChanCommon);
666 EventIDRange range_PprChanStrategy;
667 if ( !readHandlePprChanStrategy.range(range_PprChanStrategy) ) {
668 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandlePprChanStrategy.key());
669 return StatusCode::FAILURE;
672 ATH_MSG_DEBUG(
"Range of input is PprChanMu" << range_PprChanStrategy);
673 writeHandlePprConditions.addDependency(range_PprChanStrategy);
683 condAttrListCollectionMapCond[ keyPprChanCalib ] = readCdo_PprChanCalib;
685 writeCdoPprConditions->makeTransient(condAttrListCollectionMapCond);
686 writeHandlePprConditions.addDependency(range_PprChanCalib);
698 if (writeHandlePprConditions.record(std::move(writeCdoPprConditions)).isFailure()) {
699 ATH_MSG_FATAL(
"Could not record " << writeHandlePprConditions.key()
700 <<
" into Conditions Store");
701 return StatusCode::FAILURE;
710 ATH_MSG_DEBUG(
"recorded new " << writeHandleDisTowers.key() <<
" with range " << writeHandleDisTowers.getRange() <<
" into Conditions Store");
711 ATH_MSG_DEBUG(
"recorded new " << writeHandleDerRunPars.key() <<
" with range " << writeHandleDerRunPars.getRange() <<
" into Conditions Store");
712 ATH_MSG_DEBUG(
"recorded new " << writeHandlePprChanCalib.key() <<
" with range " << writeHandlePprChanCalib.getRange() <<
" into Conditions Store");
713 ATH_MSG_DEBUG(
"recorded new " << writeHandlePprChanDefaults.key() <<
" with range " << writeHandlePprChanDefaults.getRange() <<
" into Conditions Store");
714 ATH_MSG_DEBUG(
"recorded new " << writeHandlePpmFineTimeRefs.key() <<
" with range " << writeHandlePpmFineTimeRefs.getRange() <<
" into Conditions Store");
715 ATH_MSG_DEBUG(
"recorded new " << writeHandleRunParameters.key() <<
" with range " << writeHandleRunParameters.getRange() <<
" into Conditions Store");
716 ATH_MSG_DEBUG(
"recorded new " << writeHandlePprChanStrategy.key() <<
" with range " << writeHandlePprChanStrategy.getRange() <<
" into Conditions Store");
717 ATH_MSG_DEBUG(
"recorded new " << writeHandlePpmDeadChannels.key() <<
" with range " << writeHandlePpmDeadChannels.getRange() <<
" into Conditions Store");
718 ATH_MSG_DEBUG(
"recorded new " << writeHandlePprConditions.key() <<
" with range " << writeHandlePprConditions.getRange() <<
" into Conditions Store");
719 ATH_MSG_DEBUG(
"recorded new " << writeHandleReadoutConfig.key() <<
" with range " << writeHandleReadoutConfig.getRange() <<
" into Conditions Store");
720 ATH_MSG_DEBUG(
"recorded new " << writeHandleReadoutConfigJSON.key() <<
" with range " << writeHandleReadoutConfigJSON.getRange() <<
" into Conditions Store");
721 ATH_MSG_DEBUG(
"recorded new " << writeHandlePprDisabledChannel.key() <<
" with range " << writeHandlePprDisabledChannel.getRange() <<
" into Conditions Store");
725 return StatusCode::SUCCESS;