diff --git a/Tracking/Acts/ActsConfig/python/ActsClusterizationConfig.py b/Tracking/Acts/ActsConfig/python/ActsClusterizationConfig.py index cdfa6e8dc3566603e3794367ecba96373a49d76a..c60e6af8893e1de9de17cebe539280c686896642 100644 --- a/Tracking/Acts/ActsConfig/python/ActsClusterizationConfig.py +++ b/Tracking/Acts/ActsConfig/python/ActsClusterizationConfig.py @@ -62,6 +62,10 @@ def ActsPixelClusterizationAlgCfg(flags, # Regional selection kwargs.setdefault('RoIs', 'OfflineFullScanRegion') + kwargs.setdefault('ClusterCacheBackend', 'ActsPixelClusterCache_Back') + kwargs.setdefault('ClusterCache', 'ActsPixelClustersCache') + + if 'RegSelTool' not in kwargs: from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags))) @@ -88,7 +92,11 @@ def ActsStripClusterizationAlgCfg(flags, kwargs.setdefault("IDHelper", "SCT_ID") # Regional selection kwargs.setdefault('RoIs', 'OfflineFullScanRegion') - + + kwargs.setdefault('ClusterCacheBackend', 'ActsStripClusterCache_Back') + kwargs.setdefault('ClusterCache', 'ActsStripClustersCache') + + if 'RegSelTool' not in kwargs: from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags))) @@ -103,13 +111,58 @@ def ActsStripClusterizationAlgCfg(flags, acc.addEventAlgo(CompFactory.ActsTrk.StripClusterizationAlg(name, **kwargs)) return acc +def ActsClusterCacheCreatorCfg(flags, name="ActsClusterCacheCreator", **kwargs): + kwargs.setdefault("PixelClustersCacheKey", "ActsPixelClusterCache_Back") + kwargs.setdefault("StripClustersCacheKey", "ActsStripClusterCache_Back") + + acc = ComponentAccumulator() + + acc.addEventAlgo(CompFactory.ActsTrk.Cache.CreatorAlg(name, **kwargs)) + + return acc + +def ActsPixelClustersViewFillerCfg(flags,name="PixelClusterViewFiller", **kwargs): + kwargs.setdefault("InputIDC", "ActsPixelClustersCache") + kwargs.setdefault("Output", "ITKPixelClusters_InView") + + kwargs.setdefault('RoIs', 'OfflineFullScanRegion') + + acc = ComponentAccumulator() + + if 'RegSelTool' not in kwargs: + from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg + kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags))) + + acc.addEventAlgo(CompFactory.ActsTrk.PixelClusterCacheFillerAlg(name, **kwargs)) + + return acc + +def ActsStripClustersViewFillerCfg(flags,name="StripClusterViewFiller", **kwargs): + kwargs.setdefault("InputIDC", "ActsStripClustersCache") + kwargs.setdefault("Output", "ITKStripClusters_InView") + + kwargs.setdefault('RoIs', 'OfflineFullScanRegion') + + acc = ComponentAccumulator() + + if 'RegSelTool' not in kwargs: + from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg + kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags))) + + acc.addEventAlgo(CompFactory.ActsTrk.StripClusterCacheFillerAlg(name, **kwargs)) + + return acc + + def ActsMainClusterizationCfg(flags) -> ComponentAccumulator: acc = ComponentAccumulator() - + acc.merge(ActsClusterCacheCreatorCfg(flags)) if flags.Detector.EnableITkPixel: acc.merge(ActsPixelClusterizationAlgCfg(flags)) + acc.merge(ActsPixelClustersViewFillerCfg(flags)) if flags.Detector.EnableITkStrip: acc.merge(ActsStripClusterizationAlgCfg(flags)) + acc.merge(ActsStripClustersViewFillerCfg(flags)) # Analysis extensions if flags.Acts.doAnalysis: @@ -129,6 +182,7 @@ def ActsConversionClusterizationCfg(flags) -> ComponentAccumulator: acc.merge(ActsStripClusterizationAlgCfg(flags, name="ActsConversionStripClusterizationAlg", ClustersKey="ITkConversionStripClusters", + ClusterCache="", RoIs="OfflineCaloBasedRegion")) # Analysis extensions diff --git a/Tracking/Acts/ActsDataPreparation/CMakeLists.txt b/Tracking/Acts/ActsDataPreparation/CMakeLists.txt index 9a2981dd7b81cf3fd3ba608c8f07e988d480b6c4..8a2b224c5e5ffe4f116b6c36ccd2ded9c0f1c11b 100644 --- a/Tracking/Acts/ActsDataPreparation/CMakeLists.txt +++ b/Tracking/Acts/ActsDataPreparation/CMakeLists.txt @@ -35,6 +35,7 @@ atlas_add_component( ActsDataPreparation TrkSurfaces xAODInDetMeasurement xAODMeasurementBase + ViewAlgsLib InDetIdentifier ) # Unit tests diff --git a/Tracking/Acts/ActsDataPreparation/src/Cache.h b/Tracking/Acts/ActsDataPreparation/src/Cache.h new file mode 100644 index 0000000000000000000000000000000000000000..3ef8920456e176a591116b2eef2b71d25bd56b46 --- /dev/null +++ b/Tracking/Acts/ActsDataPreparation/src/Cache.h @@ -0,0 +1,88 @@ +/* + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRACKING_ACTS_CACHE_H +#define TRACKING_ACTS_CACHE_H + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "AthContainers/DataVector.h" +#include "AthContainers/ConstDataVector.h" +#include "GaudiKernel/DataObject.h" + +#include "EventContainers/IdentifiableContainer.h" +#include "EventContainers/IdentifiableCache.h" + +#include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/ReadHandle.h" + +#include "StoreGate/WriteHandleKey.h" +#include "StoreGate/WriteHandle.h" + +#include "StoreGate/UpdateHandle.h" +#include "StoreGate/UpdateHandleKey.h" + +#include <set> +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "IRegionSelector/IRegSelTool.h" +#include "AthContainers/DataVector.h" + +namespace ActsTrk::Cache{ + template<typename OT> + class CacheEntry: public DataObject{ + public: + CacheEntry(){} + CacheEntry(DataVector<OT>* dv, unsigned int s, unsigned int e): container(dv), range_start(s), range_end(e){} + DataVector<OT>* container; + unsigned int range_start; + unsigned int range_end; + }; + + template<typename OT> + class Handles{ + public: + using IDCBackend = typename EventContainers::IdentifiableCache<CacheEntry<OT>>; + using IDC = IdentifiableContainer<CacheEntry<OT>>; + + using BackendUpdateHandleKey = SG::UpdateHandleKey<IDCBackend>; + using BackendUpdateHandle = SG::UpdateHandle<IDCBackend>; + + using WriteHandleKey = SG::WriteHandleKey<IDC>; + using WriteHandle = SG::WriteHandle<IDC>; + + using ReadHandleKey = SG::ReadHandleKey<IDC>; + using ReadHandle = SG::ReadHandle<IDC>; + }; + + template<typename CT> + class ViewFillerAlg: public AthReentrantAlgorithm{ + public: + using ObjectType = typename CT::base_value_type; + using CacheReadHandleKey = typename Handles<ObjectType>::ReadHandleKey; + using CacheReadHandle = typename Handles<ObjectType>::ReadHandle; + + ViewFillerAlg(const std::string& name, ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator) {} + virtual ~ViewFillerAlg() = default; + virtual StatusCode initialize() override; + virtual StatusCode execute (const EventContext& ctx) const override; + + //read handle for the IDC we want to fill + CacheReadHandleKey m_inputIDC{this, "InputIDC","", "The input IDC container"}; + //write handle for the plain old xaod container we want to create + SG::WriteHandleKey<ConstDataVector<CT>> m_outputKey{this,"Output","", "The key of the output container"}; + + //handle for the rois we need to fill for + SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey {this, "RoIs", "", "RoIs to read in"}; + ToolHandle<IRegSelTool> m_regionSelector{this,"RegSelTool","","Region selector tool"}; + }; + + template<typename OT> + class Helper{ + public: + using IDCWriteHandle = typename IdentifiableContainer<CacheEntry<OT>>::IDC_WriteHandle; + + static StatusCode insert(IDCWriteHandle& wh, DataVector<OT>* dv, unsigned int range_start, unsigned int range_end); + }; +} + +#include "Cache.icc" +#endif \ No newline at end of file diff --git a/Tracking/Acts/ActsDataPreparation/src/Cache.icc b/Tracking/Acts/ActsDataPreparation/src/Cache.icc new file mode 100644 index 0000000000000000000000000000000000000000..3a5ee1760283f719a7de3782e344bed764547789 --- /dev/null +++ b/Tracking/Acts/ActsDataPreparation/src/Cache.icc @@ -0,0 +1,78 @@ +/* + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +*/ +namespace ActsTrk::Cache{ + template<typename CT> + StatusCode ViewFillerAlg<CT>::initialize() { + ATH_CHECK(m_inputIDC.initialize()); + ATH_CHECK(m_outputKey.initialize()); + ATH_CHECK(m_roiCollectionKey.initialize()); + ATH_CHECK( m_regionSelector.retrieve() ); + + return StatusCode::SUCCESS; + } + + template<typename CT> + StatusCode ViewFillerAlg<CT>::execute (const EventContext& ctx) const{ + //obtain the idc and output container + CacheReadHandle idc(m_inputIDC, ctx); + if(!idc.isValid()){ + ATH_MSG_ERROR("Unable to obtain a valid handle to the IDC container"); + return StatusCode::FAILURE; + } + + SG::WriteHandle<ConstDataVector<CT>> output(m_outputKey, ctx); + + //construct a data vector in view elements mode, as it will not own its objects + //the output type supplied must be of flavour DataVector<T> + auto container = std::make_unique<ConstDataVector<CT>>(SG::VIEW_ELEMENTS); + + std::set<IdentifierHash> hashes_to_fetch; + + // retrieve the RoI as provided from upstream algos + SG::ReadHandle<TrigRoiDescriptorCollection> roiCollectionHandle = SG::makeHandle( m_roiCollectionKey, ctx ); + ATH_CHECK(roiCollectionHandle.isValid()); + const TrigRoiDescriptorCollection *roiCollection = roiCollectionHandle.cptr(); + + std::vector<IdentifierHash> per_roi_ids; + for(auto roi: *roiCollection){ + per_roi_ids.clear(); + m_regionSelector->HashIDList(*roi, per_roi_ids); + hashes_to_fetch.insert(per_roi_ids.begin(), per_roi_ids.end()); + } + + for(auto idHash: hashes_to_fetch){ + //this function will wait if an item is not available + auto ce = idc->indexFindPtr(idHash); + + if(ce == nullptr){ + continue; + } + + for(unsigned int i=ce->range_start; i<ce->range_end; i++){ + container->push_back(ce->container->at(i)); + } + } + + ATH_MSG_DEBUG("View filled with "<<container->size()<<" items"); + + //record the data against the write handle + ATH_CHECK(output.record(std::move(container))); + + if(!output.isValid()){ + ATH_MSG_ERROR("Unable to write to the output container"); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; + } + + template<typename OT> + StatusCode Helper<OT>::insert(IDCWriteHandle& wh, DataVector<OT>* dv, unsigned int range_start, unsigned int range_end){ + if(range_start == range_end){return StatusCode::SUCCESS;} + + auto ce = std::make_unique<CacheEntry<OT>>(dv, range_start, range_end); + + return wh.addOrDelete(std::move(ce)); + } +} \ No newline at end of file diff --git a/Tracking/Acts/ActsDataPreparation/src/CacheCreator.cxx b/Tracking/Acts/ActsDataPreparation/src/CacheCreator.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0759d4223988a5152b893a0e8e1efe4dcc0bee00 --- /dev/null +++ b/Tracking/Acts/ActsDataPreparation/src/CacheCreator.cxx @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CacheCreator.h" + +namespace ActsTrk::Cache { + CreatorAlg::CreatorAlg(const std::string &name,ISvcLocator *pSvcLocator):IDCCacheCreatorBase(name,pSvcLocator) + { + } + + StatusCode CreatorAlg::initialize(){ + ATH_CHECK(m_pixelClusterCacheKey.initialize(SG::AllowEmpty)); + ATH_CHECK(m_stripClusterCacheKey.initialize(SG::AllowEmpty)); + + m_do_pixClusters = !m_pixelClusterCacheKey.key().empty(); + m_do_stripClusters = !m_stripClusterCacheKey.key().empty(); + + ATH_CHECK(detStore()->retrieve(m_pix_idHelper, "PixelID")); + ATH_CHECK(detStore()->retrieve(m_strip_idHelper, "SCT_ID")); + + return StatusCode::SUCCESS; + } + + StatusCode CreatorAlg::execute(const EventContext& ctx) const{ + if(m_do_pixClusters){ + ATH_CHECK(createContainer(m_pixelClusterCacheKey, m_pix_idHelper->wafer_hash_max(), ctx)); + } + + if(m_do_stripClusters){ + ATH_CHECK(createContainer(m_stripClusterCacheKey, m_strip_idHelper->wafer_hash_max(), ctx)); + } + + return StatusCode::SUCCESS; + } +} \ No newline at end of file diff --git a/Tracking/Acts/ActsDataPreparation/src/CacheCreator.h b/Tracking/Acts/ActsDataPreparation/src/CacheCreator.h new file mode 100644 index 0000000000000000000000000000000000000000..23df9b0d56ad5152deae483ffe0c122a494a5c0c --- /dev/null +++ b/Tracking/Acts/ActsDataPreparation/src/CacheCreator.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef TRACKING_ACTS_CACHECREATOR_H +#define TRACKING_ACTS_CACHECREATOR_H + +#include "ViewAlgs/IDCCacheCreatorBase.h" +#include "Cache.h" +#include "StoreGate/WriteHandleKey.h" + +#include <InDetIdentifier/PixelID.h> +#include <InDetIdentifier/SCT_ID.h> +#include "xAODInDetMeasurement/PixelCluster.h" +#include "xAODInDetMeasurement/StripCluster.h" + +namespace ActsTrk::Cache{ + class CreatorAlg: public IDCCacheCreatorBase{ + public: + CreatorAlg(const std::string &name,ISvcLocator *pSvcLocator); + virtual StatusCode initialize () override; + virtual StatusCode execute (const EventContext& ctx) const override; + + protected: + SG::WriteHandleKey<Handles<xAOD::PixelCluster>::IDCBackend> m_pixelClusterCacheKey{this, "PixelClustersCacheKey", ""}; + SG::WriteHandleKey<Handles<xAOD::StripCluster>::IDCBackend> m_stripClusterCacheKey{this, "StripClustersCacheKey", ""}; + + const PixelID* m_pix_idHelper{}; + const SCT_ID* m_strip_idHelper{}; + + bool m_do_pixSP{false}; + bool m_do_stripSP{false}; + + bool m_do_pixClusters{false}; + bool m_do_stripClusters{false}; + }; +} + +CLASS_DEF(ActsTrk::Cache::Handles<xAOD::PixelCluster>::IDCBackend, 70424203, 1); +CLASS_DEF(ActsTrk::Cache::Handles<xAOD::StripCluster>::IDCBackend, 202232989, 1); +#endif diff --git a/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.h b/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.h index d1a434921edcfa2489fbf868d720df5516f4df6d..e565d041ee9e9f0b830e240746703444afc4cb18 100644 --- a/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.h +++ b/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.h @@ -13,6 +13,7 @@ #include <TrigSteeringEvent/TrigRoiDescriptorCollection.h> #include <IRegionSelector/IRegSelTool.h> #include <InDetReadoutGeometry/SiDetectorElementCollection.h> +#include "Cache.h" namespace ActsTrk { @@ -24,7 +25,16 @@ public: using ClusterContainer = typename IClusteringTool::ClusterContainer; using ClusterAuxContainer = typename IClusteringTool::ClusterAuxContainer; using IDHelper = typename IClusteringTool::IDHelper; - + using BaseClusterType = typename ClusterContainer::base_value_type; + + //cache related handles + using Cache_BackendUpdateHandleKey = typename Cache::Handles<BaseClusterType>::BackendUpdateHandleKey; + using Cache_BackendUpdateHandle = typename Cache::Handles<BaseClusterType>::BackendUpdateHandle; + using Cache_WriteHandleKey = typename Cache::Handles<BaseClusterType>::WriteHandleKey; + using Cache_WriteHandle = typename Cache::Handles<BaseClusterType>::WriteHandle; + using Cache_IDC = typename Cache::Handles<BaseClusterType>::IDC; + using Cache_IDCLock = typename Cache::Handles<BaseClusterType>::IDC::IDC_WriteHandle; + ClusterizationAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~ClusterizationAlg() = default; virtual StatusCode initialize() override; @@ -72,6 +82,10 @@ private: "Key of output xAOD pixel cluster container" }; + Cache_WriteHandleKey m_ClusterCache{this,"ClusterCache",""}; + Cache_BackendUpdateHandleKey m_ClusterCacheBackend{this,"ClusterCacheBackend",""}; + bool m_cache_enabled{false}; + // expected number of clusters for RDO // This values is used for reserving enough memory of the cluster container // reserve = m_expectedClustersPerRDO * nRDOs @@ -96,6 +110,6 @@ private: } // namespace ActsTrk -#include "ClusterizationAlg.ipp" +#include "ClusterizationAlg.icc" #endif diff --git a/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.ipp b/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.icc similarity index 62% rename from Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.ipp rename to Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.icc index 7dee956dff605572b4925f7ae641ddaeed7aff54..876639116338e8f544ff7496fd40c37358e12fbc 100644 --- a/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.ipp +++ b/Tracking/Acts/ActsDataPreparation/src/ClusterizationAlg.icc @@ -30,6 +30,12 @@ StatusCode ClusterizationAlg<IClusteringTool>::initialize() // Monitoring ATH_CHECK(m_monTool.retrieve(EnableTool{not m_monTool.empty()})); + //caching + ATH_CHECK(m_ClusterCache.initialize(SG::AllowEmpty)); + ATH_CHECK(m_ClusterCacheBackend.initialize(SG::AllowEmpty)); + + m_cache_enabled = !m_ClusterCache.key().empty(); + return StatusCode::SUCCESS; } @@ -46,26 +52,26 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx) return StatusCode::FAILURE; } + Cache_WriteHandle cacheHandle; + if(m_cache_enabled){ + cacheHandle = Cache_WriteHandle(m_ClusterCache, ctx); + auto updateHandle = Cache_BackendUpdateHandle(m_ClusterCacheBackend, ctx); + ATH_CHECK(updateHandle.isValid()); + ATH_CHECK(cacheHandle.record(std::make_unique<Cache_IDC>(updateHandle.ptr()))); + ATH_CHECK(cacheHandle.isValid()); + } + SG::ReadHandle<RDOContainer> rdoContainer = SG::makeHandle(m_rdoContainerKey, ctx); ATH_CHECK(rdoContainer.isValid()); - SG::WriteHandle<ClusterContainer> clusterHandle - = SG::makeHandle(m_clusterContainerKey, ctx); + SG::WriteHandle<ClusterContainer> clusterHandle = SG::makeHandle(m_clusterContainerKey, ctx); ATH_CHECK(clusterHandle.record( std::make_unique<ClusterContainer>(), std::make_unique<ClusterAuxContainer>() )); ClusterContainer *clusterContainer = clusterHandle.ptr(); // Reserve space, estimate of mean clusters to reduce re-allocations clusterContainer->reserve( m_expectedClustersPerRDO.value() * rdoContainer->size() ); - // This will allow us to access the already processed hash ids - // For now we are not using yet an update write handle, so the - // cluster container is empty - // Possibly, we need to find a more efficient solution - ContainerAccessor<typename ClusterContainer::base_value_type, IdentifierHash, 1> - accessor ( *clusterContainer, - [] (const typename ClusterContainer::base_value_type& cl) -> IdentifierHash - { return cl.identifierHash(); }, - detElements->size()); + // retrieve the RoI as provided from upstream algos SG::ReadHandle<TrigRoiDescriptorCollection> roiCollectionHandle = SG::makeHandle( m_roiCollectionKey, ctx ); @@ -79,16 +85,29 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx) m_regionSelector->HashIDList(*roi, listOfIds); // We'd need to first check the id hashes have not already been processed beforehand, and only then // add it to the list of ids to be processed. - for (const IdentifierHash id : listOfIds) { - if (accessor.isIdentifierPresent(id)) continue; - - // If not already processed, do it now - const RawDataCollection* rdos = rdoContainer->indexFindPtr(id); - if (rdos != nullptr && !rdos->empty()) { - ATH_CHECK(m_clusteringTool->clusterize(*rdos, *m_idHelper, ctx, *clusterContainer)); - } else { - ATH_MSG_DEBUG("No input RDOs for this container element"); - } + for (const IdentifierHash id : listOfIds) { + //obtain the write handle directly when we decide to process a given idhash + //this will ensure that proper waiting + Cache_IDCLock cache_wh; + if(m_cache_enabled){ + //obtain a write handle + auto tmp = cacheHandle->getWriteHandle(id); + Cache_IDCLock::Swap(cache_wh, tmp); + //check if already available + if(cache_wh.OnlineAndPresentInAnotherView()) continue; + } + + // If not already processed, do it now + const RawDataCollection* rdos = rdoContainer->indexFindPtr(id); + if (rdos != nullptr && !rdos->empty()) { + auto prev_len = clusterContainer->size(); + ATH_CHECK(m_clusteringTool->clusterize(*rdos, *m_idHelper, ctx,*clusterContainer)); + + if(m_cache_enabled){ + //add to the cache + ATH_CHECK(Cache::Helper<BaseClusterType>::insert(cache_wh, clusterContainer, prev_len, clusterContainer->size())); + } + } } // loop on ids } // loop on rois diff --git a/Tracking/Acts/ActsDataPreparation/src/PixelClusterizationAlg.h b/Tracking/Acts/ActsDataPreparation/src/PixelClusterizationAlg.h index f56432679b1e1e467861d0d1027bbe685dd8488c..8fd5116ad301dc759487d5a18479979691d395a5 100644 --- a/Tracking/Acts/ActsDataPreparation/src/PixelClusterizationAlg.h +++ b/Tracking/Acts/ActsDataPreparation/src/PixelClusterizationAlg.h @@ -12,5 +12,8 @@ class PixelClusterizationAlg : public ClusterizationAlg<IPixelClusteringTool> { using ClusterizationAlg<IPixelClusteringTool>::ClusterizationAlg; }; -} +class PixelClusterCacheFillerAlg: public Cache::ViewFillerAlg<xAOD::PixelClusterContainer>{ + using Cache::ViewFillerAlg<xAOD::PixelClusterContainer>::ViewFillerAlg; +}; +} \ No newline at end of file diff --git a/Tracking/Acts/ActsDataPreparation/src/StripClusterizationAlg.h b/Tracking/Acts/ActsDataPreparation/src/StripClusterizationAlg.h index 042836182ef2b942a2baf34a1b1fe8f34553418c..fca0b2fcdffd88151983fcb2526d47bf640aa7dd 100644 --- a/Tracking/Acts/ActsDataPreparation/src/StripClusterizationAlg.h +++ b/Tracking/Acts/ActsDataPreparation/src/StripClusterizationAlg.h @@ -12,5 +12,7 @@ class StripClusterizationAlg : public ClusterizationAlg<IStripClusteringTool> { using ClusterizationAlg<IStripClusteringTool>::ClusterizationAlg; }; -} - +class StripClusterCacheFillerAlg: public Cache::ViewFillerAlg<xAOD::StripClusterContainer>{ + using Cache::ViewFillerAlg<xAOD::StripClusterContainer>::ViewFillerAlg; +}; +} \ No newline at end of file diff --git a/Tracking/Acts/ActsDataPreparation/src/components/ActsDataPreparation_entries.cxx b/Tracking/Acts/ActsDataPreparation/src/components/ActsDataPreparation_entries.cxx index 0c8fb83dd99672d1eb6e7154c747b2bcb983b9af..faa8feee12133160cb41c04d15ad06a46edf8c77 100644 --- a/Tracking/Acts/ActsDataPreparation/src/components/ActsDataPreparation_entries.cxx +++ b/Tracking/Acts/ActsDataPreparation/src/components/ActsDataPreparation_entries.cxx @@ -12,6 +12,8 @@ #include "src/CoreStripSpacePointFormationTool.h" #include "src/StripSpacePointFormationTool.h" +#include "src/CacheCreator.h" + // Algs DECLARE_COMPONENT(ActsTrk::PixelClusterizationAlg) DECLARE_COMPONENT(ActsTrk::StripClusterizationAlg) @@ -24,3 +26,7 @@ DECLARE_COMPONENT(ActsTrk::PixelSpacePointFormationTool) DECLARE_COMPONENT(ActsTrk::CoreStripSpacePointFormationTool) DECLARE_COMPONENT(ActsTrk::StripSpacePointFormationTool) +//Cache related algs +DECLARE_COMPONENT(ActsTrk::Cache::CreatorAlg) +DECLARE_COMPONENT(ActsTrk::PixelClusterCacheFillerAlg) +DECLARE_COMPONENT(ActsTrk::StripClusterCacheFillerAlg)