28 return StatusCode::SUCCESS;
33 std::unique_ptr<CaloCellPedShift> pedShift=std::make_unique<CaloCellPedShift>(
m_cellId);
41 if (attrListColl->
size() == 0) {
45 const coral::AttributeList& attrList=attrListColl->
attributeList(0);
46 if (attrList[
"LBAvInstLumi"].isNull()) {
51 lumi=attrList[
"LBAvInstLumi"].data<
float>() *1e-3;
61 const size_t maxCells=
m_cellId->calo_cell_hash_max();
63 std::pair<unsigned,std::unique_ptr<const CaloCondBlobFlt> >blobCache{999999,
nullptr};
65 for (
size_t iCell=0;iCell<maxCells;++iCell) {
67 const unsigned int iCool =
m_caloCoolIdTool->getCoolChannelId(iCell,subHash);
68 if (iCool!=blobCache.first) {
69 const coral::AttributeList& attrList=pedShiftColl->
attributeList(iCool);
70 const coral::Blob& blob = attrList[
"CaloCondBlob16M"].data<coral::Blob>();
71 blobCache.first=iCool;
74 const size_t maxGain=
m_cellId->is_tile(iCell) ? 4 : 3;
75 for (
size_t iGain=0;iGain<maxGain;++iGain) {
76 const float value = blobCache.second->getCalib(subHash, iGain, lumi);
77 pedShift->setPedShift(iCell,iGain,value);
81 if(writeHandle.
record(std::move(pedShift)).isFailure()) {
82 ATH_MSG_ERROR(
"Could not record CaloCellPedShift object with "
84 <<
" with EventRange " << writeHandle.
getRange()
85 <<
" into Conditions Store");
86 return StatusCode::FAILURE;
88 ATH_MSG_INFO(
"recorded new " << writeHandle.
key() <<
" with range " << writeHandle.
getRange() <<
" into Conditions Store");
90 return StatusCode::SUCCESS;