![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "Identifier/Identifier.h"
30 using namespace InDet;
34 m_clusteringTool(
"InDet::MergedPixelsTool", this),
35 m_gangedAmbiguitiesFinder(
"InDet::PixelGangedAmbiguitiesFinder", this),
36 m_rdoContainerKey(
""),
37 m_roiCollectionKey(
""),
40 m_clusterContainerKey(
""),
41 m_clusterContainerLinkKey(
""),
42 m_ambiguitiesMapKey(
""),
43 m_clusterContainercacheKey(
"") {
50 "Pixel cluster container");
53 "Pixel cluster container link name (don't set this)");
56 "Ambiguity Map container");
91 return StatusCode::SUCCESS;
108 ATH_CHECK( clusterContainer.
record (std::make_unique<PixelClusterContainer>(clusterContainercache.
ptr() )));
115 ATH_MSG_DEBUG(
"Pixel clusters '" << clusterContainer.
name() <<
"' symlinked in StoreGate");
119 ambiguitiesMap = std::make_unique<PixelGangedClusterAmbiguities>();
127 std::unique_ptr<DataPool<PixelCluster>> dataItemsPool =
nullptr;
129 if (!hasExternalCache) {
130 dataItemsPool = std::make_unique<DataPool<PixelCluster>>(ctx);
131 dataItemsPool->reserve(20000);
133 dataItemsPool = std::make_unique<DataPool<PixelCluster>>(ctx);
142 for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){
143 const COLLECTION* RDO_Collection(*rdoCollections);
144 if (!RDO_Collection || RDO_Collection->
empty())
continue;
145 PixelClusterContainer::IDC_WriteHandle lock = clusterContainer->getWriteHandle(rdoCollections.
hashId());
146 if( lock.OnlineAndPresentInAnotherView() )
continue;
149 std::unique_ptr<PixelClusterCollection> clusterCollection(
151 dataItemsPool.get(), ctx));
153 if (clusterCollection && !clusterCollection->empty()){
156 ATH_CHECK(lock.addOrDelete( std::move(clusterCollection) ));
169 std::vector<IdentifierHash> listOfPixIds;
170 for (; roi!=roiE; ++roi) {
172 listOfPixIds.clear();
176 << listOfPixIds.size() <<
" det. Elements" );
177 for (
auto & listOfPixId : listOfPixIds) {
180 if (!RDO_Collection)
continue;
181 PixelClusterContainer::IDC_WriteHandle lock = clusterContainer->getWriteHandle(listOfPixId);
182 if( lock.OnlineAndPresentInAnotherView() )
continue;
185 std::unique_ptr<PixelClusterCollection> clusterCollection(
187 dataItemsPool.get(), ctx));
188 if (clusterCollection && !clusterCollection->empty()) {
190 << clusterCollection->size() <<
" clusters" );
192 ATH_CHECK(lock.addOrDelete( std::move(clusterCollection) ));
201 ATH_MSG_DEBUG(
"clusterContainer->numberOfCollections() " << clusterContainer->numberOfCollections());
203 ATH_MSG_DEBUG(
"PixelClusterAmbiguitiesMap recorded in StoreGate");
205 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
Const iterator class for DataVector/DataList.
Group
Properties of a chain group.
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
const PixelID * m_idHelper
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::string & name() const
Return the StoreGate ID for the referenced object.
DUMMY Primary Vertex Finder.
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::UpdateHandleKey< InDet::PixelClusterContainerCache > m_clusterContainercacheKey
ToolHandle< IRegSelTool > m_regionSelector
region selector tool
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
ToolHandle< PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder
class to find out which clusters shares ganged pixels
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
pointer_type ptr()
Dereference the pointer.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
ToolHandle< GenericMonitoringTool > m_monTool
virtual bool hasExternalCache() const override final
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadHandleKey< PixelRDO_Container > m_rdoContainerKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
IdentifierHash hashId() const
hashId of the pointed-to element
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandleKey< PixelGangedClusterAmbiguities > m_ambiguitiesMapKey
size_type wafer_hash_max(void) const
ToolHandle< IPixelClusteringTool > m_clusteringTool
virtual StatusCode initialize() override
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
SG::WriteHandleKey< PixelClusterContainer > m_clusterContainerKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::WriteHandleKey< SiClusterContainer > m_clusterContainerLinkKey
Gaudi::Property< bool > m_useDataPoolWithCache
bool empty() const noexcept
Returns true if the collection is empty.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
PixelClusterization()=delete