CMS 3D CMS Logo

FixMissingStreamerInfos.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : FixMissingStreamerInfos
5 //
6 // Implementation:
7 
40 
41 #include "TFile.h"
42 
43 namespace edm {
44  namespace service {
45 
47  public:
50 
51  private:
53  };
54 
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  }
64 
67  desc.addUntracked<FileInPath>("fileInPath");
68  descriptions.add("FixMissingStreamerInfos", desc);
69  }
70  } // namespace service
71 } // namespace edm
72 
73 using namespace edm::service;
std::string fullPath() const
Definition: FileInPath.cc:161
static void fillDescriptions(ConfigurationDescriptions &)
FixMissingStreamerInfos(ParameterSet const &, ActivityRegistry &)
#define DEFINE_FWK_SERVICE(type)
Definition: ServiceMaker.h:97
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLT enums.