6 #include "CoolKernel/IObject.h"
9 , ISvcLocator* pSvcLocator )
22 return StatusCode::SUCCESS;
34 if(writeHandle.isValid()) {
35 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
36 <<
". In theory this should not be called, but may happen"
37 <<
" if multiple concurrent events are being processed out of order.");
39 return StatusCode::SUCCESS;
42 std::unique_ptr<InDet::TRTPIDNN> writeCdo{std::make_unique<InDet::TRTPIDNN>()};
47 if (attrListColl==
nullptr or attrListColl->size() != 1) {
48 ATH_MSG_ERROR(
" Problem reading /TRT/Calib/PID_NN cond object");
49 return StatusCode::FAILURE;
53 const std::string
json = attrList[
"NN_config"].data<cool::String16M>();
54 if (StatusCode::SUCCESS != writeCdo->configure(
json)) {
56 return StatusCode::FAILURE;
62 if(!readHandle.range(rangeW)) {
63 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.key());
64 return StatusCode::FAILURE;
68 if(writeHandle.record(rangeW,std::move(writeCdo)).isFailure()) {
69 ATH_MSG_ERROR(
"Could not record InDet::TRTPIDNN " << writeHandle.key()
70 <<
" with EventRange " << rangeW
71 <<
" into Conditions Store");
72 return StatusCode::FAILURE;
75 ATH_MSG_INFO(
"Recorded InDet::TRTPIDNN " << writeHandle.key()
76 <<
" with EventRange " << rangeW
77 <<
" into Conditions Store");
80 return StatusCode::SUCCESS;