File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,11 @@ CondHDF5ESSource::KeyedResolversVector CondHDF5ESSource::registerResolvers(Event
240240
241241std::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_ )};
Original file line number Diff line number Diff line change @@ -651,6 +651,7 @@ edm::eventsetup::ESProductResolverProvider::KeyedResolversVector CondDBESSource:
651651
652652std::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 ();
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments