|
ATLAS Offline Software
|
Go to the documentation of this file.
31 auto *oldDatum =
dynamic_cast<const SCT3_RawData *
>(existingDatum);
33 throw std::runtime_error(
"Dynamic cast to SCT3_RawData failed in SCTOverlay.cxx, Overlay::copyCollection");
36 (*datumCopy) =
SCT3_RawData(oldDatum->identify(), oldDatum->getWord(),
37 &oldDatum->getErrorCondensedHit());
57 throw std::runtime_error(
"mergeCollections<SCT_RDORawData>() called by a wrong parent algorithm? Must be SCTOverlay.");
61 throw std::runtime_error(
"mergeCollections<SCT_RDO_Collection>(): collection Id mismatch");
77 rdo = bkgCollection->
begin();
78 rdoEnd = bkgCollection->
end();
80 rdo = signalCollection->
begin();
81 rdoEnd = signalCollection->
end();
84 for (; rdo!=rdoEnd; ++rdo) {
88 std::ostringstream
os;
89 const auto& elt = **rdo;
90 os <<
"mergeCollection<SCT_RDO_Collection>(): wrong datum format. Only SCT3_RawData are produced by SCT_RodDecoder and supported by overlay."
91 <<
"For the supplied datum typeid(datum).name() = " <<
typeid(elt).
name();
92 throw std::runtime_error(
os.str());
100 if (timeBin & (1 << bc)) stripInfo[bc].set(strip);
112 bool isExpandedMode = (anyNextBCHits or anyPreivousBCHits);
114 const int ERRORS = 0;
115 const std::vector<int> errvec{};
116 if (isExpandedMode) {
118 const int groupSize = 1;
124 if (stripInfo[bc][strip]) {
128 unsigned int SCT_Word = (groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25));
138 unsigned int groupSize = 0;
146 unsigned int SCT_Word = (groupSize | (
firstStrip << 11) | (tbin <<22) | (ERRORS << 25));
180 return StatusCode::FAILURE;
183 return StatusCode::SUCCESS;
197 ATH_MSG_ERROR(
"Could not get background SCT RDO container " << bkgContainer.
name() <<
" from store " << bkgContainer.
store());
198 return StatusCode::FAILURE;
200 bkgContainerPtr = bkgContainer.
cptr();
202 ATH_MSG_DEBUG(
"Found background SCT RDO container " << bkgContainer.
name() <<
" in store " << bkgContainer.
store());
207 if (!signalContainer.
isValid()) {
208 ATH_MSG_ERROR(
"Could not get signal SCT RDO container " << signalContainer.
name() <<
" from store " << signalContainer.
store());
209 return StatusCode::FAILURE;
211 ATH_MSG_DEBUG(
"Found signal SCT RDO container " << signalContainer.
name() <<
" in store " << signalContainer.
store());
218 ATH_CHECK(outputContainer.
record(std::make_unique<SCT_RDO_Container>(signalContainer->
size())));
219 if (!outputContainer.
isValid()) {
220 ATH_MSG_ERROR(
"Could not record output SCT RDO container " << outputContainer.
name() <<
" to store " << outputContainer.
store());
221 return StatusCode::FAILURE;
223 ATH_MSG_DEBUG(
"Recorded output SCT RDO container " << outputContainer.
name() <<
" in store " << outputContainer.
store());
235 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual int getGroupSize() const override final
SG::ReadHandleKey< SCT_RDO_Container > m_signalInputKey
Const iterator class for DataVector/DataList.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
virtual StatusCode execute(const EventContext &ctx) const override final
const_pointer_type cptr()
Dereference the pointer.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const std::string & name() const
Return the StoreGate ID for the referenced object.
virtual Identifier identify() const override final
size_t size() const
Duplicate of fullSize for backwards compatability.
#define ATH_MSG_VERBOSE(x)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual IdentifierHash identifyHash() const override final
Handle class for recording to StoreGate.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
void prepareToAdd(unsigned int size)
Prepare to add cached elements.
std::unique_ptr< HGTD_RDO_Collection > copyCollection(const IdentifierHash &hashId, const HGTD_RDO_Collection *collection)
::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 overlayContainer(const IDC_Container *bkgContainer, const IDC_Container *signalContainer, IDC_Container *outputContainer) const
SG::WriteHandleKey< SCT_RDO_Container > m_outputKey
SG::ReadHandleKey< SCT_RDO_Container > m_bkgInputKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
void mergeCollections(SCT_RDO_Collection *bkgCollection, SCT_RDO_Collection *signalCollection, SCT_RDO_Collection *outputCollection, const IDC_OverlayBase *algorithm, DataPool< SCT3_RawData > &dataItems)
SCTOverlay(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Helpers for overlaying Identifiable Containers.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
virtual Identifier identify() const override final
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual StatusCode initialize() override final