29 return StatusCode::SUCCESS;
34 std::unique_ptr<CaloCellPedShift> pedShift=std::make_unique<CaloCellPedShift>(
m_cellId);
42 if (attrListColl->
size() == 0) {
46 const coral::AttributeList& attrList=attrListColl->
attributeList(0);
47 if (attrList[
"LBAvInstLumi"].isNull()) {
52 lumi=attrList[
"LBAvInstLumi"].data<
float>() *1e-3;
62 const size_t maxCells=
m_cellId->calo_cell_hash_max();
64 std::pair<unsigned,std::unique_ptr<const CaloCondBlobFlt> >blobCache{999999,
nullptr};
66 for (
size_t iCell=0;iCell<maxCells;++iCell) {
68 const unsigned int iCool =
m_caloCoolIdTool->getCoolChannelId(iCell,subHash);
69 if (iCool!=blobCache.first) {
70 const coral::AttributeList& attrList=pedShiftColl->
attributeList(iCool);
71 const coral::Blob& blob = attrList[
"CaloCondBlob16M"].data<coral::Blob>();
72 blobCache.first=iCool;
75 const size_t maxGain=
m_cellId->is_tile(iCell) ? 4 : 3;
76 for (
size_t iGain=0;iGain<maxGain;++iGain) {
77 const float value = blobCache.second->getCalib(subHash, iGain, lumi);
78 pedShift->setPedShift(iCell,iGain,value);
82 if(writeHandle.
record(std::move(pedShift)).isFailure()) {
83 ATH_MSG_ERROR(
"Could not record CaloCellPedShift object with "
85 <<
" with EventRange " << writeHandle.
getRange()
86 <<
" into Conditions Store");
87 return StatusCode::FAILURE;
89 ATH_MSG_INFO(
"recorded new " << writeHandle.
key() <<
" with range " << writeHandle.
getRange() <<
" into Conditions Store");
91 return StatusCode::SUCCESS;