Skip to content

Commit

Permalink
Merge pull request #5324 from Dr15Jones/makeMultiTrackSelectorStreamM…
Browse files Browse the repository at this point in the history
…odule

Converted MultiTrackSelector from global to stream
  • Loading branch information
davidlange6 committed Sep 17, 2014
2 parents fc35041 + 3bc7855 commit 0d2717a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ MultiTrackSelector::~MultiTrackSelector() {
}


void MultiTrackSelector::beginJob() {
void MultiTrackSelector::beginStream(edm::StreamID) {
if(!useForestFromDB_){
TFile gbrfile(dbFileName_.c_str());
forest_ = (GBRForest*)gbrfile.Get(forestLabel_.c_str());
Expand Down
9 changes: 5 additions & 4 deletions RecoTracker/FinalTrackSelectors/plugins/MultiTrackSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <memory>
#include <algorithm>
#include <map>
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
Expand All @@ -32,7 +32,7 @@
#include "CommonTools/Utils/interface/StringCutObjectSelector.h"
#include "CondFormats/EgammaObjects/interface/GBRForest.h"

class dso_hidden MultiTrackSelector : public edm::global::EDProducer<> {
class dso_hidden MultiTrackSelector : public edm::stream::EDProducer<> {
private:
public:
/// constructor
Expand All @@ -42,7 +42,7 @@
virtual ~MultiTrackSelector() ;

protected:
void beginJob() final;
void beginStream(edm::StreamID) override final;

// void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const final {
// init();
Expand All @@ -52,7 +52,7 @@

typedef math::XYZPoint Point;
/// process one event
void produce(edm::StreamID, edm::Event& evt, const edm::EventSetup& es ) const final {
void produce(edm::Event& evt, const edm::EventSetup& es ) override final {
run(evt,es);
}
virtual void run( edm::Event& evt, const edm::EventSetup& es ) const;
Expand Down Expand Up @@ -87,6 +87,7 @@

/// vertex cuts
std::vector<int32_t> vtxNumber_;
//StringCutObjectSelector is not const thread safe
std::vector<StringCutObjectSelector<reco::Vertex> > vertexCut_;

// parameters for adapted optimal cuts on chi2 and primary vertex compatibility
Expand Down

0 comments on commit 0d2717a

Please sign in to comment.