Skip to content

Commit cbe57e9

Browse files
committed
Improvements based on review feedback
1 parent f488fec commit cbe57e9

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CondCore/CondHDF5ESSource/plugins/CondHDF5ESSource.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ CondHDF5ESSource::KeyedResolversVector CondHDF5ESSource::registerResolvers(Event
240240

241241
std::vector<edm::eventsetup::ESModuleProducesInfo> CondHDF5ESSource::producesInfo() const {
242242
std::vector<edm::eventsetup::ESModuleProducesInfo> returnValue;
243+
auto size = 0;
244+
for (auto const& recInfo : records_) {
245+
size += recInfo.dataProducts_.size();
246+
}
247+
returnValue.reserve(size);
243248

244249
for (auto const& recInfo : records_) {
245250
EventSetupRecordKey rec{edm::eventsetup::heterocontainer::HCTypeTag::findType(recInfo.name_)};

CondCore/ESSources/plugins/CondDBESSource.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ edm::eventsetup::ESProductResolverProvider::KeyedResolversVector CondDBESSource:
651651

652652
std::vector<edm::eventsetup::ESModuleProducesInfo> CondDBESSource::producesInfo() const {
653653
std::vector<edm::eventsetup::ESModuleProducesInfo> returnValue;
654+
returnValue.reserve(m_resolvers.size());
654655

655656
for (auto const& recToResolver : m_resolvers) {
656657
unsigned int index = returnValue.size();

FWCore/Framework/interface/EDConsumerBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ namespace edm {
121121

122122
std::vector<ModuleConsumesInfo> moduleConsumesInfos() const;
123123
///This can only be called before the end of beginJob (after that the underlying data has been deleted)
124+
/// The pointers held by ModuleConsumesMinimalESInfo will also be invalid at that time so copies of
125+
/// that class should not be held beyond the end of beginJob.
124126
std::vector<ModuleConsumesMinimalESInfo> moduleConsumesMinimalESInfos() const;
125127

126128
ESResolverIndex const* esGetTokenIndices(edm::Transition iTrans) const {

FWCore/Framework/src/PathsAndConsumesOfModules.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ namespace edm {
9191
auto const& typeID = consumesInfo.type();
9292

9393
if (not consumesInfo.skipCurrentProcess()) {
94-
assert(*consumedModuleLabel.data() !=
95-
'\0'); // consumesMany used to create empty labels before we removed consumesMany
94+
// consumesMany used to create empty labels before we removed consumesMany
95+
assert(*consumedModuleLabel.data() != '\0');
9696
if (*consumedProcessName.data() != '\0') { // process name is specified in consumes call
9797
if (helper.index(kind,
9898
typeID,

0 commit comments

Comments
 (0)