Skip to content
Snippets Groups Projects
Commit c979c6f2 authored by Benjamin Philip Kerridge's avatar Benjamin Philip Kerridge Committed by Tadej Novak
Browse files

Add caching for ACTS clusters

revert changes to clustering tools and switch to using int ranges in the cache, disable caching for conversion step for now
parent 93c874b8
No related branches found
No related tags found
No related merge requests found
Showing
with 369 additions and 28 deletions
...@@ -62,6 +62,10 @@ def ActsPixelClusterizationAlgCfg(flags, ...@@ -62,6 +62,10 @@ def ActsPixelClusterizationAlgCfg(flags,
# Regional selection # Regional selection
kwargs.setdefault('RoIs', 'OfflineFullScanRegion') kwargs.setdefault('RoIs', 'OfflineFullScanRegion')
kwargs.setdefault('ClusterCacheBackend', 'ActsPixelClusterCache_Back')
kwargs.setdefault('ClusterCache', 'ActsPixelClustersCache')
if 'RegSelTool' not in kwargs: if 'RegSelTool' not in kwargs:
from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg from RegionSelector.RegSelToolConfig import regSelTool_ITkPixel_Cfg
kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags))) kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkPixel_Cfg(flags)))
...@@ -88,7 +92,11 @@ def ActsStripClusterizationAlgCfg(flags, ...@@ -88,7 +92,11 @@ def ActsStripClusterizationAlgCfg(flags,
kwargs.setdefault("IDHelper", "SCT_ID") kwargs.setdefault("IDHelper", "SCT_ID")
# Regional selection # Regional selection
kwargs.setdefault('RoIs', 'OfflineFullScanRegion') kwargs.setdefault('RoIs', 'OfflineFullScanRegion')
kwargs.setdefault('ClusterCacheBackend', 'ActsStripClusterCache_Back')
kwargs.setdefault('ClusterCache', 'ActsStripClustersCache')
if 'RegSelTool' not in kwargs: if 'RegSelTool' not in kwargs:
from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg from RegionSelector.RegSelToolConfig import regSelTool_ITkStrip_Cfg
kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags))) kwargs.setdefault('RegSelTool', acc.popToolsAndMerge(regSelTool_ITkStrip_Cfg(flags)))
...@@ -103,13 +111,58 @@ def ActsStripClusterizationAlgCfg(flags, ...@@ -103,13 +111,58 @@ def ActsStripClusterizationAlgCfg(flags,
acc.addEventAlgo(CompFactory.ActsTrk.StripClusterizationAlg(name, **kwargs)) acc.addEventAlgo(CompFactory.ActsTrk.StripClusterizationAlg(name, **kwargs))
return acc 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: def ActsMainClusterizationCfg(flags) -> ComponentAccumulator:
acc = ComponentAccumulator() acc = ComponentAccumulator()
acc.merge(ActsClusterCacheCreatorCfg(flags))
if flags.Detector.EnableITkPixel: if flags.Detector.EnableITkPixel:
acc.merge(ActsPixelClusterizationAlgCfg(flags)) acc.merge(ActsPixelClusterizationAlgCfg(flags))
acc.merge(ActsPixelClustersViewFillerCfg(flags))
if flags.Detector.EnableITkStrip: if flags.Detector.EnableITkStrip:
acc.merge(ActsStripClusterizationAlgCfg(flags)) acc.merge(ActsStripClusterizationAlgCfg(flags))
acc.merge(ActsStripClustersViewFillerCfg(flags))
# Analysis extensions # Analysis extensions
if flags.Acts.doAnalysis: if flags.Acts.doAnalysis:
...@@ -129,6 +182,7 @@ def ActsConversionClusterizationCfg(flags) -> ComponentAccumulator: ...@@ -129,6 +182,7 @@ def ActsConversionClusterizationCfg(flags) -> ComponentAccumulator:
acc.merge(ActsStripClusterizationAlgCfg(flags, acc.merge(ActsStripClusterizationAlgCfg(flags,
name="ActsConversionStripClusterizationAlg", name="ActsConversionStripClusterizationAlg",
ClustersKey="ITkConversionStripClusters", ClustersKey="ITkConversionStripClusters",
ClusterCache="",
RoIs="OfflineCaloBasedRegion")) RoIs="OfflineCaloBasedRegion"))
# Analysis extensions # Analysis extensions
......
...@@ -35,6 +35,7 @@ atlas_add_component( ActsDataPreparation ...@@ -35,6 +35,7 @@ atlas_add_component( ActsDataPreparation
TrkSurfaces TrkSurfaces
xAODInDetMeasurement xAODInDetMeasurement
xAODMeasurementBase xAODMeasurementBase
ViewAlgsLib InDetIdentifier
) )
# Unit tests # Unit tests
......
/*
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
/*
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
/*
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
/*
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
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <TrigSteeringEvent/TrigRoiDescriptorCollection.h> #include <TrigSteeringEvent/TrigRoiDescriptorCollection.h>
#include <IRegionSelector/IRegSelTool.h> #include <IRegionSelector/IRegSelTool.h>
#include <InDetReadoutGeometry/SiDetectorElementCollection.h> #include <InDetReadoutGeometry/SiDetectorElementCollection.h>
#include "Cache.h"
namespace ActsTrk { namespace ActsTrk {
...@@ -24,7 +25,16 @@ public: ...@@ -24,7 +25,16 @@ public:
using ClusterContainer = typename IClusteringTool::ClusterContainer; using ClusterContainer = typename IClusteringTool::ClusterContainer;
using ClusterAuxContainer = typename IClusteringTool::ClusterAuxContainer; using ClusterAuxContainer = typename IClusteringTool::ClusterAuxContainer;
using IDHelper = typename IClusteringTool::IDHelper; 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); ClusterizationAlg(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~ClusterizationAlg() = default; virtual ~ClusterizationAlg() = default;
virtual StatusCode initialize() override; virtual StatusCode initialize() override;
...@@ -72,6 +82,10 @@ private: ...@@ -72,6 +82,10 @@ private:
"Key of output xAOD pixel cluster container" "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 // expected number of clusters for RDO
// This values is used for reserving enough memory of the cluster container // This values is used for reserving enough memory of the cluster container
// reserve = m_expectedClustersPerRDO * nRDOs // reserve = m_expectedClustersPerRDO * nRDOs
...@@ -96,6 +110,6 @@ private: ...@@ -96,6 +110,6 @@ private:
} // namespace ActsTrk } // namespace ActsTrk
#include "ClusterizationAlg.ipp" #include "ClusterizationAlg.icc"
#endif #endif
...@@ -30,6 +30,12 @@ StatusCode ClusterizationAlg<IClusteringTool>::initialize() ...@@ -30,6 +30,12 @@ StatusCode ClusterizationAlg<IClusteringTool>::initialize()
// Monitoring // Monitoring
ATH_CHECK(m_monTool.retrieve(EnableTool{not m_monTool.empty()})); 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; return StatusCode::SUCCESS;
} }
...@@ -46,26 +52,26 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx) ...@@ -46,26 +52,26 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx)
return StatusCode::FAILURE; 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); SG::ReadHandle<RDOContainer> rdoContainer = SG::makeHandle(m_rdoContainerKey, ctx);
ATH_CHECK(rdoContainer.isValid()); ATH_CHECK(rdoContainer.isValid());
SG::WriteHandle<ClusterContainer> clusterHandle SG::WriteHandle<ClusterContainer> clusterHandle = SG::makeHandle(m_clusterContainerKey, ctx);
= SG::makeHandle(m_clusterContainerKey, ctx);
ATH_CHECK(clusterHandle.record( std::make_unique<ClusterContainer>(), ATH_CHECK(clusterHandle.record( std::make_unique<ClusterContainer>(),
std::make_unique<ClusterAuxContainer>() )); std::make_unique<ClusterAuxContainer>() ));
ClusterContainer *clusterContainer = clusterHandle.ptr(); ClusterContainer *clusterContainer = clusterHandle.ptr();
// Reserve space, estimate of mean clusters to reduce re-allocations // Reserve space, estimate of mean clusters to reduce re-allocations
clusterContainer->reserve( m_expectedClustersPerRDO.value() * rdoContainer->size() ); 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 // retrieve the RoI as provided from upstream algos
SG::ReadHandle<TrigRoiDescriptorCollection> roiCollectionHandle = SG::makeHandle( m_roiCollectionKey, ctx ); SG::ReadHandle<TrigRoiDescriptorCollection> roiCollectionHandle = SG::makeHandle( m_roiCollectionKey, ctx );
...@@ -79,16 +85,29 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx) ...@@ -79,16 +85,29 @@ StatusCode ClusterizationAlg<IClusteringTool>::execute(const EventContext& ctx)
m_regionSelector->HashIDList(*roi, listOfIds); m_regionSelector->HashIDList(*roi, listOfIds);
// We'd need to first check the id hashes have not already been processed beforehand, and only then // 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. // add it to the list of ids to be processed.
for (const IdentifierHash id : listOfIds) { for (const IdentifierHash id : listOfIds) {
if (accessor.isIdentifierPresent(id)) continue; //obtain the write handle directly when we decide to process a given idhash
//this will ensure that proper waiting
// If not already processed, do it now Cache_IDCLock cache_wh;
const RawDataCollection* rdos = rdoContainer->indexFindPtr(id); if(m_cache_enabled){
if (rdos != nullptr && !rdos->empty()) { //obtain a write handle
ATH_CHECK(m_clusteringTool->clusterize(*rdos, *m_idHelper, ctx, *clusterContainer)); auto tmp = cacheHandle->getWriteHandle(id);
} else { Cache_IDCLock::Swap(cache_wh, tmp);
ATH_MSG_DEBUG("No input RDOs for this container element"); //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 ids
} // loop on rois } // loop on rois
......
...@@ -12,5 +12,8 @@ class PixelClusterizationAlg : public ClusterizationAlg<IPixelClusteringTool> { ...@@ -12,5 +12,8 @@ class PixelClusterizationAlg : public ClusterizationAlg<IPixelClusteringTool> {
using ClusterizationAlg<IPixelClusteringTool>::ClusterizationAlg; using ClusterizationAlg<IPixelClusteringTool>::ClusterizationAlg;
}; };
} class PixelClusterCacheFillerAlg: public Cache::ViewFillerAlg<xAOD::PixelClusterContainer>{
using Cache::ViewFillerAlg<xAOD::PixelClusterContainer>::ViewFillerAlg;
};
}
\ No newline at end of file
...@@ -12,5 +12,7 @@ class StripClusterizationAlg : public ClusterizationAlg<IStripClusteringTool> { ...@@ -12,5 +12,7 @@ class StripClusterizationAlg : public ClusterizationAlg<IStripClusteringTool> {
using ClusterizationAlg<IStripClusteringTool>::ClusterizationAlg; using ClusterizationAlg<IStripClusteringTool>::ClusterizationAlg;
}; };
} class StripClusterCacheFillerAlg: public Cache::ViewFillerAlg<xAOD::StripClusterContainer>{
using Cache::ViewFillerAlg<xAOD::StripClusterContainer>::ViewFillerAlg;
};
}
\ No newline at end of file
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include "src/CoreStripSpacePointFormationTool.h" #include "src/CoreStripSpacePointFormationTool.h"
#include "src/StripSpacePointFormationTool.h" #include "src/StripSpacePointFormationTool.h"
#include "src/CacheCreator.h"
// Algs // Algs
DECLARE_COMPONENT(ActsTrk::PixelClusterizationAlg) DECLARE_COMPONENT(ActsTrk::PixelClusterizationAlg)
DECLARE_COMPONENT(ActsTrk::StripClusterizationAlg) DECLARE_COMPONENT(ActsTrk::StripClusterizationAlg)
...@@ -24,3 +26,7 @@ DECLARE_COMPONENT(ActsTrk::PixelSpacePointFormationTool) ...@@ -24,3 +26,7 @@ DECLARE_COMPONENT(ActsTrk::PixelSpacePointFormationTool)
DECLARE_COMPONENT(ActsTrk::CoreStripSpacePointFormationTool) DECLARE_COMPONENT(ActsTrk::CoreStripSpacePointFormationTool)
DECLARE_COMPONENT(ActsTrk::StripSpacePointFormationTool) DECLARE_COMPONENT(ActsTrk::StripSpacePointFormationTool)
//Cache related algs
DECLARE_COMPONENT(ActsTrk::Cache::CreatorAlg)
DECLARE_COMPONENT(ActsTrk::PixelClusterCacheFillerAlg)
DECLARE_COMPONENT(ActsTrk::StripClusterCacheFillerAlg)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment