10#include "boost/chrono/chrono.hpp"
11#include "boost/chrono/thread_clock.hpp"
17 base_class(
type, name, parent),
26 return StatusCode::SUCCESS;
32 return StatusCode::SUCCESS;
38 using clock_type = boost::chrono::thread_clock;
39 auto time_cast = [](
const auto & before,
const auto & after)
41 return boost::chrono::duration_cast<boost::chrono::microseconds>(after - before).count();
44 const auto start = clock_type::now();
46 const auto before_seed_properties = clock_type::now();
52 const auto before_calculating = clock_type::now();
56 const auto end = clock_type::now();
62 time_cast(start, before_seed_properties),
63 time_cast(before_seed_properties, before_calculating),
64 time_cast(before_calculating, end)
69 return StatusCode::SUCCESS;
78 print_times(
"Preprocessing Seed_Cell_Properties_Updating Cluster_Properties_Calculation", 3);
80 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< IGPUKernelSizeOptimizerSvc > m_kernelSizeOptimizer
Handle to the CUDA kernel block and grid size optimization service.
Gaudi::Property< bool > m_cutClustersInAbsE
if set to true cluster cuts are on , if false on .
virtual StatusCode execute(const EventContext &ctx, const CaloRecGPU::ConstantDataHolder &constant_data, CaloRecGPU::EventDataHolder &event_data, void *temporary_buffer) const override
BasicGPUClusterInfoCalculator(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Tool providing the CUDA stream to use.
virtual StatusCode initialize_non_CUDA() override
Initialization that does not invoke CUDA functions.
virtual StatusCode initialize_CUDA() override
Initialization that invokes CUDA functions.
Gaudi::Property< float > m_clusterETThreshold
cut on the clusters.
virtual StatusCode finalize() override
Gaudi::Property< bool > m_measureTimes
If true, times are recorded to the file given by m_timeFileName.
void print_times(const std::string &header, const size_t time_size) const
void record_times(const size_t event_num, const std::vector< size_t > ×) const
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
void calculateClusterProperties(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const IGPUKernelSizeOptimizer &optimizer, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use, const bool synchronize=false, const bool cut_in_absolute_ET=true, const float absolute_ET_threshold=-1)
void updateSeedCellProperties(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const IGPUKernelSizeOptimizer &optimizer, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use, const bool synchronize=false)
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.