21 return StatusCode::SUCCESS;
28 <<
". In theory this should not be called, but may happen"
29 <<
" if multiple concurrent events are being processed out of order.");
30 return StatusCode::SUCCESS;
34 std::unique_ptr<NswAsBuiltDbData> writeCdo{std::make_unique<NswAsBuiltDbData>()};
39 ATH_MSG_ERROR(
"Null pointer to the read MM/ASBUILTPARAMS conditions object");
40 return StatusCode::FAILURE;
44 <<
" ->size()= " << readHandle->size());
45 unsigned int nLines{0};
47 const coral::AttributeList& atr = itr->second;
48 const std::string
data{*(
static_cast<const std::string*
>((atr[
"data"]).addressOfData()))};
49 ATH_MSG_DEBUG(__FILE__<<
":"<<__LINE__<<
" data load is " <<
data <<
" FINISHED HERE ");
50 writeCdo->microMegaData = std::make_unique<NswAsBuilt::StripCalculator>();
51 writeCdo->microMegaData->parseJSON(
data);
55 ATH_MSG_FATAL(nLines <<
" data objects were loaded for MM/ASBUILTPARAMS! Expected only one for this validity range!");
56 return StatusCode::FAILURE;
60 ATH_MSG_INFO(
"Load micromega as-built constants from a JSON file");
62 if (!thefile.good()) {
64 return StatusCode::FAILURE;
66 std::stringstream buffer;
67 buffer << thefile.rdbuf();
68 writeCdo->microMegaData = std::make_unique<NswAsBuilt::StripCalculator>();
69 writeCdo->microMegaData->parseJSON(buffer.str());
72 if (!writeCdo->microMegaData) {
73 ATH_MSG_ERROR(
"No AsBuilt constants were loaded. Please check the algorithm configucration");
74 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Base class for conditions algorithms.
ChanAttrListMap::const_iterator const_iterator
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
SG::WriteCondHandleKey< NswAsBuiltDbData > m_writeNswAsBuiltKey
Gaudi::Property< std::string > m_MmJsonPath
SG::ReadCondHandleKey< CondAttrListCollection > m_readMmAsBuiltParamsKey
NswAsBuiltCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
const DataObjID & fullKey() const
void addDependency(const EventIDRange &range)
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const