src
IOPool
Input
src
FixMissingStreamerInfos.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Services
4
// Class : FixMissingStreamerInfos
5
//
6
// Implementation:
7
33
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
34
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
35
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
36
#include "
FWCore/ServiceRegistry/interface/ActivityRegistry.h
"
37
#include "
FWCore/ServiceRegistry/interface/ServiceMaker.h
"
38
#include "
FWCore/Utilities/interface/EDMException.h
"
39
#include "
FWCore/Utilities/interface/FileInPath.h
"
40
41
#include "TFile.h"
42
43
namespace
edm
{
44
namespace
service
{
45
46
class
FixMissingStreamerInfos
{
47
public
:
48
FixMissingStreamerInfos
(
ParameterSet
const
&,
ActivityRegistry
&);
49
static
void
fillDescriptions
(
ConfigurationDescriptions
&);
50
51
private
:
52
FileInPath
fileInPath_
;
53
};
54
55
FixMissingStreamerInfos::FixMissingStreamerInfos
(
ParameterSet
const
&
pset
,
edm::ActivityRegistry
&)
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
65
void
FixMissingStreamerInfos::fillDescriptions
(
ConfigurationDescriptions
& descriptions) {
66
ParameterSetDescription
desc
;
67
desc
.addUntracked<
FileInPath
>(
"fileInPath"
);
68
descriptions.
add
(
"FixMissingStreamerInfos"
,
desc
);
69
}
70
}
// namespace service
71
}
// namespace edm
72
73
using namespace
edm::service
;
74
DEFINE_FWK_SERVICE
(
FixMissingStreamerInfos
);
edm::service
Definition:
TFileService.h:95
Exception
Definition:
hltDiff.cc:245
edm::FileInPath::fullPath
std::string fullPath() const
Definition:
FileInPath.cc:161
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
edm::service::FixMissingStreamerInfos::fileInPath_
FileInPath fileInPath_
Definition:
FixMissingStreamerInfos.cc:52
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ParameterSet.h
ServiceMaker.h
ParameterSetDescription.h
edm::service::FixMissingStreamerInfos::fillDescriptions
static void fillDescriptions(ConfigurationDescriptions &)
Definition:
FixMissingStreamerInfos.cc:65
EDMException.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:254
service
Definition:
service.py:1
FileInPath.h
edm::service::FixMissingStreamerInfos::FixMissingStreamerInfos
FixMissingStreamerInfos(ParameterSet const &, ActivityRegistry &)
Definition:
FixMissingStreamerInfos.cc:55
edm::FileInPath
Definition:
FileInPath.h:61
DEFINE_FWK_SERVICE
#define DEFINE_FWK_SERVICE(type)
Definition:
ServiceMaker.h:97
edm::service::FixMissingStreamerInfos
Definition:
FixMissingStreamerInfos.cc:46
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
ActivityRegistry.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSet
Definition:
ParameterSet.h:48
ConfigurationDescriptions.h
edm::ActivityRegistry
Definition:
ActivityRegistry.h:152
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
Generated for CMSSW Reference Manual by
1.8.14