Skip to content

Commit

Permalink
Merge pull request #2595 from wmtan/FixExceptionToActionTableLifetime
Browse files Browse the repository at this point in the history
Simulation fixes -- Fix exception to action table lifetime
  • Loading branch information
ktf committed Feb 24, 2014
2 parents a9a6f3b + 8a25c46 commit 428bca9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Mixing/Base/src/PileUp.cc
Expand Up @@ -67,7 +67,7 @@ namespace edm {

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

productRegistry_->setFrozen();
Expand Down
5 changes: 3 additions & 2 deletions Mixing/Base/src/SecondaryEventProvider.cc
@@ -1,14 +1,15 @@
#include "Mixing/Base/src/SecondaryEventProvider.h"
#include "FWCore/Framework/interface/ExceptionActions.h"
#include "FWCore/Framework/src/PreallocationConfiguration.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/StreamID.h"

namespace edm {
SecondaryEventProvider::SecondaryEventProvider(std::vector<ParameterSet>& psets,
ProductRegistry& preg,
ExceptionToActionTable const& actions,
boost::shared_ptr<ProcessConfiguration> processConfiguration) :
workerManager_(boost::shared_ptr<ActivityRegistry>(new ActivityRegistry), actions) {
exceptionToActionTable_(new ExceptionToActionTable),
workerManager_(boost::shared_ptr<ActivityRegistry>(new ActivityRegistry), *exceptionToActionTable_) {
std::vector<std::string> shouldBeUsedLabels;
std::set<std::string> unscheduledLabels;
const PreallocationConfiguration preallocConfig;
Expand Down
4 changes: 2 additions & 2 deletions Mixing/Base/src/SecondaryEventProvider.h
Expand Up @@ -2,11 +2,11 @@
#define Mixing_Base_SecondaryEventProvider_h

#include "FWCore/Framework/interface/WorkerManager.h"

#include "FWCore/Framework/interface/Frameworkfwd.h"

#include "boost/shared_ptr.hpp"

#include <memory>
#include <string>
#include <vector>

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

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

private:
std::unique_ptr<ExceptionToActionTable> exceptionToActionTable_;
WorkerManager workerManager_;
};
}
Expand Down

0 comments on commit 428bca9

Please sign in to comment.