From c35069ed97764511a345dc06dca9e2e3214452df Mon Sep 17 00:00:00 2001
From: Renato Quagliani <renato.quagliani@cern.ch>
Date: Fri, 18 Oct 2024 12:39:29 +0200
Subject: [PATCH 1/3] add NtupleSvc basketsize property and forward in
 RCWNTupleCnv Branch creation

---
 GaudiSvc/src/NTupleSvc/NTupleSvc.h               | 4 +++-
 GaudiTestSuite/tests/qmtest/refs/MetaDataSvc.ref | 1 +
 RootHistCnv/src/RCWNTupleCnv.cpp                 | 9 ++++++---
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/GaudiSvc/src/NTupleSvc/NTupleSvc.h b/GaudiSvc/src/NTupleSvc/NTupleSvc.h
index 3d82e87b5d..cc19b1ac45 100644
--- a/GaudiSvc/src/NTupleSvc/NTupleSvc.h
+++ b/GaudiSvc/src/NTupleSvc/NTupleSvc.h
@@ -1,5 +1,5 @@
 /***********************************************************************************\
-* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
+* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
 *                                                                                   *
 * This software is distributed under the terms of the Apache version 2 licence,     *
 * copied verbatim in the file "LICENSE".                                            *
@@ -98,6 +98,7 @@ public:
 
   /// Check if a datasource is connected
   bool isConnected( const std::string& identifier ) const override;
+
   /// Add file to list I/O list
   StatusCode connect( const std::string& ident ) override;
   /// Add file to list I/O list
@@ -124,6 +125,7 @@ protected:
   Gaudi::Property<DBaseEntries> m_input{ this, "Input", {}, "input streams" };
   Gaudi::Property<DBaseEntries> m_output{ this, "Output", {}, "output streams" };
 
+  Gaudi::Property<int> m_basketsize{ this, "BasketSize", 32000, "BasketSize" }; // ROOT default
   /// Container of connection points
   std::map<std::string, Connection> m_connections;
 };
diff --git a/GaudiTestSuite/tests/qmtest/refs/MetaDataSvc.ref b/GaudiTestSuite/tests/qmtest/refs/MetaDataSvc.ref
index bbaadadd59..080c63d007 100644
--- a/GaudiTestSuite/tests/qmtest/refs/MetaDataSvc.ref
+++ b/GaudiTestSuite/tests/qmtest/refs/MetaDataSvc.ref
@@ -289,6 +289,7 @@ NTupleSvc.AuditServices:False
 NTupleSvc.AuditStart:False
 NTupleSvc.AuditStop:False
 NTupleSvc.AutoRetrieveTools:True
+NTupleSvc.BasketSize:32000
 NTupleSvc.CheckToolDeps:True
 NTupleSvc.DataAccessName:'DataAccess'
 NTupleSvc.DataFaultName:'DataFault'
diff --git a/RootHistCnv/src/RCWNTupleCnv.cpp b/RootHistCnv/src/RCWNTupleCnv.cpp
index 77e70dc2f0..b1a800461f 100644
--- a/RootHistCnv/src/RCWNTupleCnv.cpp
+++ b/RootHistCnv/src/RCWNTupleCnv.cpp
@@ -1,5 +1,5 @@
 /***********************************************************************************\
-* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
+* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
 *                                                                                   *
 * This software is distributed under the terms of the Apache version 2 licence,     *
 * copied verbatim in the file "LICENSE".                                            *
@@ -198,6 +198,10 @@ StatusCode RootHistCnv::RCWNTupleCnv::book( const std::string& desc, INTuple* nt
 
   // Loop over items, creating a new branch for each one;
   unsigned int i_item = 0;
+
+  Gaudi::Property<int> basket_size( "BasketSize", 32000 );
+  m_ntupleSvc.as<IProperty>()->getProperty( &basket_size ).ignore();
+
   for ( auto itr = item_name.cbegin(); itr != end; ++itr, ++i_item ) {
 
     buf_pos = buff + item_buf_pos[i_item];
@@ -214,8 +218,7 @@ StatusCode RootHistCnv::RCWNTupleCnv::book( const std::string& desc, INTuple* nt
 #else
     TBranch* br = new TBranch(
 #endif
-                           item_fullname[i_item].c_str(), buf_pos, itr->second.c_str() );
-
+                           item_fullname[i_item].c_str(), buf_pos, itr->second.c_str(), basket_size );
     if ( itr->first != "AUTO_BLK" ) {
       std::string title = itr->first;
       title             = itr->first + "::" + br->GetTitle();
-- 
GitLab


From 84870cc40351a60963aa49f5740aed7526058ef9 Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Mon, 14 Oct 2024 14:50:25 +0200
Subject: [PATCH 2/3] Update version to v38r1p1 and add change log entry

---
 CHANGELOG.md        | 9 +++++++++
 CITATION.cff        | 4 ++--
 CMakeLists.txt      | 2 +-
 docs/source/conf.py | 4 ++--
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8ec3256b3..cf9a018d4c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,15 @@ Project Coordinators: Marco Clemencic @clemenci, Charles Leggett @leggett
 
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 
+
+## [v38r1p1](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v38r1p1) - 2024-10-18
+This patch release is needed by LHCb to pick up a small extension to `NTupleSvc`
+so that we can fine tune the basket size of the `TTree`s we produce.
+
+### Added
+- Add `NTupleSvc.BasketSize` property and forward in RCWNTupleCnv Branch creation (gaudi/Gaudi!1648)
+
+
 ## [v38r1](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v38r1) - 2024-03-15
 This backward compatible release of Gaudi features a few fixes and improvements, and a
 major step towards some proper polishing an refreshing of the examples.
diff --git a/CITATION.cff b/CITATION.cff
index 41dc30df54..be0362f725 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -24,5 +24,5 @@ keywords:
   - HEP
   - Software Framework
 license: Apache-2.0
-version: v38r1
-date-released: '2024-03-15'
+version: v38r1p1
+date-released: '2024-10-18'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 330554e2f7..b39efd15cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,7 +82,7 @@ Maintainer's guide: `<https://twiki.cern.ch/twiki/bin/view/LHCb/MaintainGaudiCMa
 
 cmake_minimum_required(VERSION 3.15)
 
-project(Gaudi VERSION 38.1
+project(Gaudi VERSION 38.1.1
               LANGUAGES CXX
               DESCRIPTION "Gaudi Software Framework"
               HOMEPAGE_URL "https://cern.ch/gaudi")
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 850073d316..8091a9bd10 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -22,9 +22,9 @@ copyright = "1998-2023, CERN for the benefit of the LHCb and ATLAS collaboration
 author = "The Gaudi Developers"
 
 # The short X.Y version
-version = "38.1"
+version = "38.1.1"
 # The full version, including alpha/beta/rc tags
-release = "v38r1"
+release = "v38r1p1"
 
 # -- General configuration ---------------------------------------------------
 
-- 
GitLab


From a2f7c52a616a3cadf137c21e408def36317e161c Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Tue, 22 Oct 2024 18:50:44 +0200
Subject: [PATCH 3/3] Prepare v38r3p1

---
 CHANGELOG.md        | 8 ++++++++
 CITATION.cff        | 4 ++--
 CMakeLists.txt      | 2 +-
 docs/source/conf.py | 4 ++--
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f2ee99c10..eb8a669706 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,14 @@ Project Coordinators: Marco Clemencic @clemenci, Charles Leggett @leggett
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 
 
+## [v38r3p1](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v38r3p1) - 2024-10-22
+This release is integrating the changes from [v38r1p1](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v38r1p1)
+into v38r3.
+
+### Added
+- Add `NTupleSvc.BasketSize` property and forward in RCWNTupleCnv Branch creation (gaudi/Gaudi!1648)
+
+
 ## [v38r3](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v38r3) - 2024-06-28
 This is a minor release to collect all pending backward compatible changes and fixes
 before integrating the backward incompatible changes scheduled for v39r0.
diff --git a/CITATION.cff b/CITATION.cff
index 43d9f5b1c7..a72b506598 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -24,5 +24,5 @@ keywords:
   - HEP
   - Software Framework
 license: Apache-2.0
-version: v38r3
-date-released: '2024-06-28'
+version: v38r3p1
+date-released: '2024-10-22'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7dc7bd7e4..609c52a39b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,7 @@ Maintainer's guide: `<https://twiki.cern.ch/twiki/bin/view/LHCb/MaintainGaudiCMa
 
 cmake_minimum_required(VERSION 3.15)
 
-project(Gaudi VERSION 38.3
+project(Gaudi VERSION 38.3.1
               LANGUAGES CXX
               DESCRIPTION "Gaudi Software Framework"
               HOMEPAGE_URL "https://cern.ch/gaudi")
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b3d8d1a3fd..27d250ad2d 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -22,9 +22,9 @@ copyright = "1998-2023, CERN for the benefit of the LHCb and ATLAS collaboration
 author = "The Gaudi Developers"
 
 # The short X.Y version
-version = "38.3"
+version = "38.3.1"
 # The full version, including alpha/beta/rc tags
-release = "v38r3"
+release = "v38r3p1"
 
 # -- General configuration ---------------------------------------------------
 
-- 
GitLab