7#include "CoralBase/Blob.h"
20 return StatusCode::SUCCESS;
29 <<
" In theory this should not be called, but may happen"
30 <<
" if multiple concurrent events are being processed out of order.");
31 return StatusCode::SUCCESS;
34 auto writeCdo{std::make_unique<NswPassivationDbData>(
m_idHelperSvc->mmIdHelper())};
37 if (!inStream.good()) {
39 return StatusCode::FAILURE;
49 return StatusCode::FAILURE;
52 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdo->size()= " << readHandle->size());
56 unsigned int nObjs = 0;
58 itr != readHandle->end(); ++itr) {
60 const coral::AttributeList& atr = itr->second;
61 const std::string&
data{*(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()))};
70 if (writeHandle.
record(std::move(writeCdo)).isFailure()) {
72 <<
" with EventRange " << writeHandle.
getRange()
73 <<
" into Conditions Store");
74 return StatusCode::FAILURE;
76 ATH_MSG_DEBUG(
"Recorded new " << writeHandle.
key() <<
" with range " << writeHandle.
getRange() <<
" into Conditions Store");
78 return StatusCode::SUCCESS;
82 unsigned int nChns = 0;
83 for (
const auto &kt :
json.items()) {
84 nlohmann::json jt = kt.value();
86 Identifier channelId =
m_idHelperSvc->mmIdHelper().pcbID(
int(jt[
"stationName"]), jt[
"stationEta"], jt[
"stationPhi"], jt[
"multiLayer"], jt[
"gasGap"], jt[
"pcbPos"],
isValid);
89 return StatusCode::FAILURE;
91 writeCdo.
setData(channelId, jt[
"pcbPos"], jt[
"indiv"], jt[
"extra"], jt[
"position"]);
95 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
char data[hepevt_bytes_allocation_ATLAS]
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
ChanAttrListMap::const_iterator const_iterator
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
virtual StatusCode initialize() override
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual StatusCode execute(const EventContext &) const override
readKey_t m_readKey_data_mm
StatusCode parseData(const nlohmann::json &json, NswPassivationDbData &writeCdo) const
Gaudi::Property< std::string > m_readFromJSON
void setData(const Identifier &chnlId, const int pcb, const float indiv, const float extra, const std::string &position)
const DataObjID & fullKey() const
const EventIDRange & getRange()
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.