From 3bbe9f7205ca82bc9ac55d1fbbde96085568bcbd Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Wed, 31 Jan 2024 17:51:07 +0100 Subject: [PATCH] Fix NanoAOD workflow reading 12_4_X file, and Geant4e test reading 12_5_X file In both cases the input file contains Scouting data formats, whose evolution causes read failure because of TStreamerInfo being missing from the file because of a ROOT bug at the time. --- .../PyReleaseValidation/python/relval_nano.py | 3 ++- IOPool/Input/python/fixReading_12_4_X_Files.py | 12 ++++++++++++ TrackPropagation/Geant4e/test/Geant4e_example_cfg.py | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 IOPool/Input/python/fixReading_12_4_X_Files.py diff --git a/Configuration/PyReleaseValidation/python/relval_nano.py b/Configuration/PyReleaseValidation/python/relval_nano.py index ef88f824e14fc..30a127b7f7994 100644 --- a/Configuration/PyReleaseValidation/python/relval_nano.py +++ b/Configuration/PyReleaseValidation/python/relval_nano.py @@ -195,7 +195,8 @@ def subnext(self): '--datatier':'NANOAOD', '--eventcontent':'NANOAOD', '--filein':'/store/mc/Run3Summer22MiniAODv3/BulkGravitonToHH_MX1120_MH121_TuneCP5_13p6TeV_madgraph-pythia8/MINIAODSIM/124X_mcRun3_2022_realistic_v12-v3/2810000/f9cdd76c-faac-4f24-bf0c-2496c8fffe54.root', - '--secondfilein':'/store/mc/Run3Summer22DRPremix/BulkGravitonToHH_MX1120_MH121_TuneCP5_13p6TeV_madgraph-pythia8/AODSIM/124X_mcRun3_2022_realistic_v12-v3/2810000/ab09fc5d-859c-407f-b7ce-74b0bae9bb96.root'}]) + '--secondfilein':'/store/mc/Run3Summer22DRPremix/BulkGravitonToHH_MX1120_MH121_TuneCP5_13p6TeV_madgraph-pythia8/AODSIM/124X_mcRun3_2022_realistic_v12-v3/2810000/ab09fc5d-859c-407f-b7ce-74b0bae9bb96.root', + '--customise':'IOPool/Input/fixReading_12_4_X_Files.fixReading_12_4_X_Files'}]) _wfn=WFN(2500) ################ diff --git a/IOPool/Input/python/fixReading_12_4_X_Files.py b/IOPool/Input/python/fixReading_12_4_X_Files.py new file mode 100644 index 0000000000000..baa174f5d8330 --- /dev/null +++ b/IOPool/Input/python/fixReading_12_4_X_Files.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +# ROOT version used in 12_4_X (2022 data taking), and in 13_0_X up to +# 13_0_3 had a bug where TStreamerInfo was missing in some cases. This +# customize function adds a Service to include the TStreamerInfo for +# the affected classes so that the old files can be read now that some +# of the affected data format classes have evolved. +def fixReading_12_4_X_Files(process): + process.add_(cms.Service("FixMissingStreamerInfos", + fileInPath = cms.untracked.FileInPath("IOPool/Input/data/fileContainingStreamerInfos_13_0_0.root") + )) + return process diff --git a/TrackPropagation/Geant4e/test/Geant4e_example_cfg.py b/TrackPropagation/Geant4e/test/Geant4e_example_cfg.py index 249f8e17f350e..6aeb5f645a064 100644 --- a/TrackPropagation/Geant4e/test/Geant4e_example_cfg.py +++ b/TrackPropagation/Geant4e/test/Geant4e_example_cfg.py @@ -31,6 +31,8 @@ '/store/relval/CMSSW_12_5_0_pre3/RelValSingleMuPt10/GEN-SIM-RECO/124X_mcRun3_2022_realistic_v8-v2/10000/6a6528c0-9d66-4358-bacc-158c40b439cf.root' ), ) +from IOPool.Input.fixReading_12_4_X_Files import fixReading_12_4_X_Files +process = fixReading_12_4_X_Files(process) process.load("TrackPropagation.Geant4e.geantRefit_cff") process.Geant4eTrackRefitter.src = cms.InputTag("generalTracks")