Skip to content
Snippets Groups Projects
Commit ea80daf8 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Fire ContextIncident 'CONNECTED_NTUPLE_OUTPUT' when opening a ntuple file in RFileCnv

See merge request !1482
parents d0304bbb 60dacf93
No related branches found
No related tags found
1 merge request!1482Fire ContextIncident 'CONNECTED_NTUPLE_OUTPUT' when opening a ntuple file in RFileCnv
Pipeline #5968976 failed
......@@ -5,6 +5,13 @@ Project Coordinators: Marco Clemencic @clemenci, Charles Leggett @leggett
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [v36r16](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v36r16) - 2023-07-28
Release requested by LHCb to backport gaudi/Gaudi!1478
### Added
- Fire ContextIncident `CONNECTED_NTUPLE_OUTPUT` when opening a ntuple file in
RFileCnv (gaudi/Gaudi!1482)
## [v36r15](https://gitlab.cern.ch/gaudi/Gaudi/-/releases/v36r15) - 2023-07-24
This release is needed so that LHCb can pick up a backward compatible version
of gaudi/Gaudi!1477.
......
......@@ -80,7 +80,7 @@ Maintainer's guide: `<https://twiki.cern.ch/twiki/bin/view/LHCb/MaintainGaudiCMa
cmake_minimum_required(VERSION 3.15)
project(Gaudi VERSION 36.15
project(Gaudi VERSION 36.16
LANGUAGES CXX
DESCRIPTION "Gaudi Software Framework"
HOMEPAGE_URL "https://cern.ch/gaudi")
......
......@@ -10,6 +10,7 @@
\***********************************************************************************/
// Include files
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/DataIncident.h"
#include "GaudiKernel/IOpaqueAddress.h"
#include "GaudiKernel/IRegistry.h"
#include "GaudiKernel/ISvcLocator.h"
......@@ -44,7 +45,14 @@ StatusCode RootHistCnv::RFileCnv::initialize() {
if ( !sc ) return sc;
}
// initialise base class
return RDirectoryCnv::initialize();
return RDirectoryCnv::initialize().andThen( [&]() {
m_incSvc = service( "IncidentSvc" );
if ( !m_incSvc ) {
MsgStream( msgSvc() ) << MSG::ERROR << "Cannot access IncidentSvc" << endmsg;
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
} );
}
//------------------------------------------------------------------------------
......@@ -126,6 +134,7 @@ StatusCode RootHistCnv::RFileCnv::createObj( IOpaqueAddress* pAddress, DataObjec
regTFile( ooname, rfile ).ignore();
log << MSG::DEBUG << "creating ROOT file " << fname << endmsg;
m_incSvc->fireIncident( ContextIncident<TFile*>( fname, "CONNECTED_NTUPLE_OUTPUT", rfile ) );
ipar[0] = (unsigned long)rfile;
NTuple::File* pFile = new NTuple::File( objType(), fname, oname );
......
......@@ -12,6 +12,7 @@
#define ROOTHISTCNV_RFILECNV_H 1
// Include files
#include "GaudiKernel/IIncidentSvc.h"
#include "GaudiKernel/NTuple.h"
#include "RDirectoryCnv.h"
......@@ -51,8 +52,9 @@ namespace RootHistCnv {
RFileCnv( ISvcLocator* svc );
protected:
TFile* rfile{ nullptr }; ///< Pointer to ROOT file
std::string m_compLevel; ///< Compression setting, property RFileCnv.GlobalCompression
TFile* rfile{ nullptr }; ///< Pointer to ROOT file
std::string m_compLevel; ///< Compression setting, property RFileCnv.GlobalCompression
SmartIF<IIncidentSvc> m_incSvc;
};
} // namespace RootHistCnv
#endif // RootHistCnv_RFileCNV_H
......@@ -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 = "36.15"
version = "36.16"
# The full version, including alpha/beta/rc tags
release = "v36r15"
release = "v36r16"
# -- General configuration ---------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment