CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::service::FixMissingStreamerInfos Class Reference

Public Member Functions

 FixMissingStreamerInfos (ParameterSet const &, ActivityRegistry &)
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &)
 

Private Attributes

FileInPath fileInPath_
 

Detailed Description

This service is used to open and close a ROOT file that contains StreamerInfo objects causing them to be saved in memory. It is used when reading a file written with a version of ROOT with a bug that caused it to fail to write out StreamerInfo objects. (see Issue 41246).

CMSSW_13_0_0 had such a problem and files were written with this problem. When using this service to read files written with this release set the "fileInPath" parameter to the string "IOPool/Input/data/fileContainingStreamerInfos_13_0_0.root". This file is saved in the cms-data repository for IOPool/Input. Note that it was difficult to identify all the problem classes and we might have missed some. If there are additional problem classes a new version of this file can be generated with script IOPool/Input/scripts/makeFileContainingStreamerInfos.C. If the problem ever recurs in ROOT with a different release, one could use that script to generate a file containing StreamerInfos for other releases.

\author W. David Dagenhart, created 30 October, 2023

Definition at line 46 of file FixMissingStreamerInfos.cc.

Constructor & Destructor Documentation

◆ FixMissingStreamerInfos()

edm::service::FixMissingStreamerInfos::FixMissingStreamerInfos ( ParameterSet const &  pset,
edm::ActivityRegistry  
)

Definition at line 55 of file FixMissingStreamerInfos.cc.

References Exception, fileInPath_, and edm::FileInPath::fullPath().

56  : fileInPath_(pset.getUntrackedParameter<FileInPath>("fileInPath")) {
57  auto tFile = TFile::Open(fileInPath_.fullPath().c_str());
58  if (!tFile || tFile->IsZombie()) {
59  throw cms::Exception("FixMissingStreamerInfo")
60  << "Failed opening file containing missing StreamerInfos: " << fileInPath_.fullPath();
61  }
62  tFile->Close();
63  }
std::string fullPath() const
Definition: FileInPath.cc:161

Member Function Documentation

◆ fillDescriptions()

void edm::service::FixMissingStreamerInfos::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 65 of file FixMissingStreamerInfos.cc.

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

65  {
67  desc.addUntracked<FileInPath>("fileInPath");
68  descriptions.add("FixMissingStreamerInfos", desc);
69  }

Member Data Documentation

◆ fileInPath_

FileInPath edm::service::FixMissingStreamerInfos::fileInPath_
private

Definition at line 52 of file FixMissingStreamerInfos.cc.

Referenced by FixMissingStreamerInfos().