Skip to content
Snippets Groups Projects
Commit abb016e2 authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh
Browse files

Merge branch 'Optinal_DataPool_IDCOnlineCache' into '23.0'

SCTRawDataProvider, TRT_RIO_Maker allow DataPool for the cache Online case

See merge request !64233
parents e5b0207f d0987dac
No related branches found
No related tags found
No related merge requests found
......@@ -156,7 +156,11 @@ StatusCode SCTRawDataProvider::execute(const EventContext& ctx) const
if(!externalCacheRDO){
dataItemsPool = std::make_unique<DataPool<SCT3_RawData>>(ctx);
dataItemsPool->reserve(10000); // Some large default size
} else if (m_useDataPoolWithCache) {
dataItemsPool = std::make_unique<DataPool<SCT3_RawData>>(ctx);
// for now a default size 1024.
}
// Ask SCTRawDataProviderTool to decode it and to fill the IDC
StatusCode statConv = m_rawDataTool->convert(vecROBFrags,
*(rdoContainer.ptr()),
......
......@@ -91,6 +91,10 @@ class SCTRawDataProvider : public AthReentrantAlgorithm
/** Boolean to determine if SCT Raw Data Provider should be run in RoI seeded mode. */
BooleanProperty m_roiSeeded{this, "isRoI_Seeded", false, "Use RoI"};
/** Boolean to Use DataPool with IDC online Cache */
Gaudi::Property<bool> m_useDataPoolWithCache{
this, "useDataPoolWithCache", false, "use DataPool With Cache"};
/** Read handle for Trigger ROI descriptor collection. */
SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{this,
"RoIs",
......
......@@ -72,8 +72,12 @@ namespace InDet{
SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{this, "RoIs", "", "RoIs to read in"};
BooleanProperty m_roiSeeded{this, "isRoI_Seeded", false, "Use RoI"};
Gaudi::Property<bool> m_useDataPoolWithCache{
this, "useDataPoolWithCache", false, "use DataPool With Cache"};
ToolHandle<IRegSelTool> m_regionSelector { this, "RegSelTool", "RegSelTool/RegSelTool_TRT" }; //!< region selector tool
SG::UpdateHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey;
};
}//end of namespace
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -95,6 +95,9 @@ namespace InDet {
if (!hasExternalCache) {
dataItemsPool = std::make_unique<DataPool<TRT_DriftCircle>>(ctx);
dataItemsPool->reserve(100000); // Some large default size
}else if(m_useDataPoolWithCache){
dataItemsPool = std::make_unique<DataPool<TRT_DriftCircle>>(ctx);
//Default size for now 1024 let it expand on its own
}
// Get TRT_RDO and produce TRT_RIO collections
......@@ -122,11 +125,6 @@ namespace InDet {
listOfTRTIds.clear(); //Prevents needless memory reallocations
m_regionSelector->HashIDList( *roi, listOfTRTIds);
#ifndef NDEBUG
ATH_MSG_VERBOSE(*roi);
ATH_MSG_VERBOSE( "REGTEST: SCT : Roi contains "
<< listOfTRTIds.size() << " det. Elements" );
#endif
for(auto &id : listOfTRTIds){
const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection (rdoContainer->indexFindPtr(id));
if (!RDO_Collection) continue;
......@@ -141,11 +139,7 @@ namespace InDet {
RDO_Collection, ctx, dataItemsPool.get(),
m_trtBadChannels));
if (p_rio && !p_rio->empty()) {
#ifndef NDEBUG
ATH_MSG_VERBOSE( "REGTEST: TRT : DriftCircleCollection contains "
<< p_rio->size() << " clusters" );
#endif
ATH_CHECK(lock.addOrDelete(std::move(p_rio)));
ATH_CHECK(lock.addOrDelete(std::move(p_rio)));
}
}
}
......
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