|
ATLAS Offline Software
|
Go to the documentation of this file.
34 throw std::runtime_error(
"mergeChannelData<sTgcDigit>() called by a wrong parent algorithm? Must be STGC_Overlay.");
37 float sig_time = signalDigit.
time();
38 float bkg_time = bkgDigit.
time();
41 if ( abs(sig_time - bkg_time) >
parent->timeIntegrationWindow() && sig_time < bkg_time ) {
45 else if ( abs(sig_time - bkg_time) >
parent->timeIntegrationWindow() && sig_time > bkg_time ) {
47 signalDigit = bkgDigit;
51 else if ( abs(sig_time - bkg_time) <
parent->timeIntegrationWindow() ) {
81 return StatusCode::SUCCESS;
93 ATH_MSG_ERROR(
"Could not get background sTGC container " << bkgContainer.
name() <<
" from store " << bkgContainer.
store());
94 return StatusCode::FAILURE;
96 bkgContainerPtr = bkgContainer.
cptr();
98 ATH_MSG_DEBUG(
"Found background sTGCDigitContainer called " << bkgContainer.
name() <<
" in store " << bkgContainer.
store());
104 if(!signalContainer.
isValid() ) {
105 ATH_MSG_ERROR(
"Could not get signal sTgc container " << signalContainer.
name() <<
" from store " << signalContainer.
store());
106 return StatusCode::FAILURE;
108 ATH_MSG_DEBUG(
"Found signal sTgcDigitContainer called " << signalContainer.
name() <<
" in store " << signalContainer.
store());
113 ATH_CHECK(outputContainer.
record(std::make_unique<sTgcDigitContainer>(signalContainer->
size())));
114 if (!outputContainer.
isValid()) {
115 ATH_MSG_ERROR(
"Could not record output sTgcDigitContainer called " << outputContainer.
name() <<
" to store " << outputContainer.
store());
116 return StatusCode::FAILURE;
118 ATH_MSG_DEBUG(
"Recorded output sTgcDigitContainer called " << outputContainer.
name() <<
" in store " << outputContainer.
store());
126 return StatusCode::SUCCESS;
Use IdentifiableContainer with sTgcDigitCollection.
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.
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.
SG::WriteHandleKey< sTgcDigitContainer > m_outputKey
::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.
virtual StatusCode execute(const EventContext &ctx) const override final
size_type digit_size() const
SG::ReadHandleKey< sTgcDigitContainer > m_bkgInputKey
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?
virtual bool isValid() override final
Can the handle be successfully dereferenced?
double charge(const T &p)
Identifier identify() const
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Helpers for overlaying Identifiable Containers.
SG::ReadHandleKey< sTgcDigitContainer > m_signalInputKey
STGC_Overlay(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
Handle class for reading from StoreGate.
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.