|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CoralBase/Blob.h"
21 return StatusCode::SUCCESS;
28 if (writeHandle.isValid()) {
29 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
30 <<
" In theory this should not be called, but may happen"
31 <<
" if multiple concurrent events are being processed out of order.");
32 return StatusCode::SUCCESS;
35 std::unique_ptr<NswPassivationDbData> writeCdo{std::make_unique<NswPassivationDbData>(
m_idHelperSvc->mmIdHelper())};
38 if (!inStream.good()) {
40 return StatusCode::FAILURE;
48 if(!readHandle.isValid()){
50 return StatusCode::FAILURE;
52 writeHandle.addDependency(readHandle);
53 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.fullKey() <<
" readCdo->size()= " << readHandle->size());
54 ATH_MSG_DEBUG(
"Range of input is " << readHandle.getRange() <<
", range of output is " << writeHandle.getRange());
57 unsigned int nObjs = 0;
59 itr != readHandle->end(); ++itr) {
62 const std::string&
data{*(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()))};
71 if (writeHandle.record(std::move(writeCdo)).isFailure()) {
72 ATH_MSG_FATAL(
"Could not record NswPassivationDbData " << writeHandle.key()
73 <<
" with EventRange " << writeHandle.getRange()
74 <<
" into Conditions Store");
75 return StatusCode::FAILURE;
77 ATH_MSG_DEBUG(
"Recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
79 return StatusCode::SUCCESS;
83 unsigned int nChns = 0;
84 for (
const auto &
kt :
json.items()) {
90 return StatusCode::FAILURE;
92 writeCdo.
setData(
channelId, jt[
"pcbPos"], jt[
"indiv"], jt[
"extra"], jt[
"position"]);
96 return StatusCode::SUCCESS;
StatusCode parseData(const nlohmann::json &json, NswPassivationDbData &writeCdo) const
char data[hepevt_bytes_allocation_ATLAS]
#define ATH_MSG_VERBOSE(x)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &) const override
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
void setData(const Identifier &chnlId, const int pcb, const float indiv, const float extra, const std::string &position)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< std::string > m_readFromJSON
StatusCode initialize(bool used=true)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
NswPassivationDbAlg(const std::string &name, ISvcLocator *pSvcLocator)
ChanAttrListMap::const_iterator const_iterator
readKey_t m_readKey_data_mm
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.