diff --git a/GaudiSvc/src/NTupleSvc/NTupleSvc.h b/GaudiSvc/src/NTupleSvc/NTupleSvc.h index 3d82e87b5d849a25f21bdb25a0029c7556ee1504..cc19b1ac454930d58aefb58eec9e3bac1298222f 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 bbaadadd59f6af25d93fd1d47b1270423c0e45a4..080c63d00736958aabc917d634fde0552ab41c1e 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 77e70dc2f0d26b223a525747aaf776eeec8cb094..b1a800461f230ec1730937e0fa91f208043fec35 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();