Skip to content

Commit 428bca9

Browse files
committed
Merge pull request cms-sw#2595 from wmtan/FixExceptionToActionTableLifetime
Simulation fixes -- Fix exception to action table lifetime
2 parents a9a6f3b + 8a25c46 commit 428bca9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Mixing/Base/src/PileUp.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace edm {
6767

6868
if(pset.existsAs<std::vector<ParameterSet> >("producers", true)) {
6969
std::vector<ParameterSet> producers = pset.getParameter<std::vector<ParameterSet> >("producers");
70-
provider_.reset(new SecondaryEventProvider(producers, *productRegistry_, ExceptionToActionTable(), processConfiguration_));
70+
provider_.reset(new SecondaryEventProvider(producers, *productRegistry_, processConfiguration_));
7171
}
7272

7373
productRegistry_->setFrozen();

Mixing/Base/src/SecondaryEventProvider.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include "Mixing/Base/src/SecondaryEventProvider.h"
2+
#include "FWCore/Framework/interface/ExceptionActions.h"
23
#include "FWCore/Framework/src/PreallocationConfiguration.h"
34
#include "FWCore/ParameterSet/interface/ParameterSet.h"
45
#include "FWCore/Utilities/interface/StreamID.h"
56

67
namespace edm {
78
SecondaryEventProvider::SecondaryEventProvider(std::vector<ParameterSet>& psets,
89
ProductRegistry& preg,
9-
ExceptionToActionTable const& actions,
1010
boost::shared_ptr<ProcessConfiguration> processConfiguration) :
11-
workerManager_(boost::shared_ptr<ActivityRegistry>(new ActivityRegistry), actions) {
11+
exceptionToActionTable_(new ExceptionToActionTable),
12+
workerManager_(boost::shared_ptr<ActivityRegistry>(new ActivityRegistry), *exceptionToActionTable_) {
1213
std::vector<std::string> shouldBeUsedLabels;
1314
std::set<std::string> unscheduledLabels;
1415
const PreallocationConfiguration preallocConfig;

Mixing/Base/src/SecondaryEventProvider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#define Mixing_Base_SecondaryEventProvider_h
33

44
#include "FWCore/Framework/interface/WorkerManager.h"
5-
65
#include "FWCore/Framework/interface/Frameworkfwd.h"
76

87
#include "boost/shared_ptr.hpp"
98

9+
#include <memory>
1010
#include <string>
1111
#include <vector>
1212

@@ -17,7 +17,6 @@ namespace edm {
1717
public:
1818
SecondaryEventProvider(std::vector<ParameterSet>& psets,
1919
ProductRegistry& pregistry,
20-
ExceptionToActionTable const& actions,
2120
boost::shared_ptr<ProcessConfiguration> processConfiguration);
2221

2322
void beginRun(RunPrincipal& run, const edm::EventSetup& setup, ModuleCallingContext const*);
@@ -32,6 +31,7 @@ namespace edm {
3231
void endJob() {workerManager_.endJob();}
3332

3433
private:
34+
std::unique_ptr<ExceptionToActionTable> exceptionToActionTable_;
3535
WorkerManager workerManager_;
3636
};
3737
}

0 commit comments

Comments
 (0)