21#include "Identifier/Identifier.h"
26#include "GaudiKernel/EventIDRange.h"
45 return StatusCode::FAILURE;
53 return StatusCode::SUCCESS;
64 <<
". In theory this should not be called, but may happen"
65 <<
" if multiple concurrent events are being processed out of order.");
66 return StatusCode::SUCCESS;
70 std::unique_ptr<ITkStripCablingData> pCabling = std::make_unique<ITkStripCablingData>();
72 if (not inputFile.good()){
74 return StatusCode::FAILURE;
78 const int numEntries = pCabling->size();
79 ATH_MSG_DEBUG(numEntries <<
" entries were made to the identifier map.");
82 const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
83 const EventIDBase stop{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
84 const EventIDRange rangeW{start, stop};
85 if (writeHandle.
record(rangeW, std::move(pCabling)).isFailure()) {
87 <<
" with EventRange " << rangeW
88 <<
" into Conditions Store");
89 return StatusCode::FAILURE;
91 ATH_MSG_VERBOSE(
"recorded new conditions data object " << writeHandle.
key() <<
" with range " << rangeW <<
" into Conditions Store");
92 return (numEntries==0) ? (StatusCode::FAILURE) : (StatusCode::SUCCESS);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Fills an ITkStripCablingData object and records it in Storegate (based on ITkPixelCabling package)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
This is an Identifier helper class for the SCT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
const SCT_ID * m_idHelper
ITkStripCablingAlg(const std::string &name, ISvcLocator *svc)
std::string m_configFilePath
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteCondHandleKey< ITkStripCablingData > m_writeKey
virtual StatusCode initialize() override
const std::string & key() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())