Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception to action table lifetime #2595

Merged
merged 2 commits into from
Feb 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mixing/Base/src/PileUp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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