Skip to content

Commit

Permalink
Merge remote branch 'origin/CMSSW_7_1_X' into CMSSW_7_0_X
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed May 26, 2014
2 parents 0e1ec52 + 98ce41c commit 8ebc867
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 45 deletions.
24 changes: 1 addition & 23 deletions FWCore/Framework/interface/stream/EDAnalyzerAdaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,14 @@
#include "FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h"
#include "FWCore/Framework/interface/stream/callAbilities.h"
#include "FWCore/Framework/interface/stream/dummy_helpers.h"
#include "FWCore/Framework/interface/stream/makeGlobal.h"
#include "FWCore/Framework/src/MakeModuleHelper.h"

// forward declarations

namespace edm {
namespace stream {

namespace impl {
template<typename T, typename G>
std::unique_ptr<G> makeGlobal(edm::ParameterSet const& iPSet, G const*) {
return T::initializeGlobalCache(iPSet);
}
template<typename T>
dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) {
return dummy_ptr();
}

template< typename T, typename G>
T* makeStreamModule(edm::ParameterSet const& iPSet,
G const* iGlobal) {
return new T(iPSet,iGlobal);
}

template< typename T>
T* makeStreamModule(edm::ParameterSet const& iPSet,
void const* ) {
return new T(iPSet);
}
}

template<typename ABase, typename ModType> struct BaseToAdaptor;

template<typename T> class EDAnalyzerAdaptor;
Expand Down
23 changes: 1 addition & 22 deletions FWCore/Framework/interface/stream/ProducingModuleAdaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,11 @@
#include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
#include "FWCore/Framework/interface/stream/callAbilities.h"
#include "FWCore/Framework/interface/stream/dummy_helpers.h"
#include "FWCore/Framework/interface/stream/makeGlobal.h"
// forward declarations

namespace edm {
namespace stream {
namespace impl {
template<typename T, typename G>
std::unique_ptr<G> makeGlobal(edm::ParameterSet const& iPSet, G const*) {
return T::initializeGlobalCache(iPSet);
}
template<typename T>
dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) {
return dummy_ptr();
}

template< typename T, typename G>
T* makeStreamModule(edm::ParameterSet const& iPSet,
G const* iGlobal) {
return new T(iPSet,iGlobal);
}

template< typename T>
T* makeStreamModule(edm::ParameterSet const& iPSet,
void const* ) {
return new T(iPSet);
}
}

template<typename T, typename M, typename B>
class ProducingModuleAdaptor : public B
Expand Down
53 changes: 53 additions & 0 deletions FWCore/Framework/interface/stream/makeGlobal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef FWCore_Framework_stream_makeGlobal_h
#define FWCore_Framework_stream_makeGlobal_h
// -*- C++ -*-
//
// Package: FWCore/Framework
// Class : makeGlobal
//
/** Helper functions for making stream modules
Description: [one line class summary]
Usage:
<usage>
*/
//
// Original Author: Chris Jones
// Created: Thu, 22 May 2014 13:55:01 GMT
//

// system include files

// user include files

// forward declarations

namespace edm {
namespace stream {
namespace impl {
template<typename T, typename G>
std::unique_ptr<G> makeGlobal(edm::ParameterSet const& iPSet, G const*) {
return T::initializeGlobalCache(iPSet);
}
template<typename T>
dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) {
return dummy_ptr();
}

template< typename T, typename G>
T* makeStreamModule(edm::ParameterSet const& iPSet,
G const* iGlobal) {
return new T(iPSet,iGlobal);
}

template< typename T>
T* makeStreamModule(edm::ParameterSet const& iPSet,
void const* ) {
return new T(iPSet);
}
}
}
}
#endif

0 comments on commit 8ebc867

Please sign in to comment.