|
ATLAS Offline Software
|
Go to the documentation of this file.
33 throw std::runtime_error(
"mergeChannelData<MdtDigit>() called by a wrong parent algorithm? Must be MdtOverlay.");
36 int sig_tdc = signalDigit.
tdc();
37 int bkg_tdc = bkgDigit.
tdc();
41 if (std::abs(sig_tdc - bkg_tdc) >
parent->adcIntegrationWindow() && sig_tdc < bkg_tdc ) {
46 else if (std::abs(sig_tdc - bkg_tdc) >
parent->adcIntegrationWindow() && sig_tdc > bkg_tdc ) {
48 signalDigit = bkgDigit;
54 else if (std::abs(sig_tdc - bkg_tdc) <
parent->adcIntegrationWindow() ) {
56 int adc = signalDigit.
adc() + bkgDigit.
adc();
82 return StatusCode::SUCCESS;
94 ATH_MSG_ERROR(
"Could not get background MDT container " << bkgContainer.
name() <<
" from store " << bkgContainer.
store());
95 return StatusCode::FAILURE;
97 bkgContainerPtr = bkgContainer.
cptr();
99 ATH_MSG_DEBUG(
"Found background MdtDigitContainer called " << bkgContainer.
name() <<
" in store " << bkgContainer.
store());
105 if(!signalContainer.
isValid() ) {
106 ATH_MSG_ERROR(
"Could not get signal MDT container " << signalContainer.
name() <<
" from store " << signalContainer.
store());
107 return StatusCode::FAILURE;
109 ATH_MSG_DEBUG(
"Found signal MdtDigitContainer called " << signalContainer.
name() <<
" in store " << signalContainer.
store());
114 ATH_CHECK(outputContainer.
record(std::make_unique<MdtDigitContainer>(signalContainer->
size())));
115 if (!outputContainer.
isValid()) {
116 ATH_MSG_ERROR(
"Could not record output MdtDigitContainer called " << outputContainer.
name() <<
" to store " << outputContainer.
store());
117 return StatusCode::FAILURE;
119 ATH_MSG_DEBUG(
"Recorded output MdtDigitContainer called " << outputContainer.
name() <<
" in store " << outputContainer.
store());
128 return StatusCode::SUCCESS;
SG::ReadHandleKey< MdtDigitContainer > m_bkgInputKey
const_pointer_type cptr()
Dereference the pointer.
const std::string & name() const
Return the StoreGate ID for the referenced object.
size_t size() const
Duplicate of fullSize for backwards compatability.
const_pointer_type cptr() const
Dereference the pointer.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
MdtOverlay(const std::string &name, ISvcLocator *pSvcLocator)
bool empty() const
Test if the key is blank.
StatusCode overlayContainer(const IDC_Container *bkgContainer, const IDC_Container *signalContainer, IDC_Container *outputContainer) const
void mergeChannelData(HGTD_RDO &, const HGTD_RDO &, const IDC_OverlayBase *algorithm)
Handle class for recording to StoreGate.
size_type digit_size() const
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
std::string store() const
Return the name of the store holding the object we are proxying.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Use IdentifiableContainer with MdtDigitCollection.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Identifier identify() const
SG::ReadHandleKey< MdtDigitContainer > m_signalInputKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual StatusCode initialize() override final
virtual StatusCode execute(const EventContext &ctx) const override final
Helpers for overlaying Identifiable Containers.
Handle class for reading from StoreGate.
SG::WriteHandleKey< MdtDigitContainer > m_outputKey
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.