![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/EventIDRange.h"
23 return StatusCode::SUCCESS;
31 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.
fullKey() <<
" is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order.");
32 return StatusCode::SUCCESS;
36 std::unique_ptr<PixelDeadMapCondData> writeCdo(std::make_unique<PixelDeadMapCondData>());
38 const EventIDBase
start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0,
39 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
40 const EventIDBase
stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1,
41 EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
47 if (readCdo==
nullptr) {
49 return StatusCode::FAILURE;
52 if (not readHandle.
range(rangeW)) {
54 return StatusCode::FAILURE;
56 ATH_MSG_INFO(
"Size of AthenaAttributeList " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdo->
size());
59 for (
const auto & attrList : *readCdo) {
62 if (
payload.exists(
"data_array") and not
payload[
"data_array"].isNull()) {
63 const std::string &stringStatus =
payload[
"data_array"].data<std::string>();
65 for (
const auto & [
hash,
status] : hashStatusVector){
75 if (rangeW.stop().isValid() and rangeW.start()>rangeW.stop()) {
77 return StatusCode::FAILURE;
80 if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
81 ATH_MSG_FATAL(
"Could not record PixelDeadMapCondData " << writeHandle.
key() <<
" with EventRange " << rangeW <<
" into Conditions Store");
82 return StatusCode::FAILURE;
84 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.
key() <<
" with range " << rangeW <<
" into Conditions Store");
86 return StatusCode::SUCCESS;
const DataObjID & fullKey() const
std::vector< std::pair< int, int > > parseDeadMapString(const std::string &s)
bool range(EventIDRange &r)
bool empty() const
Test if the key is blank.
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
This class is a collection of AttributeLists where each one is associated with a channel number....
PixelDeadMapCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
An algorithm that can be simultaneously executed in multiple threads.
const DataObjID & fullKey() const
void setModuleStatus(const int chanNum, const int value)
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::WriteCondHandleKey< PixelDeadMapCondData > m_writeKey
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
void setChipStatus(const int chanNum, const int value)
virtual StatusCode initialize() override final
const std::string & key() const
StatusCode initialize(bool used=true)
size_type size() const
number of Chan/AttributeList pairs
coral::AttributeList AttributeList
const std::string & key() const