From ce215f0ef4c49f4c9bab2a92c914eeb2b83303fa Mon Sep 17 00:00:00 2001
From: Chris Jones <jonesc@hep.phy.cam.ac.uk>
Date: Mon, 7 Oct 2024 16:14:19 +0100
Subject: [PATCH 1/2] Expose buffer type via histogram

---
 GaudiKernel/include/Gaudi/Accumulators.h                  | 3 ++-
 GaudiKernel/include/Gaudi/Accumulators/HistogramWrapper.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/GaudiKernel/include/Gaudi/Accumulators.h b/GaudiKernel/include/Gaudi/Accumulators.h
index 3ac803f85f..24fc4dfbdc 100644
--- a/GaudiKernel/include/Gaudi/Accumulators.h
+++ b/GaudiKernel/include/Gaudi/Accumulators.h
@@ -909,10 +909,11 @@ namespace Gaudi::Accumulators {
   class BufferableCounter : public PrintableCounter, public Accumulator<Atomicity, Args...> {
   public:
     using Accumulator<Atomicity, Args...>::Accumulator;
+    using BufferType = Buffer<Accumulator, Atomicity, Args...> ;
     BufferableCounter() = default;
     template <typename OWNER>
     BufferableCounter( OWNER* o, std::string const& name ) : BufferableCounter( o, name, *this ) {}
-    Buffer<Accumulator, Atomicity, Args...> buffer() { return { *this }; }
+    BufferType buffer() { return { *this }; }
     BufferableCounter( BufferableCounter const& )            = delete;
     BufferableCounter& operator=( BufferableCounter const& ) = delete;
     ~BufferableCounter() {
diff --git a/GaudiKernel/include/Gaudi/Accumulators/HistogramWrapper.h b/GaudiKernel/include/Gaudi/Accumulators/HistogramWrapper.h
index caf7beff3e..5c69260c51 100644
--- a/GaudiKernel/include/Gaudi/Accumulators/HistogramWrapper.h
+++ b/GaudiKernel/include/Gaudi/Accumulators/HistogramWrapper.h
@@ -44,6 +44,7 @@ namespace Gaudi::Accumulators {
   public:
     using AxisTupleType      = typename HistogramType::AxisTupleType;
     using AxisArithmeticType = typename HistogramType::AxisArithmeticType;
+    using BufferType         = typename HistogramType::BufferType;
     template <unsigned int I>
     using AxisType = std::tuple_element_t<I, AxisTupleType>;
 
-- 
GitLab


From 4e939cd9a93481afda040c7e29b0e1300abe46d3 Mon Sep 17 00:00:00 2001
From: Gitlab CI <noreply@cern.ch>
Date: Mon, 7 Oct 2024 15:17:35 +0000
Subject: [PATCH 2/2] pre-commit fixes

patch generated by https://gitlab.cern.ch/jonrob/Gaudi/-/jobs/44404485
---
 GaudiKernel/include/Gaudi/Accumulators.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GaudiKernel/include/Gaudi/Accumulators.h b/GaudiKernel/include/Gaudi/Accumulators.h
index 24fc4dfbdc..fbda99e07b 100644
--- a/GaudiKernel/include/Gaudi/Accumulators.h
+++ b/GaudiKernel/include/Gaudi/Accumulators.h
@@ -909,7 +909,7 @@ namespace Gaudi::Accumulators {
   class BufferableCounter : public PrintableCounter, public Accumulator<Atomicity, Args...> {
   public:
     using Accumulator<Atomicity, Args...>::Accumulator;
-    using BufferType = Buffer<Accumulator, Atomicity, Args...> ;
+    using BufferType    = Buffer<Accumulator, Atomicity, Args...>;
     BufferableCounter() = default;
     template <typename OWNER>
     BufferableCounter( OWNER* o, std::string const& name ) : BufferableCounter( o, name, *this ) {}
-- 
GitLab