ATLAS Offline Software
PixelDetectorElementStatusCloneTool.cxx
Go to the documentation of this file.
2 
4 {
6 }
7 
8 std::unique_ptr<InDet::SiDetectorElementStatus>
11  std::unique_ptr<InDet::SiDetectorElementStatus> element_status( createDetectorElementStatus(ctx, whandle));
12  std::vector<bool> &status=element_status->getElementStatus();
13  if (status.empty()) {
14  status.resize(m_pixelID->wafer_hash_max(),true );
15  }
16  std::vector<InDet::ChipFlags_t> &chip_status=element_status->getElementChipStatus();
17  if (chip_status.empty()) {
18  chip_status.resize(status.size(),0xffff);
19  }
20 
21  if (whandle) {
22  ATH_MSG_ERROR("PixelDetectorElementStatusCloneTool is not for use with conditions objects");
24  }
25 
26  return element_status;
27 }
InDet::SiDetectorElementStatus::getElementStatus
const std::vector< bool > & getElementStatus() const
Definition: SiDetectorElementStatus.h:116
PixelDetectorElementStatusCloneTool.h
PixelDetectorElementStatusCloneTool::getDetectorElementStatus
virtual std::unique_ptr< InDet::SiDetectorElementStatus > getDetectorElementStatus(const EventContext &ctx, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override
Definition: PixelDetectorElementStatusCloneTool.cxx:9
PixelDetectorElementStatusToolBase::m_pixelID
const PixelID * m_pixelID
Definition: PixelDetectorElementStatusToolBase.h:39
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IDetectorElementStatusTool::getInvalidRange
static EventIDRange getInvalidRange()
Definition: IDetectorElementStatusTool.h:33
PixelDetectorElementStatusToolBase::createDetectorElementStatus
std::unique_ptr< InDet::SiDetectorElementStatus > createDetectorElementStatus(const EventContext &ctx, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const
Create a new detector element status element container.
Definition: PixelDetectorElementStatusToolBase.cxx:34
PixelDetectorElementStatusCloneTool::initialize
virtual StatusCode initialize() override
Definition: PixelDetectorElementStatusCloneTool.cxx:3
PixelID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: PixelID.cxx:907
InDet::SiDetectorElementStatus::getElementChipStatus
const std::vector< ChipFlags_t > & getElementChipStatus() const
Definition: SiDetectorElementStatus.h:118
merge.status
status
Definition: merge.py:17
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
PixelDetectorElementStatusToolBase::initialize
virtual StatusCode initialize() override
Definition: PixelDetectorElementStatusToolBase.cxx:15
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275