9 #include "CoralBase/Blob.h"
22 return StatusCode::SUCCESS;
31 if (writeHandle.isValid()) {
33 return StatusCode::SUCCESS;
41 return StatusCode::FAILURE;
43 writeHandle.addDependency(readHandle);
56 std::unique_ptr<LArCalibLineMapping> calibLineMap=std::make_unique<LArCalibLineMapping>(onlineID);
63 const uint32_t* pBlobCalib=
static_cast<const uint32_t*
>(blobCalib.startingAddress());
67 onlHashToCalibLines.resize(chanMax);
71 unsigned totCalibLines=0;
72 for (;blobIdx<
nEntries && chanIdx<chanMax;++chanIdx) {
73 const unsigned nCalibLines=pBlobCalib[blobIdx++];
74 totCalibLines+=nCalibLines;
76 msg(MSG::ERROR) <<
"Found unresonable large number of calib lines (" << nCalibLines <<
") for channel hash " << chanIdx <<
endmsg;
77 return StatusCode::FAILURE;
79 onlHashToCalibLines[chanIdx].clear();
80 for (
unsigned i=0;
i<nCalibLines && blobIdx<
nEntries;++
i) {
81 onlHashToCalibLines[chanIdx].emplace_back(pBlobCalib[blobIdx++]);
84 msg() << MSG::INFO <<
"Done reading readout/calibration line mapping." <<
endmsg;
85 ATH_MSG_DEBUG(
"BlobIdx=" << blobIdx<<
", chanIdx=" << chanIdx <<
", totCalibLines=" << totCalibLines);
88 if(writeHandle.record(std::move(calibLineMap)).isFailure()) {
89 ATH_MSG_ERROR(
"Could not record LArCalibLineMapping object with "
91 <<
" with EventRange " << writeHandle.getRange()
92 <<
" into Conditions Store");
93 return StatusCode::FAILURE;
95 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
97 return StatusCode::SUCCESS;